AI systemsMCPMCP serverMCP client

Model Context Protocol

Definition

The Model Context Protocol (MCP) defines how a host application, through one client per server, connects to MCP servers that expose tools, resources and prompts, over stdio for local servers or Streamable HTTP for remote ones.

In practice

MCP replaces one-off integrations with a common interface: a server written once works with any MCP-capable host. A session starts with initialize, where both sides declare capabilities; the client lists tools and invokes them with tools/call. Tools are model-controlled, resources application-controlled and prompts user-controlled, and the host mediates every exchange, since the model never talks to servers directly.

Every server is a trust decision. Tool descriptions and results can carry prompt injection or tool poisoning, so hosts should show users what runs and confirm state-changing calls. Remote servers act as OAuth resource servers: they accept only tokens issued for them (audience-bound) and must never pass those tokens through to other services.

Example

An IDE host starts a local git MCP server over stdio and connects to a remote ticketing server over Streamable HTTP with an OAuth token; the model sees tools such as create_issue from both.