Skip to main content
RapidDev - Software Development Agency
mcp-tutorial

How to use multiple MCP servers together

Run multiple MCP servers simultaneously by adding them all to your host's configuration file. Each server runs as a separate process with its own client connection. The AI model sees tools from all servers and selects the right one based on the user's question. Plan your server selection carefully — consider tool naming conflicts, resource usage, and host-specific limits like Windsurf's 100-tool cap.

What you'll learn

  • How to configure multiple MCP servers across different hosts
  • How the AI model selects tools from multiple servers
  • How to handle tool naming conflicts and resource management
  • Best practices for planning a multi-server MCP setup
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate7 min read12 minClaude Desktop, Cursor, VS Code, Windsurf, Claude CodeMarch 2026RapidDev Engineering Team
TL;DR

Run multiple MCP servers simultaneously by adding them all to your host's configuration file. Each server runs as a separate process with its own client connection. The AI model sees tools from all servers and selects the right one based on the user's question. Plan your server selection carefully — consider tool naming conflicts, resource usage, and host-specific limits like Windsurf's 100-tool cap.

Combining Multiple MCP Servers for Powerful AI Workflows

The real power of MCP emerges when you run multiple servers together. A developer might connect filesystem (for code access), GitHub (for issues and PRs), PostgreSQL (for database queries), and Brave Search (for documentation lookup) — all simultaneously. The AI host manages all connections independently, and the model intelligently selects which tools to use based on the conversation. This tutorial covers multi-server setup, conflict resolution, and resource management.

Prerequisites

  • At least one MCP server already configured and working
  • Understanding of your host's configuration format (mcpServers vs servers)
  • An AI host installed (Claude Desktop, Cursor, VS Code, or Windsurf)

Step-by-step guide

1

Plan your server selection based on your workflow

Before adding servers, plan which ones you actually need. Start with your daily workflow: What data sources do you access? What actions do you perform? Map each to an MCP server. A typical developer setup includes 3-5 servers. More is not always better — each server adds startup time, memory usage, and tools for the model to consider. Focused server selection leads to better AI performance.

typescript
1// Common multi-server combinations:
2//
3// Web Developer:
4// filesystem + GitHub + brave-search + postgres
5//
6// Data Engineer:
7// filesystem + postgres + memory + custom-etl-server
8//
9// DevOps:
10// filesystem + GitHub + docker + sentry + slack
11//
12// Technical Writer:
13// filesystem + brave-search + memory + custom-docs-server

Expected result: You have a clear plan of which servers to connect and why.

2

Configure multiple servers in your host

Add all planned servers to your host's configuration file. Each server gets a unique name. The configuration format is the same regardless of how many servers you add — each is an independent entry in the mcpServers (or servers for VS Code) object.

typescript
1// Claude Desktop / Cursor (.cursor/mcp.json):
2{
3 "mcpServers": {
4 "filesystem": {
5 "command": "npx",
6 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
7 },
8 "github": {
9 "command": "docker",
10 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
11 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
12 },
13 "postgres": {
14 "command": "npx",
15 "args": ["-y", "@modelcontextprotocol/server-postgres"],
16 "env": { "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost/db" }
17 },
18 "brave-search": {
19 "command": "npx",
20 "args": ["-y", "@modelcontextprotocol/server-brave-search"],
21 "env": { "BRAVE_API_KEY": "key" }
22 }
23 }
24}
25
26// VS Code (.vscode/mcp.json) — same servers, different key:
27{
28 "servers": {
29 "filesystem": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"] },
30 "github": { "type": "stdio", "command": "docker", "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" } }
31 }
32}

Expected result: All servers are configured in your host's config file.

3

Understand how the AI selects tools from multiple servers

When multiple servers are connected, the host builds a unified tool registry. The AI model sees all tools from all servers with their names and descriptions. It selects the most appropriate tool based on the user's question. For example, if you ask 'What files changed in the last commit?', the model might use the GitHub server's tool to check commits and the filesystem server's tool to read the changed files. Clear, specific tool descriptions help the model make better choices.

Expected result: You understand that the model sees a flat list of tools from all servers and selects based on descriptions.

4

Handle tool naming conflicts

If two servers expose tools with the same name, the host must resolve the conflict. Behavior varies by host — some prefix tool names with the server name, others use the last-registered tool. The safest approach is to avoid conflicts by choosing servers that do not overlap. If you build custom servers, use specific, namespaced tool names like 'project_search_files' instead of generic names like 'search'.

typescript
1// Bad: generic tool names that conflict across servers
2server.tool("search", ...) // Which server's 'search'?
3server.tool("read", ...) // Conflicts with filesystem 'read'
4
5// Good: namespaced tool names
6server.tool("jira_search_issues", ...)
7server.tool("confluence_read_page", ...)

Expected result: You know how to prevent and handle tool naming conflicts.

5

Manage resource usage with multiple servers

Each MCP server runs as a separate process consuming CPU and memory. With many servers, this adds up. Monitor resource usage on your machine. For Windsurf, stay within the 100-tool limit. For all hosts, consider that the AI model's context window fills faster when it has many tools to describe. If you notice slow tool selection or high memory usage, reduce your server count.

