What MCP Actually Is
Anthropic open-sourced MCP in November 2024, and the analogy they used stuck: MCP is to AI apps what USB-C is to peripherals. Before it, connecting an AI assistant to your calendar, database, or files meant bespoke code per app per service. MCP standardizes the connection so:
- A service implements one MCP server, and every MCP client can use it.
- An app implements one client, and every MCP server plugs in.
- Tools, data resources, and context prompts all travel over the same protocol.
By 2026, the ecosystem is genuinely cross-vendor — the "Anthropic thing" label no longer applies.
The Architecture: Host, Client, Server
| Component | Role | Examples |
|---|---|---|
| MCP Host | The AI application the user talks to | Claude Desktop, Cursor, VS Code, your app |
| MCP Client | In-app connector — manages one server connection | One per connected server, inside the host |
| MCP Server | Exposes tools, resources, and prompts | Filesystem, GitHub, Slack, ChromaDB, databases |
Servers speak JSON-RPC over two transports: stdio (local child process — the privacy-friendly mode) and Streamable HTTP (remote services). Capabilities are advertised at connection time, so clients know what a server offers without guessing.
Why MCP Matters for Local AI
💡 The local-AI angle: a stdio MCP server is a child process on your machine. It can touch your files, your vector store, your local tools — and nothing leaves. That's the architecture for a private AI assistant: local model (Ollama) + local MCP tools, with the data path contained entirely on-device.
- Open WebUI and Continue both act as MCP hosts — your local chat UI can drive any MCP tool.
- Local models don't need MCP-native support — the host handles the protocol; the model just calls tools like any tool-calling model.
- One server, many consumers — wrap your RAG store as an MCP server once; Claude, Cursor, and your agent all use it.
- Auditability — every tool call is explicit and loggable, which matters for regulated use cases.
Build Your First Local MCP Server
# pip install mcp
from mcp.server.fastmcp import FastMCP
import sqlite3
mcp = FastMCP("kb")
@mcp.tool()
def search_kb(query: str, limit: int = 5) -> str:
"""Search the local knowledge base (SQLite) for matching rows."""
conn = sqlite3.connect("kb.db")
rows = conn.execute(
"SELECT title, snippet FROM docs "
"WHERE title LIKE ? OR snippet LIKE ? LIMIT ?",
(f"%{query}%", f"%{query}%", limit),
).fetchall()
conn.close()
return "\n".join(f"{t}: {s}" for t, s in rows)
if __name__ == "__main__":
mcp.run(transport="stdio") # local child process
Run it: python server.py. Point an MCP client at it — Claude Desktop's config, Cursor's MCP settings, or Open WebUI — and the model can query your knowledge base as a first-class tool. In a real deployment, swap the SQLite search for ChromaDB retrieval and you've built the tool layer of a private assistant.
MCP Security: The Honest Version
MCP is a protocol, not a security boundary. A server with filesystem access is powerful — and dangerous if misconfigured. The rules that matter:
- Least privilege: give servers only the access the task needs (a read-only ChromaDB server, not a root filesystem server).
- Human approval for risky tools: hosts increasingly support permission prompts — keep them on for anything destructive.
- Don't run untrusted servers with broad scopes: a "fun" MCP server that can also read your SSH keys is a backdoor.
- Log tool calls: for GDPR and AI-Act style accountability, the tool-call log is your audit trail.
Frequently Asked Questions (FAQ)
What is the Model Context Protocol (MCP)?
MCP is an open standard (introduced by Anthropic in late 2024) that gives AI applications a uniform way to connect to tools, data sources, and services. Instead of every app building a custom integration per service, services expose MCP servers once, and any MCP client can use them.
How does MCP work?
Three parts: the MCP host (an AI app like Claude Desktop, Cursor, or your own), MCP servers (wrappers exposing tools/resources/context), and MCP clients (in-app connectors that manage the connection). Servers run over stdio for local processes or Streamable HTTP for remote services, and advertise their capabilities via JSON-RPC.
Is MCP only for Claude?
No — MCP is vendor-neutral. Anthropic created it, but by 2026 it's supported across Claude, Cursor, Windsurf, VS Code (Copilot), many IDEs, and open-source tools like Open WebUI and Continue. Any model, including local Ollama models, can drive MCP tools through a client.
Can I use MCP with local AI?
Yes — and this is where MCP shines for privacy. Local stdio servers run as child processes on your machine, so tools and data never leave it. An MCP server wrapping ChromaDB or your file system gives a local agent powerful tools with zero cloud dependency.
MCP vs API: what's the difference?
An API is a one-way contract a service publishes for others to call. MCP is a two-way standard where servers expose capabilities and clients connect to many servers uniformly. One MCP server works with every MCP client; one API integration works only with that app's client code.
How do I build an MCP server?
The official SDKs (Python and TypeScript) make it ~50 lines: define tools with names, descriptions, and schemas, register handlers, and run the server. The example in this post builds a working local server in minutes.
Sources & Further Reading
- Tool Calling with Local LLMs: A Practical Guide
- How to Build an AI Agent with LangGraph + Ollama
- Multi-Agent Systems: When One Agent Isn't Enough
- Agentic RAG: Combining Agents with Retrieval
- Can You Run a Private LLM for Your Business?
- Model Context Protocol — official docs
- Introducing the Model Context Protocol (Anthropic, 2024)