MCP Server Selection: Tools for Claude Code Workflow
A practical guide to selecting and configuring MCP servers for Claude Code. From essential servers to specialized tools, build your optimal development environment.
The Model Context Protocol (MCP) ecosystem has grown rapidly, with 80+ servers available for various purposes. Choosing the right combination can dramatically improve your Claude Code productivity—but selecting too many can bloat your context and slow things down.
This guide helps you pick the optimal MCP server combination for your specific needs.
Understanding MCP Context Cost
Before selecting servers, understand the trade-off:
More MCP Servers = More capabilities + Higher context cost
Each enabled MCP server:
- Adds tool definitions to Claude’s context (~500-2000 tokens per server)
- Increases startup time
- May conflict with other servers
Rule of Thumb: Start with 3-5 essential servers, add more only when needed.
The Essential Starter Kit
These servers provide maximum value with minimal context overhead:
1. Filesystem Server (Required)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "."]
}
}
}
Why: Core file operations. Claude Code needs this for reading and writing code files.
Context Cost: ~800 tokens
2. Memory Server (Highly Recommended)
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-memory"]
}
}
}
Why: Persistent knowledge across sessions. Store project context, decisions, and learned patterns.
Context Cost: ~600 tokens
Use When:
- Working on complex projects over multiple sessions
- Need to remember architectural decisions
- Want consistent behavior across sessions
3. Git Server (Recommended for Teams)
{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-git"]
}
}
}
Why: Enhanced git operations beyond basic CLI.
Context Cost: ~700 tokens
Use When:
- Working with team repositories
- Need intelligent commit suggestions
- Want branch management assistance
Server Categories and Selection
Category 1: Database Servers
| Server | Best For | Context Cost |
|---|---|---|
mcp-postgres | PostgreSQL databases | ~900 tokens |
mcp-supabase | Supabase projects | ~1100 tokens |
mcp-sqlite | Local SQLite DBs | ~600 tokens |
mcp-mongodb | MongoDB databases | ~800 tokens |
Selection Guide:
Choose ONE database server based on your stack:
- Supabase project? → mcp-supabase
- PostgreSQL backend? → mcp-postgres
- Local prototyping? → mcp-sqlite
- Document database? → mcp-mongodb
Configuration Example (Supabase):
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server"],
"env": {
"SUPABASE_URL": "${SUPABASE_URL}",
"SUPABASE_SERVICE_ROLE_KEY": "${SUPABASE_SERVICE_ROLE_KEY}"
}
}
}
}
Category 2: API & Integration Servers
| Server | Best For | Context Cost |
|---|---|---|
mcp-fetch | HTTP requests | ~500 tokens |
mcp-brave-search | Web search | ~600 tokens |
mcp-github | GitHub API | ~1200 tokens |
mcp-slack | Slack integration | ~700 tokens |
Selection Guide:
Add API servers based on workflow needs:
- Need web research? → mcp-brave-search
- GitHub-heavy workflow? → mcp-github
- Making API calls? → mcp-fetch
- Team communication? → mcp-slack
Configuration Example (GitHub):
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Category 3: Development Tools
| Server | Best For | Context Cost |
|---|---|---|
mcp-puppeteer | Browser automation | ~1000 tokens |
mcp-chromium-devtools | Chrome debugging | ~900 tokens |
mcp-docker | Container management | ~800 tokens |
mcp-kubernetes | K8s clusters | ~1100 tokens |
Selection Guide:
Add dev tools based on project type:
- E2E testing needed? → mcp-puppeteer
- Frontend debugging? → mcp-chromium-devtools
- Containerized app? → mcp-docker
- K8s deployment? → mcp-kubernetes
Category 4: Documentation & Knowledge
| Server | Best For | Context Cost |
|---|---|---|
mcp-context7 | Library docs | ~500 tokens |
mcp-notion | Notion workspace | ~700 tokens |
mcp-confluence | Atlassian docs | ~800 tokens |
Selection Guide:
Add knowledge servers when:
- Using unfamiliar libraries → mcp-context7
- Team uses Notion → mcp-notion
- Enterprise documentation → mcp-confluence
Configuration Example (Context7):
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp-server"]
}
}
}
Recommended Combinations
🎯 Solo Developer (Web App)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "."]
},
"memory": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-memory"]
},
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server"],
"env": {
"SUPABASE_URL": "${SUPABASE_URL}",
"SUPABASE_SERVICE_ROLE_KEY": "${SUPABASE_SERVICE_ROLE_KEY}"
}
}
}
}
Total Context Cost: ~2500 tokens
Why This Combo:
- Filesystem for code operations
- Memory for project knowledge persistence
- Supabase for database + auth + storage in one
🎯 Full-Stack Team
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "."]
},
"memory": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-memory"]
},
"git": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-git"]
},
"github": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-postgres"],
"env": {
"DATABASE_URL": "${DATABASE_URL}"
}
}
}
}
Total Context Cost: ~4200 tokens
Why This Combo:
- Core file + memory operations
- Git for version control
- GitHub for PR/Issue management
- PostgreSQL for production database
🎯 Data Analysis
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "."]
},
"sqlite": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-sqlite", "./data.db"]
},
"fetch": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-fetch"]
},
"brave-search": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-brave-search"],
"env": {
"BRAVE_API_KEY": "${BRAVE_API_KEY}"
}
}
}
}
Total Context Cost: ~2500 tokens
Why This Combo:
- Filesystem for data files
- SQLite for local data analysis
- Fetch for API data collection
- Brave Search for research
🎯 DevOps/Infrastructure
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "."]
},
"git": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-git"]
},
"docker": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-docker"]
},
"kubernetes": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-kubernetes"],
"env": {
"KUBECONFIG": "${KUBECONFIG}"
}
}
}
}
Total Context Cost: ~3400 tokens
Why This Combo:
- Core file + git operations
- Docker for container management
- Kubernetes for cluster operations
🎯 Frontend Developer
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "."]
},
"memory": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-memory"]
},
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp-server"]
},
"puppeteer": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-puppeteer"]
}
}
}
Total Context Cost: ~2900 tokens
Why This Combo:
- Core file + memory
- Context7 for React/Vue/framework docs
- Puppeteer for E2E testing
Context Optimization Strategies
Strategy 1: Lazy Loading
Don’t enable all servers at once. Use project-specific configs:
project-a/.claude/settings.json → Database servers
project-b/.claude/settings.json → Infrastructure servers
Strategy 2: Agent-Specific MCP
For advanced users, assign specific MCP servers to specific agents:
# CLAUDE.md
## Agent MCP Assignment
### security-auditor
- filesystem (read-only)
- No database access
### developer
- filesystem (full)
- database
- git
### doc-writer
- filesystem (read-only)
- context7
Note: This is a conceptual pattern. See Issue #17668 for the RFC on MCP Context Isolation.
Strategy 3: Environment-Based Configuration
# Development
export MCP_PROFILE=dev
claude --mcp-config ./mcp-dev.json
# Production
export MCP_PROFILE=prod
claude --mcp-config ./mcp-prod.json
Troubleshooting Common Issues
Issue: High Context Usage
Symptoms: “Context limit exceeded” or slow responses
Solutions:
- Check which servers are enabled:
claude --list-mcp - Remove unused servers
- Use project-specific configs instead of global
Issue: Server Startup Failures
Symptoms: “MCP server failed to start”
Solutions:
# Check if npx can find the package
npx -y @anthropic/mcp-filesystem --version
# Clear npx cache
rm -rf ~/.npm/_npx
# Check environment variables
env | grep -E "(SUPABASE|GITHUB|DATABASE)"
Issue: Permission Denied
Symptoms: “Access denied” from MCP server
Solutions:
- Check file permissions for target directories
- Verify API tokens have correct scopes
- Review MCP server documentation for required permissions
Issue: Conflicting Servers
Symptoms: Unexpected behavior, duplicate tool names
Solutions:
- Don’t use multiple database servers for the same database
- Check for tool name conflicts in server docs
- Use one server per category when possible
Advanced: Creating Custom MCP Servers
When existing servers don’t meet your needs:
Basic Custom Server Structure
// my-mcp-server.js
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const server = new Server({
name: "my-custom-server",
version: "1.0.0"
}, {
capabilities: {
tools: {}
}
});
// Define tools
server.setRequestHandler("tools/list", async () => ({
tools: [{
name: "my_tool",
description: "Does something useful",
inputSchema: {
type: "object",
properties: {
input: { type: "string" }
}
}
}]
}));
// Handle tool calls
server.setRequestHandler("tools/call", async (request) => {
if (request.params.name === "my_tool") {
return { content: [{ type: "text", text: "Result" }] };
}
});
// Start server
const transport = new StdioServerTransport();
await server.connect(transport);
When to Build Custom
Build custom MCP servers when:
- ✅ Need internal API integration
- ✅ Proprietary database access
- ✅ Company-specific tooling
- ✅ Specialized domain logic
Don’t build custom when:
- ❌ Existing server covers 80%+ of needs
- ❌ Just need minor modifications (fork instead)
- ❌ One-time use case (use fetch MCP instead)
Quick Reference: Popular Servers
| Server | Package | Key Feature |
|---|---|---|
| Filesystem | @anthropic/mcp-filesystem | File operations |
| Memory | @anthropic/mcp-memory | Persistent knowledge |
| Git | @anthropic/mcp-git | Version control |
| GitHub | @anthropic/mcp-github | GitHub API |
| PostgreSQL | @anthropic/mcp-postgres | SQL database |
| Supabase | @supabase/mcp-server | Full Supabase stack |
| Fetch | @anthropic/mcp-fetch | HTTP requests |
| Puppeteer | @anthropic/mcp-puppeteer | Browser automation |
| Context7 | @context7/mcp-server | Library docs |
| Brave Search | @anthropic/mcp-brave-search | Web search |
Getting Started Checklist
Today (10 minutes)
- ✅ Audit current MCP servers:
cat .claude/settings.json - ✅ Remove unused servers
- ✅ Verify essential servers are configured
This Week
- ✅ Set up project-specific MCP configs
- ✅ Test recommended combo for your use case
- ✅ Document your configuration in CLAUDE.md
This Month
- ✅ Monitor context usage patterns
- ✅ Optimize based on actual usage
- ✅ Consider custom MCP for repeated needs
Key Takeaways
- Start Small - Begin with 3-5 essential servers
- Match to Workflow - Select servers that fit your actual work
- Monitor Context - Track token usage and optimize
- Project-Specific - Use different configs for different projects
- Stay Updated - MCP ecosystem evolves rapidly
The right MCP combination can transform your Claude Code experience from good to exceptional. Take time to configure it well.
Related: MCP Context Efficiency, MCP Lazy Loading, MCP Director Mode Server