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
HTTP Servers (Recommended)
bash
claude mcp add --transport http <name> <url>
# Example: Notion integration
claude mcp add --transport http notion https://mcp.notion.com/mcpSSE 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.sqliteTIP
The -- separator distinguishes Claude flags from server commands.
Configuration Scopes
| Scope | Location | Sharing |
|---|---|---|
| Local | ~/.claude.json | Private |
| Project | .mcp.json | Team-shared |
| User | ~/.claude.json | All projects |
Use --scope flag to specify location:
bash
claude mcp add --scope project notion https://mcp.notion.com/mcpManagement 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)
/mcpAuthentication
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
| Setting | Value |
|---|---|
| Warning threshold | 10,000 tokens |
| Default maximum | 25,000 tokens |
| Override | MAX_MCP_OUTPUT_TOKENS |
Popular MCP Servers
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/issuesMCP Slash Commands
MCP prompts become slash commands:
/mcp__github__list_prs
/mcp__notion__search_pagesProject 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
- Check server status:
/mcp - Verify credentials and permissions
- Check network/firewall settings
- Review server logs
High Token Usage
- Reduce
MAX_MCP_OUTPUT_TOKENS - Filter queries to return less data
- Use pagination
Next Steps
- Hooks Reference - Automate workflows
- GitHub Integration - Git operations
- Environment Config - Setup guide