Skip to content
Cosvexa – Cosvexa home

Research · Building with AI

The Model Context Protocol (MCP) explained

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. A developer writes an MCP server once, for example for a database, a code repository or a calendar, and any MCP-compatible application can discover and use its tools and data. Anthropic introduced MCP in November 2024; it is now governed under the Linux Foundation.

Cosvexa team · Published

Abstract editorial illustration of a central hub with uniform sockets connecting to many differently shaped blocks representing tools and data sources

Key points

  • MCP standardizes how AI applications connect to tools and data, so each integration is built once and reused.
  • Hosts (AI applications) contain clients that talk to servers, which expose tools, resources and prompts.
  • Messages use JSON-RPC 2.0 over standard input and output for local servers or Streamable HTTP for remote ones.
  • MCP describes capabilities; the host still decides what runs and must ask for user consent.
  • Third-party servers and the content they return are a security surface, including prompt injection.

What MCP is

Function calling lets a model request tools, but each application has to define and implement those tools itself. If ten AI applications each want access to ten services, that is up to a hundred separate integrations, each slightly different. The Model Context Protocol turns this into a plug-in model: a service is wrapped once as an MCP server, and any application that speaks MCP can connect to it.

Anthropic released MCP as an open specification with software development kits in November 2024. The specification says it takes inspiration from the Language Server Protocol (LSP), which lets any code editor support any programming language through a shared protocol. During 2025 the protocol was adopted well beyond Anthropic's own products, including by other model providers, code editors and developer tools. In December 2025 Anthropic donated MCP to the newly formed Agentic AI Foundation, a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI; Anthropic stated that the protocol's governance model by its maintainers would remain unchanged. Anthropic's announcement put the number of active public MCP servers at more than 10,000.

How it works

Hosts, clients and servers

RoleWhat it isExample
HostThe AI application the user interacts with; it runs the model and decides what to allowA chat app, an IDE, a command-line coding agent
ClientA connector inside the host that maintains the connection to one serverThe host's link to a database server
ServerA program that exposes capabilities of some system over MCPA server for a file system, a ticket tracker or a search API

Messages between client and server are encoded in JSON-RPC 2.0, a small, long-established standard for requests, responses and notifications in JSON. The protocol defines how capabilities are listed, how they are invoked and how errors, progress and cancellation are reported.

What servers offer

  • Tools: functions the model can call, each with a name, a description and a JSON Schema for its inputs, such as query_database or create_issue. Tools are the most widely used feature.
  • Resources: data the application can read and give to the model or the user as context, such as files, database schemas or documents, identified by URIs.
  • Prompts: reusable, parameterized prompt templates or workflows that a user can pick, such as summarize this pull request.

In the other direction, clients can offer features to servers. The current revision of the specification lists elicitation, through which a server can ask the user for additional information via the host. Two client features from earlier revisions, sampling, in which a server asks the host's model to generate text, and roots, which tell a server which directories it may work in, are marked deprecated in the current revision.

Transports and versions

The specification defines two standard transports. With stdio, the host launches the server as a local subprocess and exchanges newline-delimited JSON-RPC messages over standard input and output; this suits servers that run on the user's own machine. With Streamable HTTP, each message is an HTTP POST to a single endpoint and replies arrive as JSON or as a stream, which suits remote, hosted servers. For HTTP, the specification also defines an authorization framework based on OAuth. Custom transports are allowed if they keep the message format.

Protocol versions are identified by dates. Revisions up to 2025-11-25 opened each connection with an initialize handshake in which client and server negotiated a version and capabilities. The current revision, dated 2026-07-28, makes requests stateless and self-contained: each request carries its protocol version and client capabilities, and a server/discover call lets a client learn a server's versions and capabilities up front. The specification describes how newer and older implementations detect each other and fall back. Optional extensions add features such as long-running tasks and interactive UI elements.

