Quick Start Guide
Get started with MCP
This quick start guide will help you build your first MCP application:
- Setup environment - Install and configure the TRMX AI development tools
- Create an MCP server - Build a simple server with the starter template
- Connect a client - Implement a basic client to interact with your server
- Deploy to production - Take your application to the cloud
Prerequisites
Before you begin, make sure you have:
- Basic knowledge of JavaScript/TypeScript
- Node.js installed (v16 or later)
- A TRMX AI account (sign up at trmx.ai/signup)
Step 1: Install the TRMX AI CLI
The TRMX AI Command Line Interface (CLI) is the easiest way to create and manage your MCP projects.
# Install the TRMX CLI globally
npm install -g @trmx/cli
# Verify the installation
trmx --version
Step 2: Log in to Your TRMX AI Account
Authenticate with your TRMX AI account to access the platform services.
# Log in to your account
trmx login
Follow the prompts to complete the authentication process.
Step 3: Create a New MCP Project
Create a new directory for your project and initialize it with the TRMX AI starter template.
# Create a new directory
mkdir my-mcp-app
cd my-mcp-app
# Initialize a new project
trmx init
Select the "Basic MCP Server" template when prompted.
Step 4: Explore the Project Structure
Project Structure
The starter template creates a basic MCP server project with the following structure:
my-mcp-app/
├── src/
│ ├── index.ts # Main entry point
│ ├── tools/ # Tool definitions
│ │ └── hello.ts # Example tool
│ └── resources/ # Resource definitions
├── package.json
└── tsconfig.json
Step 5: Run Your MCP Server Locally
Start your MCP server locally for development and testing.
# Install dependencies
npm install
# Start the server
npm run dev
Your MCP server is now running on http://localhost:3000
.
Step 6: Connect to Your MCP Server
Create a simple client application to connect to your MCP server.
// client.js
const { MCPClient } = require('@trmx/client');
async function main() {
// Create a new MCP client
const client = new MCPClient({
serverUrl: 'http://localhost:3000'
});
// Initialize a conversation
const conversation = client.createConversation({
contextId: 'demo-user'
});
// Send a message
const response = await conversation.sendMessage("Hello, who are you?");
console.log('Response:', response.text);
// Send a follow-up message
const followUp = await conversation.sendMessage("What can you help me with?");
console.log('Follow-up:', followUp.text);
}
main().catch(console.error);
Run your client application:
node client.js
Step 7: Deploy Your MCP Server
When you're ready to deploy your MCP server to production, use the TRMX AI cloud platform:
# Deploy to TRMX AI cloud
trmx deploy
Your MCP server will be deployed to a serverless environment and accessible via a unique URL.
Next Steps
Continue Learning
Congratulations! You've created and run your first MCP application. Here are some next steps to continue your journey:
- Create MCP Server - Build a full-featured MCP server
- Custom Tools - Create tools for AI models to use
- Connect to Existing MCPs - Use pre-built MCP servers
- API Reference - Explore the complete API documentation