What is MCP? Model Context Protocol Explained for Enterprise AI

TL;DRMCP (Model Context Protocol) is an open standard created by Anthropic for connecting AI applications to external data sources and tools. Replaces fragmented integrations with one universal protocol. Architecture: host (AI app) → clients (one per server) → servers (data sources and tools). Three primitives: Tools (executable functions — query DB, send Slack, search GitHub), Resources (data sources — files, records, API responses), Prompts (reusable templates). Built on JSON-RPC 2.0. Transport: stdio (local) or HTTP+SSE (remote). Capability negotiation on connection. Servers can request sampling (LLM calls) from client for agentic behaviors. Like LSP standardized language tooling across IDEs, MCP standardizes context and tool integration across AI applications. Pre-built servers: Google Drive, Slack, GitHub, Postgres, Puppeteer. Open-source SDKs: TypeScript, Python, Go, Java. Not Claude-only — any AI app can be an MCP host (Cursor, Zed, Replit, Windsurf, custom). For self-hosted AI, MCP servers connect agents to your knowledge base, document store, and APIs with security boundaries.

Anthropic open-sourced MCP in November 2024 to solve a fundamental problem: every AI application needs to connect to data sources, but each integration is custom, fragile, and non-reusable. MCP provides a universal protocol — one standard for connecting AI to any data source or tool.

IBM describes MCP as critical for AI agents to "operate autonomously and adapt dynamically to real-world environments." Databricks notes that MCP "reduces boilerplate integration code" and enables agents to "perform tasks using live data from popular enterprise systems."

MCP Architecture

