MCP Protocol Guide
Connect Claude Code to external tools and services with Model Context Protocol.
What is MCP?
Model Context Protocol (MCP) is an open protocol that connects Claude Code to external tools and data sources. Think of it as a USB port for AI β plug in databases, APIs, browsers, and any custom tool to extend Claude's capabilities.
π What You Can Connect
- Supabase database operations
- GitHub issues and PR management
- Slack team communication
- File system operations
- PostgreSQL database management
- Notion pages and document management
- Web browser automation
- Any tool with an MCP server
π‘ How It Works: Use 'claude mcp add' to connect servers, or configure .mcp.json in your project. Claude discovers available tools and uses them when relevant to your request.
π MCP Tool Search (Auto Mode)
When MCP tools exceed 10% of context, they are automatically deferred. Claude searches for the right tool when needed, saving significant context window space.
Configure threshold: mcpToolSearch: 'auto:N' where N = 0-100 percentπ Transport Protocols
HTTP is the recommended transport. SSE (Server-Sent Events) is deprecated. Also supports stdio for local processes and WebSocket (ws) for real-time connections.
// New HTTP transport (Recommended)"url": "http://localhost:3000/mcp""transport": "http"// SSE transport - DEPRECATED@ MCP Resource Mentions
Use @ syntax to reference MCP resources directly in your prompts. Claude resolves the resource and includes its content.
claude> @database/users @supabase://tables/users β analyze table structureclaude> @github/issues @github://issues?state=open β view recent issues/ MCP Prompts as Slash Commands
MCP server prompts are automatically registered as slash commands. Type / to see available commands from connected servers.
/supabase/create-migration, /github/review-prPopular MCP Servers
The most useful MCP servers for development workflows:
π₯ Essential MCP Servers
Supabase MCP
Direct database operations, schema management, Edge Functions, and real-time subscriptions.
Create tables and design schemasQuery and analyze user dataGitHub MCP
Complete GitHub integration for repositories, issues, pull requests, and actions.
Convert issues to PRs automaticallyGenerate release notes from commitsπ High-Value MCP Servers
Slack MCP
Team communication, channel management, and automated notifications.
Send deployment notificationsShare error reports with teamPostgreSQL MCP
Advanced database operations, performance tuning, and data analysis.
Optimize slow queriesGenerate database diagramsβ‘ Pro Tip: Start with GitHub and Supabase MCPs for immediate value. Use MCP Tool Search to keep context lean when connecting many servers.
MCP Protocol Tutorials
Master Supabase MCP
Connect Supabase to Claude Code and automate your entire backend development workflow.
1. Quick Setup
claude mcp add supabase-e SUPABASE_ACCESS_TOKEN=your_tokennpx -y @supabase/mcp-server-supabase@latestConnect with your Supabase personal access token (generate from Settings > Access Tokens)
2. Practical Usage Examples
claude> Create a table to store blog postsSchema design > Table creation > RLS policy setup
claude> Create and deploy user authentication Edge FunctionFunction writing > Testing > Live deployment
claude> Analyze current database usage and costsUsage query > Cost calculation > Optimization suggestions
claude> Set up real-time subscriptions for users tableEnable Realtime > Configure subscription > Create event listeners
π Pro Tip: Advanced commands like 'Analyze database costs' and 'Optimize slow queries' are also available!
Complete Workflow Automation
Connect GitHub + Supabase + Slack to automate the full cycle: Issue > Code Fix > Deploy > Team Notification.
Connect GitHub
claude mcp add githubConnect Supabase
claude mcp add supabaseConnect Slack
claude mcp add slackπ― Full Automation Example
claude>Analyze GitHub issue #42, fix it, deploy, and notify Slack #devAnalyze issue content and find related code files
Write bug fix code and tests
Create PR on GitHub and merge
Deploy Edge Function to Supabase
Send completion notification to Slack channel
π‘ Additional Workflow Examples
Backup database daily at 9 AM and notify Slack with resultsAutomated regular backups
When new PR opens, automatically run tests and comment resultsCI/CD automation
If database performance slows, auto-optimize and report to teamPerformance monitoring automation
β‘ Real-World Case: Teams report reducing bug fix time from hours to minutes using MCP-powered automation workflows.