Skip to content

MCP Servers

MCP (Model Context Protocol) extends Claude with external tools — GitHub, Slack, databases, Playwright, and more.

Terminal window
# HTTP/hosted server
claude 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 variable
claude mcp add --env API_KEY=my-secret-key --transport http myapi https://api.example.com/mcp
# With auth header
claude mcp add --transport http --header "Authorization: Bearer TOKEN" myapi https://api.example.com/mcp
Terminal window
claude mcp list # list all servers
claude mcp list --verbose # include errors/warnings
claude mcp get sentry # show details for one server
claude mcp remove sentry # remove a server

In a session:

Terminal window
/mcp # manage MCP servers interactively
Terminal window
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)
{
"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"]
}
}
}
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.github.com/mcp"
}
}
}
TypeWhen to useConfig
httpHosted/cloud servicesurl field
stdioLocal processescommand + args
Terminal window
claude mcp add --transport http github https://api.github.com/mcp
/mcp
# Select the server → Authenticate

MCP tools appear as mcp__<server>__<tool>, e.g.:

  • mcp__github__create_issue
  • mcp__slack__send_message
  • mcp__playwright__screenshot

Use in permissions:

{
"permissions": {
"allow": ["mcp__github__*"],
"deny": ["mcp__slack__delete_*"]
}
}
ServerInstall command
Playwright (browser)claude mcp add playwright -- npx -y @playwright/mcp@latest
GitHubclaude mcp add --transport http github https://api.github.com/mcp
Filesystemclaude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /path
Postgresclaude mcp add pg -- npx -y @modelcontextprotocol/server-postgres
  • Trick: “MCP = a USB port for AI — plug a tool in, Claude gains the ability.”
  • 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