Your First Project
A step-by-step tutorial to set up your first RouterMCP project with multiple MCP servers.
Your First Project
In this tutorial, you'll create a RouterMCP configuration that aggregates three MCP servers:
- Filesystem - Access local files
- Fetch - Make HTTP requests
- Memory - Store key-value data
By the end, your AI assistant will be able to use tools from all three servers through a single connection.
Prerequisites
- Node.js 18+ installed
- An MCP-compatible client (Claude Desktop, VS Code with Copilot, etc.)
Create a Project Directory
mkdir my-mcp-project
cd my-mcp-projectInitialize Configuration
Run the config command to create a starter configuration:
routermcp configThis creates routermcp.jsonc:
Configure Your Servers
Edit routermcp.jsonc with your servers:
{
// HTTP server settings (for HTTP mode)
"httpServer": {
"port": 5151,
"host": "127.0.0.1"
},
// Your MCP servers
"mcpServers": {
// Filesystem access
"filesystem": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "./"],
"filter": {
"tools": {
"include": ["read_file", "list_directory", "search_files"]
}
}
},
// HTTP fetching
"fetch": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch"]
},
// In-memory storage
"memory": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}The filter on filesystem restricts it to read-only operations. Remove it if you want full access.
Test Your Configuration
Start RouterMCP to verify everything works:
routermcp --httpYou should see output like:
RouterMCP Gateway v1.x.x
Connecting to 3 upstream servers...
✓ filesystem (stdio)
✓ fetch (stdio)
✓ memory (stdio)
HTTP server listening on http://127.0.0.1:5151Press Ctrl+C to stop.
Connect Claude Desktop
Add RouterMCP to your Claude Desktop configuration.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"my-project": {
"command": "routermcp",
"args": [],
"cwd": "/path/to/my-mcp-project"
}
}
}Restart Claude Desktop to apply changes.
Verify the Connection
In Claude, you should now see your aggregated tools. Try asking:
"List the files in the current directory"
Claude will use the filesystem.list_directory tool through RouterMCP.
You can also try:
"Fetch the contents of https://example.com"
"Store the value 'hello' with key 'greeting' in memory"
Understanding Tool Names
Notice that tools are prefixed with the server name:
| Server | Original Tool | RouterMCP Tool |
|---|---|---|
| filesystem | read_file | filesystem.read_file |
| fetch | fetch | fetch.fetch |
| memory | store | memory.store |
This namespacing prevents conflicts if multiple servers have tools with the same name.
Next Steps
Now that you have a working setup:
- Add filtering to control which tools are exposed
- Enable Code Mode for JavaScript execution
- Set up tunnels to expose your gateway to the internet
- Connect other clients like VS Code or Cursor