What is MCP?
Model Context Protocol (MCP) is an open standard that defines how LLMs connect to external tools, databases, and APIs through a unified interface. Think of it as USB for AI — a standardized way to plug any tool into any model.
┌────────────────────────────────────────────────────────────┐
│ MCP Architecture │
├────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ LLM APPLICATION │ │
│ │ (Claude, GPT-4, Gemini, etc.) │ │
│ └──────────────────────┬───────────────────────────┘ │
│ │ │
│ MCP Protocol Layer │
│ (JSON-RPC over stdio) │
│ │ │
│ ┌───────────────┼───────────────┐ │
│ ▼ ▼ ▼ │
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
│ │ MCP Server │ │ MCP Server │ │ MCP Server │ │
│ │ │ │ │ │ │ │
│ │ Database │ │ GitHub │ │ Slack │ │
│ │ Connector │ │ Connector │ │ Connector │ │
│ └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ │
│ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │PostgreSQL│ │ GitHub │ │ Slack │ │
│ │ / Redis │ │ API │ │ API │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└────────────────────────────────────────────────────────────┘
Why MCP Matters for Enterprise AI
Before MCP, every LLM integration required custom code:
- Custom function calling schemas per model provider
- Bespoke API wrappers for each tool
- No standardization across different AI platforms
- Difficult to reuse integrations across projects
MCP solves this by providing:
- One protocol to connect any tool to any LLM
- Tool discovery — LLMs can browse available capabilities
- Schema validation — typed inputs and outputs
- Security boundaries — controlled access per server
MCP Server Structure
An MCP server exposes three primitives:
1. Tools
Actions the LLM can invoke:
{
"name": "query_database",
"description": "Execute a read-only SQL query",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string" },
"database": { "type": "string" }
},
"required": ["query", "database"]
}
}
2. Resources
Data the LLM can read (files, database schemas, documentation):
{
"uri": "db://production/schema",
"name": "Production Database Schema",
"mimeType": "application/json"
}
3. Prompts
Reusable prompt templates:
{
"name": "analyze_table",
"description": "Analyze a database table structure",
"arguments": [
{ "name": "table_name", "required": true }
]
}
Enterprise Deployment Pattern
┌─────────────────────────────────────────────────────────┐
│ Enterprise MCP Gateway │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌───────────┐ ┌─────────────────────────────┐ │
│ │ Auth │ │ Rate Limiter │ │
│ │ (OAuth2) │ │ + Audit Logger │ │
│ └─────┬─────┘ └──────────────┬──────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────────────────────────┐ │
│ │ MCP Router / Registry │ │
│ └──────┬──────────┬──────────┬────────────────┘ │
│ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ JIRA │ │Confluence│ │ SAP │ │
│ │ Server │ │ Server │ │ Server │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────┘
Key enterprise concerns:
- Authentication: OAuth2/RBAC per MCP server
- Audit logging: Every tool invocation tracked
- Rate limiting: Prevent runaway agent costs
- Data classification: Restrict access based on sensitivity
Building an MCP Server (Python)
from mcp.server import Server
from mcp.types import Tool, TextContent
server = Server("enterprise-db")
@server.tool()
async def query_database(query: str, database: str) -> list[TextContent]:
"""Execute a read-only SQL query against the specified database."""
# Validate query is read-only
if not is_read_only(query):
raise ValueError("Only SELECT queries are permitted")
results = await db.execute(query, database=database)
return [TextContent(type="text", text=format_results(results))]
@server.resource("db://{database}/schema")
async def get_schema(database: str) -> str:
"""Return the schema for the specified database."""
return await db.get_schema(database)
Key Takeaways
- MCP is becoming the universal standard for LLM-to-tool integration
- It enables composable AI systems where tools are mix-and-match
- Enterprise adoption requires a gateway layer for security and governance
- The protocol supports discovery — agents can find and use tools dynamically
- MCP servers are lightweight and focused — one server per integration concern