What Is the Model Context Protocol (MCP)? A Developer Introduction
Before MCP, every AI application needed custom glue code for every integration: one plugin for GitHub in app A, a different one in app B. The Model Context Protocol (MCP) is an open standard, introduced by Anthropic, that defines one way for AI applications to talk to tools and data sources. Build an MCP server once, and any MCP-compatible app can use it.
The architecture
- Host - the AI application the user interacts with, such as Claude Desktop, Claude Code or an IDE.
- Client - lives inside the host and holds a one-to-one connection to a server.
- Server - a small program that exposes capabilities, for example "GitHub", "Postgres" or "your company's ticketing system".
Messages use JSON-RPC 2.0. Servers run locally over stdio (the host starts them as a child process) or remotely over Streamable HTTP.
What a server can offer
- Tools - functions the model can call (create_issue, run_query). Model-controlled.
- Resources - read-only data the app can load into context (files, records, schemas). Application-controlled.
- Prompts - reusable prompt templates the user can pick, often shown as slash commands. User-controlled.
A taste of the protocol
// client -> server
{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
// server -> client
{ "jsonrpc": "2.0", "id": 1, "result": { "tools": [
{ "name": "get_forecast", "description": "Weather forecast for a city",
"inputSchema": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] } }
] } }
// client -> server
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": { "name": "get_forecast", "arguments": { "city": "Pune" } } }
Why developers care
- Write once, use everywhere: the same server works in many AI apps.
- A large ecosystem of ready-made servers for databases, SaaS tools, browsers and file systems.
- Clear security boundary: the server owns credentials and decides what's allowed.
You rarely implement JSON-RPC by hand. Official SDKs for TypeScript, Python and other languages handle the protocol, as the next articles show.
Was this article helpful?
Comments
No comments yet. Have a question or a tip? Be the first to share it.