What is MCP?
The Model Context Protocol (MCP) is an open standard that lets AI models connect to external tools and data sources in a consistent, reusable way. It replaces ad-hoc function definitions with a shared protocol — so a server built once can plug into any MCP-compatible host: Claude Code, Claude Desktop, or any other application that speaks MCP.
The Problem MCP Solves
Before MCP, every application that wanted to give an LLM access to external tools had to invent its own integration:
- App A defines tools as JSON schemas in every API call
- App B hard-codes tool handlers in Python middleware
- App C uses a custom plugin format incompatible with everything else
Every integration was one-off. A database connector built for one app couldn't be reused in another without rewriting it from scratch. MCP standardises the interface — tool definitions, capability negotiation, and result formats — so servers can be built once and used everywhere.
MCP vs Function Calling
Function calling (tool use) in the Claude API is a conversation-level feature: you define tools in each API request, and Claude returns structured tool calls you execute in your code. It is simple and direct, but the tool implementations live entirely in your application.
MCP goes one level higher. Instead of defining tools per-request, you run an MCP server — a separate process that exposes tools via the MCP protocol. The host application (Claude Code, Claude Desktop) connects to the server at startup and discovers its tools automatically. The tool logic lives in the server, not the host.
Function calling (tool use)
- Tools defined per API request
- Tool logic lives in your application code
- Simple: no extra process to run
- Best for bespoke, application-specific tools
MCP
- Tools defined once in a reusable server
- Server discovered automatically by hosts
- Any MCP-compatible host can use the same server
- Best for shared integrations: databases, APIs, file systems
The Open Standard
MCP was created by Anthropic and released as an open standard in late 2024. The specification, SDK, and reference servers are published on GitHub and maintained openly. Anthropic provides first-party SDKs in Python and TypeScript; community SDKs exist for other languages.
Being an open standard means tool builders — companies, open-source contributors, internal platform teams — can publish MCP servers that work with any compliant host. A Postgres MCP server built by the community works in Claude Code, Claude Desktop, and any other application that implements the MCP client protocol.
MCP Architecture at a Glance
MCP connects any host to any server through a uniform protocol
What You Can Connect via MCP
MCP servers can expose three types of capabilities:
- Tools: Functions Claude can call — database queries, API requests, file operations, web search, code execution. Tools take inputs and return results.
- Resources: Read-only data sources Claude can access — files, documentation, database records, configuration. Resources are fetched, not invoked.
- Prompts: Pre-defined prompt templates the host application can surface to users. Less commonly used.
In practice, most MCP integrations focus on tools. Resources are useful for giving Claude read access to structured content without the overhead of embedding it in every message.
MCP in Claude Code vs Claude Desktop
Both Claude Code (the CLI) and Claude Desktop (the app) are MCP hosts — they embed the MCP client and connect to servers you configure. The same MCP server works in both. The difference is configuration:
- Claude Code: MCP servers configured in
.claude/settings.json(project-level) or~/.claude/settings.json(global). Servers run alongside the CLI session. - Claude Desktop: MCP servers configured in a JSON file specific to the desktop app. Servers run as background processes while the desktop app is open.
The protocol, server code, and tool behaviour are identical in both hosts — only the config file location differs.
Checklist: Do You Understand This?
- MCP is an open standard for connecting AI models to tools and data sources — build once, use in any MCP-compatible host
- MCP vs function calling: function calling is per-request tool definitions; MCP is a separate server process discovered automatically by the host
- MCP servers expose tools (callable functions), resources (read-only data), and prompts (templates)
- Maintained as an open standard by Anthropic — SDKs in Python and TypeScript
- Same server works in Claude Code and Claude Desktop — only the config file location differs