Skip to content

MCP (Model Context Protocol)

MCP is an open-source standard enabling AI-tool connections. MCP servers give Claude Code access to your tools, databases, and APIs.

What You Can Do

With MCP servers, you can:

  • Implement features from issue trackers
  • Analyze monitoring data (Sentry, etc.)
  • Query databases directly
  • Integrate design tools (Figma)
  • Automate workflows (Gmail, Slack)

Installation Methods

bash
claude mcp add --transport http <name> <url>

# Example: Notion integration
claude mcp add --transport http notion https://mcp.notion.com/mcp

SSE Servers (Deprecated)

bash
claude mcp add --transport sse <name> <url>

Local Stdio Servers

bash
claude mcp add --transport stdio <name> -- <command>

# Example: Local SQLite server
claude mcp add --transport stdio sqlite -- npx @anthropic/mcp-sqlite /path/to/db.sqlite

TIP

The -- separator distinguishes Claude flags from server commands.

Configuration Scopes

ScopeLocationSharing
Local~/.claude.jsonPrivate
Project.mcp.jsonTeam-shared
User~/.claude.jsonAll projects

Use --scope flag to specify location:

bash
claude mcp add --scope project notion https://mcp.notion.com/mcp

Management Commands

bash
# List all servers
claude mcp list

# Get server details
claude mcp get <name>

# Remove a server
claude mcp remove <name>

# Check status (interactive mode)
/mcp

Authentication

OAuth 2.0 is supported. Use /mcp in Claude Code to authenticate with remote servers.

Environment Variables

Configure in .mcp.json:

json
{
  "mcpServers": {
    "myserver": {
      "command": "node",
      "args": ["server.js"],
      "env": {
        "API_KEY": "${MY_API_KEY}",
        "DEBUG": "${DEBUG:-false}"
      }
    }
  }
}

Syntax:

  • ${VAR} - Expands to environment variable
  • ${VAR:-default} - Falls back to default value

Output Limits

SettingValue
Warning threshold10,000 tokens
Default maximum25,000 tokens
OverrideMAX_MCP_OUTPUT_TOKENS

Official Servers

  • SQLite - Database queries
  • Filesystem - File operations
  • Memory - Persistent memory
  • GitHub - Repository management

Community Servers

  • Notion - Note management
  • Sentry - Error monitoring
  • Figma - Design integration
  • Slack - Team communication

Using Resources

Reference MCP resources with @ syntax:

@memory://notes/project-plan
@github://repos/myorg/myrepo/issues

MCP Slash Commands

MCP prompts become slash commands:

/mcp__github__list_prs
/mcp__notion__search_pages

Project Configuration

Create .mcp.json in project root:

json
{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": ["@anthropic/mcp-sqlite", "./data.db"]
    },
    "github": {
      "url": "https://mcp.github.com/mcp",
      "transport": "http"
    }
  }
}

Enterprise Configuration

Administrators can deploy managed-mcp.json:

  • Control accessible MCP servers
  • Prevent unauthorized additions
  • Enforce allowlists/denylists

WARNING

Enterprise configuration has highest precedence and cannot be overridden.

Troubleshooting

Server Not Connecting

  1. Check server status: /mcp
  2. Verify credentials and permissions
  3. Check network/firewall settings
  4. Review server logs

High Token Usage

  • Reduce MAX_MCP_OUTPUT_TOKENS
  • Filter queries to return less data
  • Use pagination

Next Steps

Claude Code Documentation Hub