typescript
1// Approximate resource usage per server:
2// npm/npx servers: ~50-100 MB RAM each
3// Docker servers: ~100-200 MB RAM each
4// Python servers: ~30-80 MB RAM each
5//
6// With 5 servers: ~250-500 MB total RAM
7// With 10 servers: ~500 MB - 1 GB total RAM

Expected result: You understand the resource implications of running multiple servers.

6

Create a cross-host compatible configuration

If you use multiple AI hosts (Cursor for coding, Claude Desktop for research), maintain consistent server configurations. The server definitions are identical — only the config file location and key name differ. For teams managing MCP across multiple tools, RapidDev can help standardize configurations and build shared infrastructure.

typescript
1// The same server definition works across hosts.
2// Only the file location and top-level key change:
3//
4// Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
5// Key: "mcpServers"
6//
7// Cursor: .cursor/mcp.json
8// Key: "mcpServers"
9//
10// VS Code: .vscode/mcp.json
11// Key: "servers"
12//
13// Windsurf: ~/.codeium/windsurf/mcp_config.json
14// Key: "mcpServers"
15//
16// Claude Code: .mcp.json
17// Key: "mcpServers"

Expected result: You can maintain consistent MCP configurations across multiple AI hosts.

Complete working example

.cursor/mcp.json
1{
2 "mcpServers": {
3 "filesystem": {
4 "command": "npx",
5 "args": [
6 "-y", "@modelcontextprotocol/server-filesystem",
7 "/Users/you/projects"
8 ]
9 },
10 "github": {
11 "command": "docker",
12 "args": [
13 "run", "-i", "--rm",
14 "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
15 "ghcr.io/github/github-mcp-server"
16 ],
17 "env": {
18 "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token"
19 }
20 },
21 "postgres": {
22 "command": "npx",
23 "args": ["-y", "@modelcontextprotocol/server-postgres"],
24 "env": {
25 "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/mydb"
26 }
27 },
28 "brave-search": {
29 "command": "npx",
30 "args": ["-y", "@modelcontextprotocol/server-brave-search"],
31 "env": {
32 "BRAVE_API_KEY": "your-brave-api-key"
33 }
34 },
35 "memory": {
36 "command": "npx",
37 "args": ["-y", "@modelcontextprotocol/server-memory"]
38 }
39 }
40}

Common mistakes when using multiple MCP servers together

Why it's a problem: Adding too many servers at once

How to avoid: Start with 2-3 essential servers, verify they work, then add more. Debugging multiple failing servers simultaneously is much harder than adding them incrementally.

Why it's a problem: Ignoring tool naming conflicts

How to avoid: Check tool names across all servers. If two servers expose a 'search' tool, the AI may call the wrong one. Use MCP Inspector to audit tool names from each server.

Why it's a problem: Not accounting for Windsurf's 100-tool limit

How to avoid: Count tools per server using MCP Inspector. Popular servers expose 5-20+ tools each. Five large servers can exceed 100 tools. Plan accordingly for Windsurf.

Why it's a problem: Forgetting that each host uses different config files

How to avoid: Cursor: .cursor/mcp.json. Claude Desktop: claude_desktop_config.json. VS Code: .vscode/mcp.json (with 'servers' key). Windsurf: ~/.codeium/windsurf/mcp_config.json. Claude Code: .mcp.json.

Best practices

  • Start with 2-3 essential servers and add more only when needed
  • Use specific, namespaced tool names in custom servers to avoid naming conflicts
  • Audit total tool count across servers, especially for Windsurf's 100-tool limit
  • Keep a documented list of your configured servers and their tool counts
  • Use project-level config for project-specific servers, global config for personal utilities
  • Monitor memory usage — each server process consumes 30-200 MB RAM
  • Maintain consistent server configurations across different AI hosts
  • Use MCP Inspector to audit each server's tools before adding it to your multi-server setup

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to run multiple MCP servers in Cursor simultaneously: filesystem, GitHub, PostgreSQL, Brave Search, and a custom server. Show me the complete .cursor/mcp.json config and explain how the AI selects tools from different servers. Also cover potential naming conflicts.

MCP Prompt

Help me plan a multi-server MCP setup. I need file access, GitHub integration, database queries, and web search. Show the configuration and explain how to handle resource usage and tool conflicts when running all servers at once.

Frequently asked questions

Is there a limit on how many servers I can run?

Claude Desktop and Cursor have no hard limit. Windsurf limits to 100 total tools across all servers. In practice, 3-7 servers is a good balance between capability and performance.

Do servers communicate with each other?

No. Each MCP server is an independent process with its own client connection. Servers do not share data or communicate directly. The AI model orchestrates data flow by calling tools from different servers sequentially.

What happens if one server crashes?

Other servers continue working normally. The host marks the crashed server as disconnected, and its tools become unavailable. Some hosts can auto-restart crashed servers on the next request.

Can I have the same server configured differently for different projects?

Yes. Use project-level config files (.cursor/mcp.json, .vscode/mcp.json) with different arguments or environment variables per project. For example, different PostgreSQL connection strings for different projects.

Can RapidDev help design multi-server MCP architectures?

Yes. RapidDev helps teams plan multi-server setups, build custom servers that complement existing ones, resolve tool conflicts, and create standardized configurations that work across Cursor, Claude Desktop, and VS Code.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.