MCP Servers
MCP (Model Context Protocol) extends Claude with external tools — GitHub, Slack, databases, Playwright, and more.
Add a Server
Section titled “Add a Server”# HTTP/hosted serverclaude mcp add --transport http sentry https://mcp.sentry.dev/mcp
# Local stdio server (runs a process)claude mcp add playwright -- npx -y @playwright/mcp@latest
# With environment variableclaude mcp add --env API_KEY=my-secret-key --transport http myapi https://api.example.com/mcp
# With auth headerclaude mcp add --transport http --header "Authorization: Bearer TOKEN" myapi https://api.example.com/mcpManage Servers
Section titled “Manage Servers”claude mcp list # list all serversclaude mcp list --verbose # include errors/warningsclaude mcp get sentry # show details for one serverclaude mcp remove sentry # remove a serverIn a session:
/mcp # manage MCP servers interactivelyScopes
Section titled “Scopes”claude mcp add --scope local ... # personal, this project (.claude.local.json)claude mcp add --scope project ... # team-shared (.mcp.json)claude mcp add --scope user ... # all your projects (~/.claude.json)Configuration Files
Section titled “Configuration Files”.mcp.json (project-shared)
Section titled “.mcp.json (project-shared)”{ "mcpServers": { "playwright": { "type": "stdio", "command": "npx", "args": ["-y", "@playwright/mcp@latest"] }, "sentry": { "type": "http", "url": "https://mcp.sentry.dev/mcp" }, "local-db": { "type": "stdio", "command": "/usr/local/bin/db-mcp-server", "args": ["--db", "postgres://localhost/myapp"] } }}settings.json (inline)
Section titled “settings.json (inline)”{ "mcpServers": { "github": { "type": "http", "url": "https://api.github.com/mcp" } }}Transport Types
Section titled “Transport Types”| Type | When to use | Config |
|---|---|---|
http | Hosted/cloud services | url field |
stdio | Local processes | command + args |
OAuth Authentication
Section titled “OAuth Authentication”claude mcp add --transport http github https://api.github.com/mcp/mcp# Select the server → AuthenticateTool Naming Convention
Section titled “Tool Naming Convention”MCP tools appear as mcp__<server>__<tool>, e.g.:
mcp__github__create_issuemcp__slack__send_messagemcp__playwright__screenshot
Use in permissions:
{ "permissions": { "allow": ["mcp__github__*"], "deny": ["mcp__slack__delete_*"] }}Popular MCP Servers
Section titled “Popular MCP Servers”| Server | Install command |
|---|---|
| Playwright (browser) | claude mcp add playwright -- npx -y @playwright/mcp@latest |
| GitHub | claude mcp add --transport http github https://api.github.com/mcp |
| Filesystem | claude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /path |
| Postgres | claude mcp add pg -- npx -y @modelcontextprotocol/server-postgres |
🧠 Quick Recall
Section titled “🧠 Quick Recall”- Trick: “MCP = a USB port for AI — plug a tool in, Claude gains the ability.”
👨🏫 Teach It
Section titled “👨🏫 Teach It”- Show:
/mcp→ connect the GitHub server → use one tool on a real repo. - They’ll trip on: “missing” tools that are just deferred — tool search loads schemas on demand.
Learning path: ⬅ 24-hooks-real-examples.md · Index · ➡ 26-mcp-real-examples.md
Written by Fenil Patel