Model Context Protocol

Claude Code MCP Servers

Connect Claude Code to any external tool — GitHub, databases, Slack, browser automation, and 20+ more — with one-line install commands and ready-to-paste config snippets.

What is MCP?

MCP (Model Context Protocol) is an open standard from Anthropic that lets Claude Code call external tools and access real data sources. Instead of pasting content into prompts, Claude can directly query your database, read GitHub PRs, search the web, or control a browser — in real-time, during your conversation.

Each MCP server is a local process that exposes a set of tools. Claude Code starts them automatically when you open a session and can call their tools the same way it calls built-in tools like Read or Bash.

How to Add an MCP Server

The fastest way is the CLI:

# Add a server globally (available in all projects)
claude mcp add github -- npx -y @modelcontextprotocol/server-github

# Add a server per-project (committed to .claude/settings.json)
claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Or edit .claude/settings.json directly:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "ghp_yourtoken" }
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/you/projects"]
    }
  }
}

Official MCP Servers (Anthropic)

GitHub
Official
Read and write issues, PRs, files, and commits. Full GitHub API surface via natural language.
npx -y @modelcontextprotocol/server-github
Filesystem
Official
Direct read/write access to specified directories outside the project root.
npx -y @modelcontextprotocol/server-filesystem /path
PostgreSQL
Official
Query any Postgres database, inspect schemas, run migrations — all from Claude.
npx -y @modelcontextprotocol/server-postgres $DB_URL
Brave Search
Official
Real-time web search results in Claude's context. No hallucinations on current events.
npx -y @modelcontextprotocol/server-brave-search
Slack
Official
Read channels, search messages, post updates. Useful for standup automation and incident response.
npx -y @modelcontextprotocol/server-slack
Google Drive
Official
Read and search Google Docs, Sheets, and Drive files without leaving Claude Code.
npx -y @modelcontextprotocol/server-gdrive
SQLite
Official
Query local SQLite databases. Ideal for app data analysis and prototype schema exploration.
npx -y @modelcontextprotocol/server-sqlite
Puppeteer
Official
Control a real browser: navigate, click, screenshot, scrape — full headless automation.
npx -y @modelcontextprotocol/server-puppeteer

Community MCP Servers

Playwright
Community
Browser automation with Playwright — more reliable than Puppeteer for E2E test generation.
npx -y mcp-server-playwright
Linear
Community
Query issues, create tickets, update status. Keep Claude aligned with your sprint without copy-pasting.
npx -y @linear/mcp-server
Sentry
Community
Fetch live error traces and stack details directly into Claude for faster root-cause debugging.
npx -y mcp-server-sentry
Cloudflare
Community
Manage Workers, KV, D1, R2 from Claude. Deploy edge functions by describing what you want.
npx -y @cloudflare/mcp-server-cloudflare
Vercel
Community
List deployments, inspect build logs, manage environment variables without leaving your editor.
npx -y @vercel/mcp-adapter
Redis
Community
Get/set keys, inspect TTLs, debug pub/sub. Essential for cache layer debugging.
npx -y mcp-server-redis

Securing MCP Servers

MCP servers run with the same permissions as your shell. Follow these practices:

Building a Custom MCP Server

Any process that speaks MCP JSON-RPC over stdio is a valid server. Minimal TypeScript example:

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new Server({ name: "my-tool", version: "1.0.0" }, {
  capabilities: { tools: {} }
});

server.setRequestHandler("tools/list", async () => ({
  tools: [{ name: "hello", description: "Say hello", inputSchema: {
    type: "object", properties: { name: { type: "string" } }, required: ["name"]
  }}]
}));

server.setRequestHandler("tools/call", async (req) => ({
  content: [{ type: "text", text: `Hello, ${req.params.arguments.name}!` }]
}));

await server.connect(new StdioServerTransport());

Register it: claude mcp add hello -- node /path/to/server.js

Browse All Claude Code Skills

Slash commands, hooks, MCP servers, and automation patterns — all in one place.

Open Claude Skills Browser →

Related Guides

⚡ Using Claude Code? 30 power prompts that 2× your output · £5 £3 first 10Get PDF £3 →