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.

NEW in 2.1

πŸ” 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
UPDATED

πŸ”— 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
NEW

@ 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 structure
claude> @github/issues @github://issues?state=open β€” view recent issues
NEW

/ 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-pr

Popular MCP Servers

The most useful MCP servers for development workflows:

πŸ”₯ Essential MCP Servers

S

Supabase MCP

Direct database operations, schema management, Edge Functions, and real-time subscriptions.

Create tables and design schemas
Query and analyze user data
G

GitHub MCP

Complete GitHub integration for repositories, issues, pull requests, and actions.

Convert issues to PRs automatically
Generate release notes from commits

πŸ’Ž High-Value MCP Servers

S

Slack MCP

Team communication, channel management, and automated notifications.

Send deployment notifications
Share error reports with team
P

PostgreSQL MCP

Advanced database operations, performance tuning, and data analysis.

Optimize slow queries
Generate 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@latest

Connect with your Supabase personal access token (generate from Settings > Access Tokens)

2. Practical Usage Examples

claude> Create a table to store blog posts

Schema design > Table creation > RLS policy setup

claude> Create and deploy user authentication Edge Function

Function writing > Testing > Live deployment

claude> Analyze current database usage and costs

Usage query > Cost calculation > Optimization suggestions

claude> Set up real-time subscriptions for users table

Enable 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.

1
Connect GitHub
claude mcp add github
2
Connect Supabase
claude mcp add supabase
3
Connect Slack
claude mcp add slack

🎯 Full Automation Example

claude>Analyze GitHub issue #42, fix it, deploy, and notify Slack #dev

Analyze 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 results

Automated regular backups

β–Έ
When new PR opens, automatically run tests and comment results

CI/CD automation

β–Έ
If database performance slows, auto-optimize and report to team

Performance monitoring automation

⚑ Real-World Case: Teams report reducing bug fix time from hours to minutes using MCP-powered automation workflows.

Ready to Get Started with MCP?