The State of MCP with Claude in 2026
The Model Context Protocol has matured significantly since its introduction. In 2026, MCP works across the entire Claude product line - Claude Desktop, Claude Code CLI, claude.ai on the web, and the Claude API. Each product has its own way of connecting to MCP servers, and this guide covers all of them with complete configurations you can copy and use immediately.
What has changed in 2026:
- Streamable HTTP transport replaces SSE as the standard for remote servers. It is simpler, more reliable, and works behind corporate proxies.
- FastMCP Python SDK is now the recommended way to build custom servers (not the old
mcp.server.Serverclass). - Remote servers are production-ready. You can host MCP servers centrally and connect from any Claude product.
- Claude Code CLI supports
claude mcp addfor instant server setup without editing config files. - OAuth-based authentication for remote MCP servers is now standardized, replacing ad-hoc API key passing.
- 40+ official and community servers are available in the MCPgee directory.
This guide assumes you are starting fresh. If you have an existing MCP setup from 2025, skip to the "Migration Guide from 2025 to 2026" section.
Comparing Claude Products for MCP
Before diving into setup, understand which Claude product fits your use case. Each supports MCP differently:
| Feature | Claude Desktop | Claude Code CLI | claude.ai (Web) | Claude API |
|---|---|---|---|---|
| MCP support | Full (local + remote) | Full (local + remote) | Remote only (via integrations) | Via tool definitions (manual bridging) |
| Server management | Automatic (start/stop/restart) | Automatic + CLI commands | N/A (remote only) | Manual (you run servers) |
| Configuration | JSON config file | CLI command or JSON file | Web UI settings | Code-level integration |
| Transport types | stdio, Streamable HTTP | stdio, Streamable HTTP | Streamable HTTP | Any (you control the client) |
| Best for | General use, non-developers | Developers, coding tasks | Quick access, no install | Custom apps, automation |
| Pricing | Free (Pro plan recommended) | Free (uses API credits) | Free / Pro plan | Pay per token |
MCP with Claude Desktop
Claude Desktop is the easiest way to use MCP. It supports local MCP servers via stdio transport and remote servers via Streamable HTTP, with automatic server lifecycle management.
Step 1: Find Your Config File
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
If the file does not exist, create it with an empty JSON object: {}
Step 2: Add Your First MCP Server
Start with the Filesystem server - it is the most universally useful and requires no API keys:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/projects"
]
}
}
}
Step 3: Build a Full Configuration
Here is a recommended config with five servers covering the most common workflows:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your_brave_api_key"
}
},
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}
Step 4: Connect a Remote Server (New in 2026)
You can now connect to remote MCP servers using Streamable HTTP transport directly in Claude Desktop:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
},
"team-database": {
"url": "https://mcp.yourcompany.com/postgres",
"headers": {
"Authorization": "Bearer your-team-auth-token"
}
}
}
}
Remote servers use the url field instead of command/args. No local process is started - the client communicates with the remote server over HTTP.
Step 5: Restart and Verify
Restart Claude Desktop completely (quit and reopen, not just close the window). Look for the hammer icon in the chat input area - this indicates MCP tools are available. Click it to see all registered tools from your servers. If the icon does not appear, check your config file syntax.
Claude Desktop Tips
- Each local server runs as a separate process. You can see them in Activity Monitor (macOS) or Task Manager (Windows).
- Servers start when Claude Desktop launches and stop when it quits.
- If a server crashes, Claude Desktop will attempt to restart it automatically.
- Logs are available at
~/Library/Logs/Claude/mcp*.log(macOS) for debugging. - You can mix local and remote servers in the same config file.
MCP with Claude Code CLI
Claude Code is Anthropic's CLI tool for developers. It has first-class MCP support with the simplest setup process of any Claude product.
Adding Servers with the CLI
Claude Code has a built-in command for adding MCP servers - no config file editing needed:
# Add the Filesystem server
claude mcp add filesystem npx -y @modelcontextprotocol/server-filesystem /path/to/project
# Add the GitHub server with environment variable
claude mcp add github npx -y @modelcontextprotocol/server-github \
--env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token
# Add the PostgreSQL server
claude mcp add postgres npx -y @modelcontextprotocol/server-postgres \
"postgresql://user:pass@localhost:5432/mydb"
# Add a remote server (new in 2026)
claude mcp add team-db --url https://mcp.company.com/postgres
# List all configured servers
claude mcp list
# Remove a server
claude mcp remove github
Project-Level vs Global Servers
Claude Code supports both project-level and global MCP servers:
# Add a server for the current project only (stored in .claude/mcp.json)
claude mcp add --scope project postgres npx -y @modelcontextprotocol/server-postgres "..."
# Add a server globally (available in all projects)
claude mcp add --scope global memory npx -y @modelcontextprotocol/server-memory
Project-level servers are ideal for database connections (different per project), while global servers work best for tools like Memory and GitHub that you want everywhere.
Complete Claude Code Setup for a Typical Project
# Global servers (run once, available everywhere)
claude mcp add --scope global memory npx -y @modelcontextprotocol/server-memory
claude mcp add --scope global github npx -y @modelcontextprotocol/server-github \
--env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token
claude mcp add --scope global sequential-thinking npx -y @modelcontextprotocol/server-sequential-thinking
# Project-specific servers (run in each project that needs them)
claude mcp add --scope project filesystem npx -y @modelcontextprotocol/server-filesystem .
claude mcp add --scope project postgres npx -y @modelcontextprotocol/server-postgres \
"postgresql://readonly:pass@localhost:5432/myapp"
Claude Code MCP Tips
- Claude Code launches servers on-demand when you start a session.
- Use
claude mcp listto see all configured servers and their status. - Server configs are stored in
.claude/mcp.json(project) or~/.claude/mcp.json(global). - You can also manually edit these JSON files - they use the same format as Claude Desktop.
- Claude Code automatically inherits global servers plus any project-level servers.
MCP with the Claude API
For programmatic use, the Claude API supports MCP through tool definitions. You run MCP servers yourself and bridge them to the API. This gives you maximum control but requires more setup.
Architecture
Unlike Claude Desktop and Claude Code (which manage MCP servers automatically), the Claude API requires you to:
- Run MCP servers yourself (locally or remotely)
- Connect to them using an MCP client library
- Convert MCP tools to Claude API tool definitions
- Handle tool call routing between Claude and your MCP servers
Python Example: Full Tool-Use Loop
import asyncio
from anthropic import Anthropic
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
# Connect to an MCP server
server_params = StdioServerParameters(
command="npx",
args=["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# List available tools and convert to Claude format
tools = await session.list_tools()
claude_tools = [
{
"name": tool.name,
"description": tool.description,
"input_schema": tool.inputSchema
}
for tool in tools.tools
]
# Start the conversation
client = Anthropic()
messages = [{"role": "user", "content": "List all Python files in the project and count the total lines of code"}]
# Tool-use loop: keep going until Claude is done
while True:
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=4096,
tools=claude_tools,
messages=messages
)
# If no tool use, we are done
if response.stop_reason == "end_turn":
for block in response.content:
if hasattr(block, 'text'):
print(block.text)
break
# Process tool calls
messages.append({"role": "assistant", "content": response.content})
tool_results = []
for block in response.content:
if block.type == "tool_use":
result = await session.call_tool(block.name, block.input)
tool_results.append({
"type": "tool_result",
"tool_use_id": block.id,
"content": str(result.content)
})
messages.append({"role": "user", "content": tool_results})
asyncio.run(main())
Connecting to Remote MCP Servers from the API
In 2026, you can connect to remote MCP servers using Streamable HTTP transport:
from mcp.client.streamable_http import streamablehttp_client
async def use_remote_server():
async with streamablehttp_client("https://mcp.example.com/mcp") as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# Convert and use with Claude API - same pattern as above
TypeScript API Example
import Anthropic from '@anthropic-ai/sdk';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
async function main() {
// Connect to MCP server
const transport = new StdioClientTransport({
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-filesystem', '/path/to/project'],
});
const mcpClient = new Client({ name: 'api-bridge', version: '1.0.0' }, {});
await mcpClient.connect(transport);
// Get tools
const { tools } = await mcpClient.listTools();
const claudeTools = tools.map(tool => ({
name: tool.name,
description: tool.description || '',
input_schema: tool.inputSchema,
}));
// Use with Claude API
const anthropic = new Anthropic();
const response = await anthropic.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 4096,
tools: claudeTools,
messages: [{ role: 'user', content: 'What files are in the project root?' }],
});
// Handle tool calls
for (const block of response.content) {
if (block.type === 'tool_use') {
const result = await mcpClient.callTool({ name: block.name, arguments: block.input });
console.log(`Tool ${block.name} result:`, result);
}
}
await mcpClient.close();
}
What's New in 2026
Streamable HTTP Transport
The old SSE (Server-Sent Events) transport is deprecated. Streamable HTTP is the new standard for remote MCP servers. Key advantages:
- Works behind corporate proxies and load balancers without issues
- Supports bidirectional communication over standard HTTP
- Better error handling and automatic reconnection
- Compatible with standard HTTP infrastructure (CDNs, API gateways, WAFs)
- Stateless mode available - no session management needed for simple servers
For local servers, stdio transport remains the default and recommended option. Streamable HTTP is for remote/hosted servers only.
FastMCP Python SDK
If you are building custom MCP servers in Python, use FastMCP - not the old from mcp.server import Server pattern:
from fastmcp import FastMCP
mcp = FastMCP("My Custom Server")
@mcp.tool()
def search_codebase(query: str) -> str:
"""Search the codebase for a query string."""
# Your implementation here
return results
@mcp.resource("config://app")
def get_app_config() -> str:
"""Return the application configuration."""
return json.dumps(config, indent=2)
mcp.run()
FastMCP handles tool registration, parameter validation, and transport setup automatically. It is to MCP what FastAPI is to REST APIs. For a complete guide to building custom servers, see our advanced server development guide.
Remote Servers
In 2026, you can deploy MCP servers to cloud infrastructure and connect to them from any Claude product. This is useful for:
- Team-shared servers (everyone connects to the same database MCP server)
- Servers that need persistent state (crawlers, monitors, knowledge bases)
- Servers that connect to services only accessible from specific networks (VPC-internal databases)
- Servers that need more resources than a laptop can provide (large-scale data processing)
Remote servers use Streamable HTTP transport and can be deployed to any platform that supports HTTP services - AWS Lambda, Cloudflare Workers, Railway, Fly.io, or a plain VPS.
OAuth Authentication for Remote Servers
Remote MCP servers in 2026 support standardized OAuth 2.0 authentication. Instead of passing raw API keys, clients authenticate through an OAuth flow:
# Claude Desktop config for an OAuth-protected remote server
{
"mcpServers": {
"team-tools": {
"url": "https://mcp.yourcompany.com/tools",
"auth": {
"type": "oauth2",
"client_id": "your-client-id",
"authorization_url": "https://auth.yourcompany.com/authorize",
"token_url": "https://auth.yourcompany.com/token",
"scopes": ["read", "write"]
}
}
}
}
Migration Guide from 2025 to 2026
If you have an existing MCP setup from 2025, here is what you need to change:
1. Replace SSE with Streamable HTTP (Remote Servers Only)
If you were using remote MCP servers via SSE transport, switch to Streamable HTTP:
# 2025 (deprecated)
{
"mcpServers": {
"remote-db": {
"url": "https://mcp.example.com/sse",
"transport": "sse"
}
}
}
# 2026 (current)
{
"mcpServers": {
"remote-db": {
"url": "https://mcp.example.com/mcp"
}
}
}
Local stdio servers do not need any changes.
2. Update Python Servers to FastMCP
If you built custom Python servers using the old pattern, migrate to FastMCP:
# 2025 (old pattern)
from mcp.server import Server
from mcp.server.stdio import stdio_server
server = Server("my-server")
@server.list_tools()
async def list_tools():
return [Tool(name="search", description="Search", inputSchema={...})]
@server.call_tool()
async def call_tool(name, arguments):
# handle tool calls
async with stdio_server() as (read, write):
await server.run(read, write)
# 2026 (FastMCP - recommended)
from fastmcp import FastMCP
mcp = FastMCP("my-server")
@mcp.tool()
def search(query: str) -> str:
"""Search for something."""
return results
mcp.run()
3. Update Node.js Versions
Most 2026 MCP servers require Node.js 20+. Update from Node.js 18 if you have not already:
# Check your version
node --version
# Update with nvm
nvm install 20
nvm use 20
nvm alias default 20
4. Adopt Project-Level Configs in Claude Code
If you were using only global configs in Claude Code, consider moving project-specific servers to .claude/mcp.json:
# Move a global server to project scope
claude mcp remove postgres # remove from global
claude mcp add --scope project postgres npx -y @modelcontextprotocol/server-postgres "..."
Recommended Servers by Use Case
| Use Case | Recommended Servers | Claude Product |
|---|---|---|
| Coding | Filesystem, GitHub, Git, Memory | Claude Code CLI |
| Data Analysis | PostgreSQL, SQLite, Google Drive | Claude Desktop |
| DevOps | AWS, Cloudflare, Grafana, Datadog | Claude Code CLI |
| Research | Brave Search, Fetch, Memory | Claude Desktop |
| Productivity | Notion, Slack, Google Drive, Jira | Claude Desktop |
| Custom Applications | Custom FastMCP server | Claude API |
Full Claude Desktop Config for 2026
Here is a comprehensive config file covering the most popular servers. Copy it, remove the servers you do not need, and fill in your credentials:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx" }
},
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "/Users/you/projects/myapp"]
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "DATABASE_URL": "postgresql://readonly:pass@localhost:5432/mydb" }
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": { "BRAVE_API_KEY": "your_key" }
},
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-xxx",
"SLACK_TEAM_ID": "T01234567"
}
},
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/mcp-server"],
"env": { "NOTION_API_KEY": "ntn_xxx" }
},
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
}
Best Practices for MCP with Claude
After setting up your MCP servers, follow these practices to get the best results:
Credential Security
- Never commit secrets: If you share your config file (e.g., in a team repo), use environment variable references instead of hardcoded tokens. Set the actual values in your shell profile.
- Use read-only credentials: For database servers, always use a read-only user. For GitHub, use fine-grained tokens scoped to specific repositories with minimal permissions.
- Rotate tokens regularly: Set a calendar reminder to rotate API keys and tokens every 90 days, especially for servers with write access.
Performance Optimization
- Limit the number of servers: Each server registers its tools with Claude, consuming tokens. Running 10 servers with 5 tools each means 50 tool descriptions in every conversation. Start with 3-5 servers and add more as needed.
- Use project-level configs in Claude Code: Only load the servers each project actually needs. A frontend project does not need a PostgreSQL server, and a data project does not need Puppeteer.
- Pre-install server packages: Instead of using
npx -y(which downloads on first run), install frequently used servers globally withnpm install -gfor faster startup.
Combining Servers Effectively
The real power of MCP emerges when you combine multiple servers in a single conversation. Here are effective combinations:
- Filesystem + GitHub + Sequential Thinking: Read code, check PR history, and reason through complex bugs methodically
- PostgreSQL + Brave Search + Memory: Query your data, search for industry benchmarks, and save findings for future reference
- Slack + GitHub + Notion: Summarize team discussions, check code changes, and update documentation in one workflow
Troubleshooting MCP with Claude
Hammer Icon Not Showing (Claude Desktop)
- Validate your JSON syntax - use
jsonlintor paste it into a JSON validator. A single missing comma breaks the entire config - Make sure you fully restarted Claude Desktop after editing the config (quit the app, not just close the window)
- Check that
npxis available in your PATH (runwhich npxin your terminal) - Review logs at
~/Library/Logs/Claude/mcp*.logon macOS or check the developer console
Server Starts but Tools Are Missing
The server might be crashing during tool registration. Common causes:
- Missing environment variables (API keys, tokens) - the server starts but cannot authenticate with the target service
- Network issues (cannot reach the service the server connects to)
- Version conflicts (the server requires a newer Node.js version - check with
node --version) - Permission errors (the server cannot access the path or resource you specified)
Slow Initial Response
The first query in a new session takes longer because:
npxdownloads the server package on first run (1-5 seconds)- The server connects to its target service (database, API)
- Tool descriptions are sent to Claude, consuming initial tokens
To speed up startup, install server packages globally: npm install -g @modelcontextprotocol/server-filesystem
"Connection Refused" for Remote Servers
- Verify the remote server URL is correct and the server is running
- Check that your firewall or VPN allows outbound HTTPS connections
- Ensure the authentication token or OAuth credentials are valid
- Try the URL in a browser or with curl to verify it responds:
curl -X POST https://mcp.example.com/mcp
Claude Code: "Server Not Found" After Adding
- Check the scope:
claude mcp listshows both project and global servers - Make sure you are in the right project directory (project-level servers only work in their project)
- Try removing and re-adding the server:
claude mcp remove name && claude mcp add name ...
What's Next
You now know how to set up MCP with every Claude product. Here are your next steps:
- Browse all MCP servers - find the right servers for your workflow
- Top 10 essential MCP servers - our curated list of the best servers for developers
- MCP with Cursor and VS Code - if you also use non-Claude editors
- Build a custom MCP server - create your own server for unique use cases
- Sequential Thinking server guide - enhance Claude's reasoning capabilities
- Best MCP servers for coding - our opinionated picks for developers
