Skip to main content

What is MCP?

Model Context Protocol (MCP) is Anthropic’s standard for connecting AI assistants to external tools and data sources. It enables agents to:
  • Query databases directly
  • Interact with APIs
  • Access file systems
  • Control browsers
  • Connect to any custom service

Configuration

Location

MCP servers are configured in .claude/settings.json:

Global vs Project

Common MCP Servers

Supabase

Tools provided:
  • list_projects, get_project
  • execute_sql, apply_migration
  • list_tables, list_extensions
  • deploy_edge_function

Chrome DevTools

Tools provided:
  • take_screenshot, take_snapshot
  • click, fill, navigate_page
  • evaluate_script
  • list_console_messages

Firecrawl (Web Scraping)

Tools provided:
  • firecrawl_scrape - Extract page content
  • firecrawl_search - Search the web
  • firecrawl_map - Discover URLs on a site
  • firecrawl_crawl - Crawl multiple pages

Grafana

Tools provided:
  • search_dashboards, get_dashboard_by_uid
  • query_prometheus, query_loki_logs
  • list_alert_rules, list_incidents

Context7 (Documentation)

Tools provided:
  • resolve-library-id - Find library documentation
  • query-docs - Search library docs

Environment Variables

Reference Variables

Use ${VAR_NAME} syntax to reference environment variables:

Security Best Practices

  • Store secrets in .env (git-ignored)
  • Use ${VAR} references, not hardcoded values
  • Rotate API keys regularly
  • Use minimal required permissions
Never commit API keys in settings.json - always use environment variable references.

Custom MCP Servers

Building Your Own

Create a custom MCP server for your tools:

Registering Custom Servers

Permissions

Tool Approval

Configure which MCP tools auto-approve in settings:

Permission Patterns

Debugging

Check Server Status

Common Issues

Verbose Logging

Squad Integration

Per-Squad MCP Servers

squads-cli resolves each squad’s MCP config through a three-tier lookup, falling back to the next tier if the current one is missing:
  1. User override~/.claude/mcp-configs/{squad}.json
  2. Generated from context~/.claude/contexts/{squad}.mcp.json (built from a squad’s context.mcp list)
  3. Fallback — your global ~/.claude.json
The CLI ships with an empty server registry by design — it prefers CLI tools (gh, gcloud, psql, …) over MCP wherever a good CLI alternative exists, and only reaches for MCP servers you explicitly configure.

Agent-Specific Tools

Best Practices

  • Start with official MCP servers before building custom
  • Use project-level config for project-specific tools
  • Document required environment variables
  • Test MCP servers independently before integration
  • Limit tool permissions to minimum required

Secrets Management

Secure API keys for MCP servers

Hooks

Automate actions around tool calls