Model Context Protocol (MCP) is Anthropic’s solution to a fundamental problem: Claude exists in isolation. It can read text you paste into it. But it can’t access your database. It can’t call your APIs. It can’t query your CRM.
MCP changes that.
With MCP servers, Claude Code gains direct access to: your databases, APIs, CRMs, data warehouses, monitoring tools, deployment platforms, anything with an API.
You describe what you need. Claude calls the API. Reads the response. Makes decisions based on what it learned. Calls another API. Takes action.
This transforms Claude from a smart autocomplete to a business orchestrator.
What Is MCP?
MCP is a protocol for exposing tools and resources to Claude Code.
Tools = functions Claude can call
Tool: get_user_by_id
Parameters: user_id (string)
Returns: {id, name, email, created_at, subscription_status}
Tool: update_user_subscription
Parameters: user_id (string), plan (string)
Returns: {success: boolean, new_subscription_status}
Resources = data Claude can read
Resource: database_schema
Returns: {tables, columns, indexes, relationships}
Resource: recent_errors_log
Returns: [{ timestamp, error_message, user_id }]
Claude Code sees all available tools and resources. When solving a problem, it calls whichever tools are relevant.
Example:
- User says: “Check if user [email protected] can upgrade to the Pro plan, and if so, do it.”
- Claude: “I’ll use the get_user_by_email tool to find the user, check their current plan, verify they’re eligible for upgrade, then use update_user_subscription to apply the change.”
- Claude calls get_user_by_email → Gets alice’s profile → Checks plan eligibility → Calls update_user_subscription → Returns success
All done without human intervention.
How MCP Works Technically
MCP has three components:
1. The MCP Server
Runs on your infrastructure (or Anthropic’s). Exposes tools and resources over a standard protocol.
Example: The Stripe MCP Server
- Tools: list_customers, create_charge, update_subscription, get_invoice
- Resources: customer_schema, recent_transactions, webhook_events
Stripe hosts this MCP server. Claude Code connects to it.
2. Transport
The communication layer between Claude Code and the MCP server.
Stdio: Server runs as a subprocess. Input via stdin, output via stdout.
- Best for: Local tools, simple integrations
- Examples: Custom local databases, internal APIs
SSE (Server-Sent Events): Server runs as a long-lived HTTP endpoint.
- Best for: Remote services, cloud integrations, Anthropic-hosted MCPs
- Examples: Stripe, Notion, GitHub, Slack
3. Configuration
Tell Claude Code which MCP servers to load.
Location: ~/.claude.json
{
"mcpServers": {
"stripe": {
"command": "npx",
"args": ["@modelcontextprotocol/server-stripe"],
"env": {
"STRIPE_API_KEY": "sk_test_..."
}
},
"supabase": {
"command": "npx",
"args": ["@modelcontextprotocol/server-supabase"],
"env": {
"SUPABASE_URL": "https://...",
"SUPABASE_API_KEY": "..."
}
},
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_..."
}
}
}
}
When Claude Code starts, it loads all configured MCP servers and makes their tools available.
Pre-Built MCP Servers You Can Use Today
Anthropic and the community have built 50+ MCP servers. Popular ones:
| Server | What it does | Cost |
|---|---|---|
| Supabase | Read/write databases, tables, rows | Free (with Supabase account) |
| GitHub | List repos, create issues, read PR diffs, post comments | Free (with GitHub account) |
| Stripe | List customers, create charges, manage subscriptions | Free (with Stripe account) |
| Notion | Read/write Notion databases and pages | Free (with Notion account) |
| Google Drive | Read/write files, sheets, docs | Free (with Google account) |
| Slack | Send messages, read channels, list users | Free (with Slack workspace) |
| OpenWeather | Current weather, forecasts, alerts | Free tier |
| Google Sheets | Read/write cells, create sheets, manage formatting | Free (with Google account) |
| Jira | List issues, create tickets, update status, add comments | Free (with Jira account) |
| PagerDuty | List incidents, acknowledge alerts, create incidents | Free tier |
Real Example: Building a Customer Onboarding Automation
Let’s say you have:
- Stripe (payment processing)
- Supabase (database)
- SendGrid (email)
- Slack (team communication)
Normally, onboarding a new customer requires manual steps:
- Create customer in Stripe
- Create user record in Supabase
- Send welcome email
- Post announcement in Slack
- Create task in Jira for the product team
Time: 30 minutes, error-prone.
With MCPs, you can delegate this to Claude:
User: "Onboard [email protected]. She's on the Pro plan ($99/month).
Her company is Acme Corp."
Claude calls:
1. stripe.create_customer({
email: "[email protected]",
plan: "pro"
})
→ Returns: customer_id = cus_12345
2. supabase.insert_row("users", {
stripe_id: "cus_12345",
email: "[email protected]",
company: "Acme Corp",
plan: "pro",
created_at: now()
})
→ Returns: user_id = u_789
3. sendgrid.send_email({
to: "[email protected]",
template: "welcome_email",
data: { first_name: "Alice", plan: "Pro" }
})
→ Returns: success
4. slack.post_message({
channel: "#sales",
text: "🎉 New customer: Acme Corp ([email protected], Pro plan)"
})
→ Returns: success
5. jira.create_issue({
project: "PRODUCT",
type: "Task",
title: "Onboard [email protected]",
assignee: "product-team"
})
→ Returns: issue_id = PROD-1234
Claude returns:
"Onboarding complete. Customer created in Stripe (cus_12345),
user created in Supabase (u_789), welcome email sent, team notified in Slack,
product task created (PROD-1234)."
One prompt. Five integrations. All wired together. No code to maintain.
Building Your Own MCP Server
Pre-built servers are great, but your custom tools are where the real power lives.
Example: Build an MCP server for your internal analytics database.
// mcp-server-analytics.ts
import Anthropic from "@anthropic-sdk/sdk";
const server = new MCPServer("analytics");
// Define a tool
server.addTool({
name: "get_monthly_revenue",
description: "Returns monthly recurring revenue for the business",
inputSchema: {
type: "object",
properties: {
year: { type: "number", description: "Year (e.g., 2026)" },
month: { type: "number", description: "Month (1-12)" }
},
required: ["year", "month"]
},
handler: async (params) => {
const result = await analyticsDB.query(
"SELECT SUM(mrr) FROM subscriptions WHERE year=? AND month=?",
[params.year, params.month]
);
return {
mrr: result.rows[0].sum,
year: params.year,
month: params.month
};
}
});
// Define a resource
server.addResource({
name: "revenue_dashboard",
description: "Current revenue metrics",
handler: async () => {
const current_mrr = await analyticsDB.query("SELECT SUM(mrr) FROM subscriptions WHERE active=true");
const churn_rate = await analyticsDB.query("SELECT churn_rate FROM metrics WHERE metric='monthly_churn'");
const customer_count = await analyticsDB.query("SELECT COUNT(*) FROM customers WHERE status='active'");
return {
current_mrr: current_mrr.rows[0].sum,
churn_rate: churn_rate.rows[0].churn_rate,
active_customers: customer_count.rows[0].count
};
}
});
server.start();
Now Claude Code has direct access to your analytics. Prompts like:
- “What was our revenue trend over the last 6 months?”
- “Which customer segments have the highest churn?”
- “What’s our current MRR and growth rate?”
All answered by Claude querying your analytics directly.
30-Minute MCP Project: Build One for Your SaaS
If you have a SaaS with a Postgres database, you can expose it to Claude in 30 minutes.
# 1. Install the Postgres MCP
npm install @modelcontextprotocol/server-postgres
# 2. Configure it in ~/.claude.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@host/dbname"
}
}
}
}
# 3. Restart Claude Code
# Done. Claude can now query your database.
Try it:
Claude: "What are the top 10 most-used features in our product?"
Claude queries: SELECT feature_name, COUNT(*) FROM user_events
GROUP BY feature_name ORDER BY count DESC LIMIT 10
Claude returns: [{ feature: "collaboration", count: 45000 }, ...]
Security: Keeping Your Data Safe
MCPs have access to your data. You need to be careful.
Best practices:
-
Principle of least privilege: Give each MCP server only the permissions it needs.
- If it only reads user names, don’t give it access to payment data.
-
Read-only by default: For analytics, logs, dashboards → read-only access.
- Only grant write access to tools you explicitly trust.
-
Environment variables for secrets: Never hardcode API keys.
{ "mcpServers": { "stripe": { "env": { "STRIPE_API_KEY": "${STRIPE_API_KEY}" // Read from ~/.claude.json secrets } } } } -
Audit logs: Track which MCPs are called and what data they access.
- Can be stored in your analytics database.
-
Sandbox critical operations: For destructive operations (delete, refund, reset password):
- Require explicit human approval
- Log the action
- Implement rollback capability
Example safe MCP config:
{
"stripe": {
"tools": {
"list_customers": { "access": "read" },
"get_customer": { "access": "read" },
"create_charge": { "access": "write", "requires_approval": true },
"refund": { "access": "write", "requires_approval": true }
}
}
}
Claude can call read-only tools freely. But for write operations, it needs human approval.
The MCP Multiplier
MCPs don’t just give Claude access to tools. They fundamentally change what Claude can do.
Without MCPs: Claude can write code. That’s useful.
With MCPs: Claude can read your data, run queries, call APIs, take action, and report back. That’s transformative.
One MCP per tool/service you use. Do the math:
- 10 tools × 5 actions per tool = 50 additional capabilities
- Each capability saves you 2-5 minutes per use
- 10 uses per day = 100-250 minutes saved per day = 1-2 hours per day
That’s 250-500 hours per year, per developer.
Summary: MCPs Are the Future of Integration
MCPs are how AI goes from “smart assistant” to “business operator.”
Start with 2-3 pre-built MCPs (Stripe, Supabase, GitHub). Get comfortable. Then build 1-2 custom MCPs for your internal tools.
Within a month, Claude Code will have deep access to your entire business stack. You’ll describe problems in English. Claude will solve them by orchestrating all your tools.
That’s the power of MCPs.
And it’s just the beginning. As more MCPs are built and open-sourced, the capabilities expand exponentially. By 2027, every business tool will have an MCP. Claude Code will be wired into your entire operation.
Build your first MCP this week. Start small (read-only access to one table). Iterate from there.
You’re building the infrastructure for AI-driven business automation. It’s worth the effort.