A concrete example

  1. 1

    Configure

    A developer adds a database MCP server to their coding assistant's configuration, giving the command that starts it and read-only credentials.

  2. 2

    Discover

    The host starts the server and lists its tools and resources: a run_query tool and a resource describing the database schema.

  3. 3

    Provide to the model

    The host passes the tool definitions to the model alongside the user's question: how many orders failed payment last week?

  4. 4

    Call

    The model requests run_query with a SQL statement. The host shows the call, the user approves it, and the client sends the request to the server.

  5. 5

    Answer

    The server runs the query and returns rows; the host adds them to the conversation, and the model writes the answer with the number and the query it used.

The same server would work unchanged in a different MCP-compatible host, which is the point of the protocol.

Why it matters

  • Build once, use everywhere. Service owners can publish one MCP server instead of separate plug-ins for each AI product, and application developers get many integrations without writing them.
  • Separation of concerns. The host focuses on the model, the interface and permissions; servers focus on a single system. Each can be updated independently.
  • Local and remote. The same protocol covers a script that reads local files and a hosted service that thousands of users connect to.
  • A foundation for agents. AI agents need access to many tools and data sources; a common protocol makes that access portable across models and applications.

Limits, security and misconceptions

  • MCP is not a model or an agent. It is a protocol for connecting applications to capabilities. The model's quality, the host's design and the server's implementation determine how well things work.
  • It does not replace function calling. Under the hood, the host typically presents MCP tools to the model through the model's ordinary tool-calling interface. MCP standardizes where tools come from and how they are executed.
  • Security is the implementer's job. The specification states key principles, including explicit user consent before data is shared and before any tool is invoked, and that tool descriptions should be treated as untrusted unless they come from a trusted server, but the protocol itself cannot enforce them.
  • Untrusted servers and content. A malicious or compromised server can return misleading tool descriptions or results, and legitimate servers can pass along attacker-controlled content such as web pages or emails. Both are routes for prompt injection. Install servers from sources you trust, grant least-privilege credentials and require confirmation for consequential actions.
  • Too many tools. Connecting many servers adds many tool definitions to the model's context, which costs tokens and can make tool selection less accurate. Hosts increasingly load tools selectively.
  • A moving specification. MCP has had several revisions in a short time, so clients and servers must handle version differences.

Where it is going

With governance under a neutral foundation and support across major AI applications, MCP has become a common integration layer for tools and context. Current work includes stateless operation for easier scaling, standard authorization for hosted servers, asynchronous tasks for long-running operations, registries for discovering servers, and richer interfaces rendered inside conversations. Related standards address neighbouring problems, such as communication between agents, and how these will fit together is still evolving. The design choice that made MCP spread, a small, explicit protocol modelled on a proven precedent like LSP, is likely to remain its core.

The Cosvexa command-line agent can use MCP servers; cosvexa mcp manages them, as described on the CLI page and in the CLI documentation.

Frequently asked questions

What is the Model Context Protocol (MCP)?

MCP is an open standard for connecting AI applications to external tools and data. Developers expose a system through an MCP server, and any MCP-compatible application can discover and use its tools, resources and prompts. Anthropic introduced it in November 2024.

What is the difference between MCP and function calling?

Function calling is how a model asks the application to run a tool. MCP is a protocol for how the application obtains those tools from separate servers and executes them. In practice, hosts often present MCP tools to the model through its normal function-calling interface.

What is an MCP server?

An MCP server is a program that exposes the capabilities of some system, such as a database, a file system or a web service, using the MCP specification. It can offer tools the model can call, resources the application can read and prompt templates the user can choose.

Who owns MCP?

Anthropic created MCP and in December 2025 donated it to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI. The specification and SDKs are open source and developed by maintainers with community input.

Is MCP secure?

MCP defines security principles such as user consent before tool calls and data sharing, but cannot enforce them; that is up to the host and server. Risks include malicious servers, over-broad credentials and prompt injection through content that servers return, so trust, least privilege and confirmation are essential.

References

  1. Anthropic (2024). Introducing the Model Context Protocol
  2. Model Context Protocol specification
  3. JSON-RPC Working Group. JSON-RPC 2.0 Specification
  4. Microsoft. Language Server Protocol
  5. Anthropic (2025). Donating the Model Context Protocol and establishing the Agentic AI Foundation

More in this section

Start free: 50 Cosvexa-1 questions a day

Every major model in one workspace; on the Free plan Cosvexa-1 answers 50 questions a day. No card needed to start.