Learn › MCP: Model Context Protocol — Complete Developer Guide › What Is MCP and Why It Exists

What Is MCP and Why It Exists

Intermediate 🕐 20 min Lesson 1 of 11
What you'll learn
  • Explain the N-to-M integration problem that MCP solves
  • Describe the three MCP primitives and what controls each one
  • Name the major hosts and use cases in the MCP ecosystem

The Integration Problem

Imagine you are building an AI assistant that can search the web, read files, query a database, and call a calendar API. If you are connecting each tool to each model directly, you write four different integration layers for one model. If you later add a second model, you write four more. This is the N-to-M problem: N models times M tools equals an ever-growing pile of bespoke glue code.

Each integration is fragile and narrow. The code that connects Claude to your database knows about Claude's function-calling format specifically. The code that connects GPT-4 to the same database knows about OpenAI's format specifically. Neither is reusable, and both break the moment either side changes its API.

What MCP Is

The Model Context Protocol (MCP) is an open standard published by Anthropic in November 2024 for connecting AI applications to external tools and data sources. It is not a framework, not a hosted service, and not specific to any one language model. It is a protocol — a precisely defined specification for how a client communicates with a server to exchange context.

The analogy the official docs use is USB-C. Before USB-C, every manufacturer had its own charging cable. After USB-C, one cable works with any device that supports the standard. MCP plays the same role for AI integrations: define the port once, and any tool that speaks the protocol works with any model host that speaks it.

With MCP in the picture, the N-to-M problem collapses. Each tool or data source is wrapped in an MCP server once. Each AI application hosts one MCP client per server. Any client can talk to any server. The quadratic explosion becomes linear.

The Three Primitives

An MCP server can expose three kinds of capabilities, called primitives. Understanding which primitive to reach for is one of the most important skills in MCP development.

  • Tools — executable functions the AI model can invoke. Examples: query a database, call a REST API, run a shell command. Tools are model-controlled: the LLM decides when to call them based on what it reads in the conversation.
  • Resources — read-only data the application can inject into context. Examples: a file's contents, a database schema, the results of a search. Resources are application-controlled: the host application decides when to include them.
  • Prompts — reusable instruction templates with named arguments. Examples: a code-review prompt, a summarization template. Prompts are user-controlled: the user picks which one to apply, typically via a slash command.

These three primitives cover the full surface area of what an AI system needs from the outside world: the ability to act (tools), the ability to read (resources), and the ability to apply structured expertise (prompts).

The Ecosystem Today

MCP is now supported by a broad set of AI applications and development environments. As of the current protocol version (2026-07-28), confirmed hosts include Claude Desktop, Claude Code, VS Code with the Continue extension, Cursor, and MCPJam. Each of these can connect to any MCP server you build — which means a server you write once works across all of them without any changes.

Anthropic publishes reference servers for the most common use cases: filesystem access, web fetching, Brave Search, and PostgreSQL. The community has added hundreds more, covering GitHub, Slack, Google Drive, Linear, Notion, and dozens of other platforms.

Real-World Use Cases

  • Claude Code and your filesystem: When you open Claude Code in a project, it connects to a local filesystem MCP server. Claude can read source files and write changes — all through the protocol.
  • An enterprise chatbot over multiple databases: A company connects one MCP server per internal database. The chatbot aggregates tools from all of them. When an employee asks a cross-system question, the model calls the right tool on the right server automatically.
  • A design-to-code workflow: A Figma MCP server exposes design components as resources. Claude reads the design, generates code, and writes the result through a filesystem server — all in one continuous conversation.
  • A local research agent: A privacy-conscious developer runs an agent connecting to filesystem, web fetch, and calendar servers, all on their laptop. No data leaves the machine.

What You Will Learn in This Track

  1. Architecture — the roles of hosts, clients, and servers
  2. The protocol layer — JSON-RPC, transports, discovery, and version negotiation
  3. Tools in depth — schemas, invocation, error types, and stateful patterns
  4. Resources in depth — URIs, templates, subscriptions, and annotations
  5. Prompts in depth — arguments, retrieval, and slash command integration
  6. Building an MCP server in Python — hands-on with the official SDK
  7. Building an MCP server in TypeScript — hands-on with the Node.js SDK
  8. Building an MCP client — connect to any server and run an agentic tool-call loop
  9. Real-world patterns — stateful tools, multi-server orchestration, notifications, debugging
  10. Security and production — trust model, validation, OAuth, and a production checklist
Key takeaways
  • MCP is a protocol, not a framework — it defines the interface, not the implementation
  • Tools are model-controlled, resources are app-controlled, and prompts are user-controlled
  • A single MCP server works with every host that supports the protocol
Learn more every week Get 5 hand-picked prompts + new AI tools every Monday. Free.