⏱ Reading time: ~13 min | 🗓 Updated: June 2026
What if your AI coding assistant could search your GitHub issues, update your Linear board, query your database, browse documentation, and run code in a sandboxed environment — all within a single session, without you copy-pasting between tools? That’s exactly what the Model Context Protocol (MCP) enables for Claude Code.
MCP has become one of the fastest-growing open source protocols of 2026, with over 2,000 community-built servers and adoption by every major AI coding tool. Google Trends shows MCP-related searches up 800%+ year-over-year. This guide explains what MCP is, how it works with Claude Code, which servers are most valuable for developers, and how to build your own custom MCP server.
What Is the Model Context Protocol?
MCP is an open standard created by Anthropic that defines how AI models communicate with external tools and data sources. Think of it as a universal adapter — like USB-C for AI: instead of each AI tool having proprietary integrations with every service, any MCP-compatible tool can connect to any MCP server.
Before MCP, connecting Claude to a database required writing custom code for that specific integration. With MCP, anyone can build a server that exposes database functionality via a standard protocol, and any MCP-compatible AI tool (Claude Code, Cursor, Claude Desktop, etc.) can use it immediately.
MCP Architecture
| Component | Role | Example |
|---|---|---|
| MCP Client | The AI tool that makes requests | Claude Code, Cursor, Claude Desktop |
| MCP Server | Exposes tools/resources to the AI | GitHub MCP server, PostgreSQL MCP server |
| Tools | Functions the AI can call | search_issues(), run_query(), create_pr() |
| Resources | Data the AI can read | File contents, database schemas, API docs |
| Prompts | Templates for common workflows | Pre-built prompts for code review, etc. |
How Claude Code Uses MCP
Claude Code has first-class MCP support. When you configure MCP servers, Claude can call their tools just like it calls built-in tools (read_file, bash, etc.). The agent loop extends naturally: Claude sees a task that requires querying a database, recognizes the PostgreSQL MCP tool is available, and calls it — no special prompting required.
Configuring MCP Servers in Claude Code
Add MCP servers to your settings.json using the mcpServers key:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-pat-here"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres",
"postgresql://localhost:5432/mydb"]
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem",
"/home/user/projects"]
}
}
}
Or use the CLI to add servers interactively:
# Add an MCP server via CLI
claude mcp add github -- npx -y @modelcontextprotocol/server-github
# List all configured servers
claude mcp list
# Remove a server
claude mcp remove github
The 10 Most Valuable MCP Servers for Developers
1. GitHub MCP Server
Package: @modelcontextprotocol/server-github
Gives Claude direct access to your GitHub repositories. Claude can search issues, read PR diffs, create branches, comment on PRs, and check CI status — all without you leaving the terminal. Invaluable for development workflows that involve GitHub Issues for task tracking.
# With GitHub MCP, you can ask Claude:
"Find all open issues labeled 'bug' assigned to me, prioritize them by
impact, and implement fixes for the top 3 in separate branches"
2. PostgreSQL MCP Server
Package: @modelcontextprotocol/server-postgres
Exposes your PostgreSQL database to Claude. Claude can introspect schemas, run read-only queries, analyze slow queries, suggest index improvements, and help write migrations. The server enforces read-only access by default for safety.
3. Filesystem MCP Server
Package: @modelcontextprotocol/server-filesystem
Provides scoped filesystem access. While Claude Code has native file tools, the Filesystem MCP server lets you expose specific directories with fine-grained read/write permissions — useful for restricting Claude to specific project directories in multi-project environments.
4. Brave Search MCP Server
Package: @modelcontextprotocol/server-brave-search
Gives Claude access to real-time web search via the Brave Search API. Invaluable for looking up current library documentation, Stack Overflow solutions, or researching new approaches without leaving Claude Code.
5. Linear MCP Server
Package: Community server at github.com/linear/linear-mcp
Connects Claude to your Linear project management board. Claude can read issues, update status, create new issues, add comments, and track progress — making it a genuine end-to-end development partner that moves tickets as work progresses.
6. Puppeteer/Browser MCP Server
Package: @modelcontextprotocol/server-puppeteer
Lets Claude control a real browser. This enables Claude to test web UIs by actually interacting with them, scrape documentation from complex SPAs, verify that deployed changes look correct, and run visual regression checks.
7. Slack MCP Server
Package: @modelcontextprotocol/server-slack
Allows Claude to read Slack channels (for context) and send messages. Useful for posting deployment summaries, test results, or code review findings directly to team channels as part of an automated workflow.
8. AWS KB Retrieval MCP Server
Retrieves context from AWS Bedrock Knowledge Bases, giving Claude access to your organization’s internal documentation, runbooks, and technical specifications — without embedding them in CLAUDE.md.
9. Docker MCP Server
Gives Claude the ability to list containers, read logs, inspect configurations, and manage Docker resources. Perfect for debugging containerized applications or implementing DevOps automation workflows.
10. Memory/Knowledge Graph MCP Server
Package: @modelcontextprotocol/server-memory
Provides persistent memory across Claude sessions via a local knowledge graph. Claude can store facts, decisions, and context that persist between sessions — solving the “fresh start every session” problem for long-running projects.
MCP Server Comparison
| Server | Use Case | Auth Required | Read/Write |
|---|---|---|---|
| GitHub | Issues, PRs, code | PAT token | Both |
| PostgreSQL | Database queries | Connection string | Read-only |
| Filesystem | File access | None | Both |
| Brave Search | Web search | API key | Read |
| Linear | Project management | API key | Both |
| Puppeteer | Browser automation | None | Both |
| Slack | Team messaging | Bot token | Both |
| Memory | Persistent context | None | Both |
Building a Custom MCP Server
Building your own MCP server lets you expose any internal tool, API, or data source to Claude. Here’s a minimal TypeScript MCP server that exposes a custom tool:
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
// Create the server
const server = new Server(
{ name: "my-internal-api", version: "1.0.0" },
{ capabilities: { tools: {} } }
);
// Define available tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "get_deployment_status",
description: "Get the current deployment status for a service",
inputSchema: {
type: "object",
properties: {
service: {
type: "string",
description: "Service name (e.g., 'api', 'frontend', 'worker')",
},
environment: {
type: "string",
enum: ["staging", "production"],
},
},
required: ["service", "environment"],
},
},
],
}));
// Handle tool calls
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === "get_deployment_status") {
const { service, environment } = request.params.arguments;
// Call your internal API here
const status = await fetchDeploymentStatus(service, environment);
return {
content: [{ type: "text", text: JSON.stringify(status, null, 2) }],
};
}
throw new Error("Unknown tool");
});
// Start the server
const transport = new StdioServerTransport();
await server.connect(transport);
Real-World MCP Workflows
Workflow 1: End-to-End Feature Development
# With GitHub + PostgreSQL + Linear MCP:
"Implement the feature from Linear ticket LIN-234.
Read the ticket for requirements, check the database schema for
related tables, implement the feature, write tests, create a PR,
and update the Linear ticket status to 'In Review'."
Workflow 2: Database Performance Investigation
# With PostgreSQL MCP:
"Our API response times have degraded. Query pg_stat_statements
to find the 5 slowest queries in the last hour. For each:
1. Show the query and its avg execution time
2. Explain the query plan
3. Suggest an index or rewrite that would improve performance
4. Write the migration to add the recommended index"
Workflow 3: Documentation Search + Code Generation
# With Brave Search MCP:
"I need to integrate Stripe's new Adaptive Pricing feature
(released last month). Search for the current API documentation,
understand the required parameters, then implement the integration
in src/services/payment.ts following our existing patterns."
Security Best Practices for MCP
- Use minimal permissions: Grant MCP servers only the access they need. Database servers should be read-only unless write access is explicitly required.
- Store credentials securely: Use environment variables for API keys and tokens, never hardcode them in settings.json. Use a secret manager (AWS Secrets Manager, 1Password CLI) to inject credentials.
- Scope filesystem access: The Filesystem MCP server should only expose specific project directories, never your entire home directory.
- Audit MCP server packages: Always verify community MCP servers before using them. Check the package repository, review the code, and pin specific versions.
- Use project-level config for team servers: Put team MCP servers in
.claude/settings.json(committed to git) so everyone has consistent tool access. Keep personal servers insettings.local.json.
MCP Gateway Options for Enterprise
For enterprise teams that need centralized MCP management, audit logging, and security controls, several MCP gateway solutions have emerged in 2026:
| Gateway | Key Feature | Best For |
|---|---|---|
| Cloudflare MCP Gateway | Remote MCP over HTTPS/SSE | Distributed teams |
| AWS Bedrock MCP | AWS-native security controls | AWS-centric enterprises |
| Maxim AI Gateway | Observability + rate limiting | Production monitoring |
| Truefoundry MCP | Authentication management | Multi-tenant environments |
Conclusion
MCP fundamentally changes the ceiling of what Claude Code can accomplish. A Claude Code session without MCP is a powerful coding assistant. A Claude Code session with the right MCP servers is an autonomous development platform that can span your entire toolchain — from issue tracking to database queries to deployment status to team communication.
Start with the GitHub MCP server if you use GitHub, or the PostgreSQL server if database work is a frequent task. Add one server at a time and observe how it changes your workflow. The official MCP documentation for Claude Code and the MCP servers GitHub repository are the best starting points for discovering available servers.
📚 Resources & Further Reading
Official Documentation
- Connect Claude Code to Tools via MCP — Official Docs
- Model Context Protocol Official Site
- Official MCP Servers Repository — GitHub
- Code Execution with MCP — Anthropic Engineering Blog
Community Resources
- 10 Best MCP Servers for Developers in 2026 — Firecrawl
- Claude Code MCP Setup: A Practical 2026 Guide — Nimbalyst
- Best MCP Gateways for Claude Code in 2026 — Maxim AI
- MCP Authentication in Claude Code 2026 Guide — Truefoundry