flowchart TD subgraph Host["MCP Host (AI Application)"] LLM["LLM / Agent"] C1["Client 1"] C2["Client 2"] C3["Client 3"] LLM --> C1 LLM --> C2 LLM --> C3 end subgraph Servers["MCP Servers"] S1["Postgres Server
(tools + resources)"] S2["Slack Server
(tools + resources)"] S3["Knowledge Base Server
(tools + resources)"] end subgraph Primitives["Primitives Offered"] T["Tools
(executable functions)"] R["Resources
(data sources)"] P["Prompts
(templates)"] end C1 -->|"JSON-RPC 2.0"| S1 C2 -->|"JSON-RPC 2.0"| S2 C3 -->|"JSON-RPC 2.0"| S3 S1 --> T S1 --> R S2 --> T S2 --> R S3 --> T S3 --> R S3 --> P

MCP Primitives

Primitive What It Does Example Methods
Tools Executable functions AI can invoke query_database(sql), send_slack(channel, msg) tools/list, tools/call
Resources Data sources providing context file:///docs/policy.pdf, postgres://table/rows resources/list, resources/get
Prompts Reusable interaction templates summarize_document(doc), code_review(diff) prompts/list, prompts/get

Protocol Layers

Layer What It Handles Details
Data layer JSON-RPC 2.0 messages, lifecycle, primitives Tools, resources, prompts, notifications
Transport layer Communication mechanism stdio (local), HTTP+SSE (remote), WebSocket
Authorization Auth for HTTP-based transports OAuth 2.1, token-based
Capability negotiation Feature discovery on connect Client and server declare supported features

Client-Host-Server Architecture

Component Role Examples
Host AI application that manages clients Claude Desktop, Cursor, Windsurf, custom apps
Client One per server, maintains connection Created by host, isolated sessions
Server Provides tools, resources, prompts Postgres MCP, Slack MCP, GitHub MCP

The host controls:
- Client connection permissions and lifecycle
- Security policies and user consent
- AI/LLM integration and sampling
- Context aggregation across clients

Pre-Built MCP Servers

Server Tools Resources Enterprise Use Case
Postgres Query, insert, update Table schemas, row data Database access for AI agents
Google Drive Search, read, create files Document contents Knowledge base access
Slack Send message, search, list channels Message history Team communication integration
GitHub Search code, create PR, list issues Repository contents Code review, issue management
Git Diff, log, status, branch File contents Version control integration
Puppeteer Navigate, screenshot, click Page content Web scraping, testing
Filesystem Read, write, search files File contents Local document access
Memory Store, retrieve, search Knowledge entities Persistent agent memory

MCP vs Custom Integrations

Aspect Custom Integration MCP Server
Protocol Custom per source Standardized JSON-RPC 2.0
Discovery Hardcoded tools/list, resources/list
Reusability One-off Any MCP host can use it
Security Custom per integration Host-controlled consent and permissions
Composability Tightly coupled Mix and match servers
Maintenance Per-integration One protocol, many servers
Ecosystem None Pre-built servers + community

Building an MCP Server

from mcp.server import Server
from mcp.types import Tool, TextContent

server = Server("knowledge-base")

@server.list_tools()
async def list_tools() -> list[Tool]:
    return [
        Tool(
            name="search_documents",
            description="Search the enterprise knowledge base",
            inputSchema={
                "type": "object",
                "properties": {
                    "query": {"type": "string", "description": "Search query"},
                    "limit": {"type": "integer", "default": 10},
                },
                "required": ["query"],
            },
        ),
        Tool(
            name="get_document",
            description="Get full document content by ID",
            inputSchema={
                "type": "object",
                "properties": {
                    "doc_id": {"type": "string"},
                },
                "required": ["doc_id"],
            },
        ),
    ]

@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
    if name == "search_documents":
        results = await search_kb(arguments["query"], arguments.get("limit", 10))
        return [TextContent(type="text", text=json.dumps(results))]
    elif name == "get_document":
        doc = await get_doc(arguments["doc_id"])
        return [TextContent(type="text", text=doc.content)]

if __name__ == "__main__":
    import asyncio
    from mcp.server.stdio import stdio_server

    async def main():
        async with stdio_server() as (read, write):
            await server.run(read, write, server.create_initialization_options())

    asyncio.run(main())

MCP for Enterprise AI Checklist

  • [ ] Understand MCP architecture: host → clients → servers
  • [ ] Learn the three primitives: tools, resources, prompts
  • [ ] Install an MCP host: Claude Desktop, Cursor, or Windsurf
  • [ ] Connect pre-built servers: Postgres, Google Drive, Slack, GitHub
  • [ ] Test tool discovery: tools/list shows available tools
  • [ ] Test tool execution: tools/call invokes a function
  • [ ] Test resource access: resources/get reads data
  • [ ] Build a custom MCP server for your knowledge base
  • [ ] Use Python SDK or TypeScript SDK for server development
  • [ ] Expose pgvector search as an MCP tool
  • [ ] Expose FalkorDB graph queries as MCP tools
  • [ ] Connect Ollama as a local LLM host
  • [ ] Implement security boundaries: host controls consent
  • [ ] Configure user consent prompts for sensitive tool calls
  • [ ] Use stdio transport for local servers (simplest)
  • [ ] Use HTTP+SSE transport for remote/production servers
  • [ ] Implement OAuth 2.1 for remote server authentication
  • [ ] Test capability negotiation: verify features are discovered
  • [ ] Consider MCP security implications
  • [ ] Evaluate agentic AI governance for tool use
  • [ ] Connect to secure ingestion pipelines via MCP
  • [ ] Use MCP for AI SOP automation workflows
  • [ ] Consider AI agent action approval for sensitive tools
  • [ ] Deploy MCP servers as part of Docker Compose stack
  • [ ] Monitor MCP server health with platform monitoring
  • [ ] Consider self-hosted AI + MCP for data sovereignty
  • [ ] Evaluate vendor lock-in — MCP is open standard, no lock-in
  • [ ] Test with multiple MCP servers connected simultaneously
  • [ ] Document available tools and resources for your team

FAQ

What is the Model Context Protocol (MCP)?

MCP is an open standard created by Anthropic that enables AI applications to connect to external data sources and tools through a single, standardized protocol. It replaces fragmented integrations — instead of writing custom connectors for each data source (Google Drive, Slack, GitHub, Postgres), developers build or use MCP servers that expose data and capabilities through a universal protocol. MCP follows a client-host-server architecture: an AI application (host) creates clients that connect to MCP servers, which provide tools (executable functions), resources (data sources), and prompts (templates). Built on JSON-RPC 2.0. Open-source, with SDKs in TypeScript, Python, Go, and more.

How does MCP work?

MCP uses a client-host-server architecture. The host (e.g., Claude Desktop, an AI IDE) creates one client per MCP server. Each client maintains a stateful JSON-RPC 2.0 connection with its server. On connection, client and server negotiate capabilities (what features each supports). The client discovers available tools via tools/list, resources via resources/list, and prompts via prompts/list. When the AI model needs to perform an action, it calls a tool via tools/call. When it needs context, it reads a resource via resources/get. Servers can also request sampling (LLM calls) from the client for agentic behaviors. Transport: stdio (local) or HTTP+SSE (remote).

What are MCP primitives?

MCP defines three primitives that servers can offer: (1) Tools — executable functions the AI can invoke (e.g., query database, send Slack message, search GitHub). Tools have input schemas, return results, and are the primary way AI agents take action. (2) Resources — data sources that provide context (e.g., file contents, database records, API responses). Resources are identified by URIs and can be read by the AI. (3) Prompts — reusable templates that structure interactions (e.g., system prompts, few-shot examples). Prompts help standardize how users interact with the AI. Each primitive has discovery (list), retrieval (get), and execution (call) methods.

Is MCP only for Claude and Anthropic?

No. MCP is an open standard, not proprietary to Anthropic. While Anthropic created it and Claude Desktop was the first MCP host, the protocol is open-source with SDKs in TypeScript, Python, Go, Java, and more. Any AI application can be an MCP host: Claude Desktop, Cursor, Zed, Replit, Windsurf, or custom applications. Any data source can be an MCP server: pre-built servers exist for Google Drive, Slack, GitHub, Postgres, Puppeteer, and more. The goal is a universal standard — like how Language Server Protocol (LSP) standardized language tooling across IDEs, MCP standardizes context and tool integration across AI applications.

How does MCP benefit enterprise AI?

MCP benefits enterprise AI by: (1) Standardizing integrations — one protocol instead of custom connectors per data source, (2) Enabling agentic AI — AI agents can discover and use tools autonomously, (3) Maintaining security boundaries — the host controls permissions and user consent for each tool call, (4) Composability — connect multiple MCP servers (Google Drive + Slack + Postgres) to one AI application, (5) Reducing boilerplate — no custom integration code per data source, (6) Ecosystem — pre-built servers for popular enterprise systems. For self-hosted AI, MCP servers can connect to your internal knowledge base, document store, and APIs, giving AI agents secure access to enterprise data.


Want a self-hosted AI company brain that does all of this out of the box?
Book a demo →