What Is MCP (Model Context Protocol)?

RAG, AI Agents & MCP · Model Context Protocol (MCP) · 7 min read · Updated

Every AI app needed its own custom code to connect to calendars, databases and files. The Model Context Protocol (MCP) is an open standard that defines one common way for AI applications to connect to external tools and data.

The three roles

  • Host: the AI application the user works in (for example a desktop assistant or an IDE).
  • Client: the part of the host that keeps one connection to a server.
  • Server: a program that exposes capabilities, such as your database or your resume API.

What a server can offer

  • Tools: actions the model can request, like "search_jobs" or "create_cv".
  • Resources: data the app can read, like a file or a record.
  • Prompts: reusable prompt templates the user can pick.

Servers can also ask the host for a model completion (sampling) and learn which folders they may use (roots), depending on what the host supports.

How it communicates

MCP messages use JSON-RPC. Two transports are common: stdio for a server running locally as a child process, and Streamable HTTP for remote servers.

Why it matters

  • Write an integration once and use it from many AI apps.
  • Users keep control, because tools can require consent.
  • It separates your data and permissions from the model.

MCP is not the same as a normal API. A REST API is for programs you write. An MCP server describes itself to an AI client, so the model can discover what is available and use it.

Frequently asked questions

Is MCP only for Claude?

No. It is an open protocol, and a growing number of AI applications support it, so one server can work with several clients.

What is the difference between an MCP tool and a resource?

A tool performs an action when the model asks. A resource is data the application can read, like a document.