The Model Context Protocol (MCP) is an open protocol for connecting AI applications to tools and data. It has three roles.
Host
The AI application the user interacts with — a chat app, an IDE, a coding agent. The host manages connections, enforces permissions and decides what reaches the model.
Client
A connector inside the host that maintains one connection to one server. A host typically runs several clients, one per server.
Server
A program that exposes capabilities — tools, resources and prompts — over the protocol. Servers can wrap a database, a file system, a SaaS API or an internal service.
How They Talk
Messages use JSON-RPC 2.0: requests with responses, and one-way notifications. A connection starts with initialisation, where client and server exchange protocol versions and declare which capabilities they support.
Why This Design
- One server works with any MCP-compatible host.
- Hosts can add integrations without custom code for each.
- Security boundaries are clear: the host controls what each server can see and do.
Local and Remote
Servers can run locally as a subprocess or remotely over HTTP. The roles are the same either way.