Files
oam/knowledge base/ai/mcp.md
2026-02-17 18:51:54 +01:00

3.9 KiB

Model Context Protocol

Open protocol enabling seamless integration between AI applications and external data sources and tools by providing a standardized way to enable LLMs to access key information and perform tasks.

  1. TL;DR
  2. Further readings
    1. Sources

TL;DR

MCP consists of:

  • The data layer, defining the JSON-RPC based protocol for client-server communication.
    It includes lifecycle management and core primitives, e.g. tools, resources, prompts and notifications.
  • The transport layer, defining the communication mechanisms and channels that enable data exchange between clients and servers.
    It includes transport-specific connection establishment, message framing, and authorization.

MCP hosts are AI applications users can interact with, and that coordinate and manage one or more MCP clients.
MCP clients are components that connect to a single MCP server to gather context from it for the host to use.
MCP servers are applications providing context data to one or more MCP clients.

MCP hosts create one MCP client for each MCP server they use.
Each client maintains a dedicated connection with its corresponding server.

Servers provide functionality through tools, resources, and prompts.
Tools are functions that an LLM can actively call to take actions, i.e. writing to databases, calling external APIs, modifying files, or triggering other logic. The LLM decides when to use them based on user requests.
Resources are passive data sources providing read-only access to information for context, such as files, database schemas, or API documentation.
Prompts are pre-built instruction templates telling the model reading them how to work with specific tools and resources.

Clients can provide features to servers, aside from making use of the context they provide.
Client features allow server authors to build richer interactions through elicitation, roots, and sampling. Elicitation enables servers to request specific information from users.
Roots define filesystem boundaries for server operations, allowing clients to specify which folders servers should focus on.
Sampling allows servers to request LLM completions through the client. This is what enables an agentic workflow.

MCP uses string-based version identifiers that follow the YYYY-MM-DD format.
Versions indicate the last date that backwards incompatible changes were made in the protocol.

Version negotiation happens during initialization.
Clients and servers may support multiple protocol versions simultaneously, but they must agree on a single version to use for the session.
The protocol provides error handling if version negotiation fails, which allows clients to gracefully terminate connections when they cannot find a version compatible with the server.

MCP servers of interest:

MCP server Summary
AWS API Interact with all available AWS services and resources
AWS Cost Explorer Analyze AWS costs and usage data

Further readings

Sources