AI Fundamentals
What Is the Model Context Protocol (MCP)? The Standard Connecting AI to Tools and Data
The Model Context Protocol gives AI applications a standard way to discover and use tools, data, prompts, and other capabilities. This guide explains MCP’s architecture, primitives, security boundaries, and place in the agent stack.

The Model Context Protocol (MCP) is an open standard that lets AI applications connect to external tools, data, prompts, and other capabilities through a consistent interface. Instead of building a custom integration for every model-and-system combination, developers can implement a shared protocol between an AI host and an MCP server.
MCP is often described as a universal connector for AI, but the analogy is incomplete. The protocol does not merely move data. It defines how participants establish capabilities, expose resources and actions, exchange structured messages, and maintain security boundaries. That makes it an important part of the emerging infrastructure for AI assistants and agents.
Why MCP Exists
A model on its own cannot see a company’s private documents, inspect a local repository, query a live database, or call an internal service. Developers historically connected those capabilities through one-off plugins and application-specific APIs.
That approach creates an integration problem. If ten AI applications each need to connect to ten systems, teams may end up maintaining dozens of bespoke adapters. Every adapter can represent tools, context, authentication, errors, and updates differently.
MCP creates a common contract. An MCP-compatible application can communicate with MCP servers that expose capabilities in a known format. The official Model Context Protocol specification defines the protocol, while individual hosts and servers decide which features and security policies they support.
The MCP Architecture
MCP separates the AI application’s conversation and model logic from the integration logic required by each data source or service. The host may maintain several client connections at once—one for a filesystem server, one for a database server, and another for a business application—while presenting their capabilities to the model through a consistent interface.
The server is not necessarily a remote internet service. It can run locally beside a desktop application, inside a company network, or as a remote service. That deployment choice changes the transport and trust boundary, but not the central relationship: a client discovers capabilities from a server and exchanges structured messages with it.
MCP uses a host-client-server architecture.
- Host: the AI application that the user interacts with, such as an assistant, coding environment, or agent platform.
- Client: a protocol component created by the host to maintain a connection with a particular MCP server.
- Server: a program that exposes selected tools, resources, or prompts to MCP clients.
A host can connect to multiple servers at once. One server might provide access to a file repository, another to a project-management system, and a third to an internal database. The host remains responsible for the user experience, model orchestration, consent, and the information placed in model context.
Messages are structured using JSON-RPC conventions. During initialization, participants negotiate protocol versions and capabilities. That negotiation is important because clients and servers do not need to implement every optional feature.
Tools, Resources, and Prompts
| Host | The AI application that coordinates the user experience and permissions. |
|---|---|
| Client | The protocol connection maintained by the host for one server. |
| Server | The program that exposes tools, resources, or prompts. |
| Result | Structured data returned to the host after an approved invocation. |
MCP organizes server-provided capabilities into several primitives. The three most familiar are tools, resources, and prompts.
Tools
A tool is an executable function the AI application can invoke. Examples include searching a customer database, creating an issue, running a query, or retrieving current inventory. A tool definition includes a name, description, and input schema so the model and runtime know what arguments are expected.
Tool use can change external systems, so hosts should display meaningful descriptions, validate inputs, apply permissions, and require confirmation for consequential actions.
Resources
A resource is context that an application can read, such as a file, database record, documentation page, or generated report. Resources use identifiers and can expose metadata such as a name and media type. They give hosts a standardized way to discover and retrieve information without pretending that every read operation is an action.
Prompts
Prompts are reusable templates or workflows that a server makes available to the host. They can help users invoke a capability correctly, provide structured arguments, or combine domain-specific instructions with relevant context.
MCP also supports capabilities in the opposite direction. Depending on what is negotiated, a server may ask the host to obtain model completions or user input. The important design principle is explicit capability negotiation rather than assuming that every participant can perform every operation.
What Happens During an MCP Tool Call?
Consider an AI coding assistant connected to a repository-analysis server.
- The host connects to the MCP server and negotiates supported capabilities.
- The client requests the list of available tools.
- The server returns structured tool definitions, including their input schemas.
- The host makes selected tool descriptions available to the model.
- The model proposes a tool call, such as searching for references to a function.
- The host checks policy and, when necessary, asks the user for approval.
- The client sends the validated request to the server.
- The server performs the operation and returns structured content or an error.
- The host decides what portion of the result to provide to the model for the next step.
MCP standardizes the exchange, but it does not decide whether the model should be trusted to call a tool. That decision belongs to the host and its policy layer.
MCP Does Not Replace APIs
An MCP server often wraps existing APIs, software development kits, command-line tools, or database drivers. Those underlying interfaces still perform the actual work. MCP adds an AI-oriented discovery and interaction layer above them.
This distinction explains why MCP is complementary to REST, GraphQL, and other application interfaces. A payment service can retain its mature API while an MCP server exposes a carefully limited subset of operations with model-friendly descriptions and schemas.
MCP vs. Function Calling
Function or tool calling is a model capability: the model can return a structured request to invoke a function. MCP is a protocol for discovering and communicating with providers of tools and context.
The two frequently work together. An MCP server tells the host which tools exist. The host presents selected definitions to a model. The model emits a tool call. The host then uses MCP to send that request to the appropriate server.
MCP vs. Agent2Agent
MCP connects an AI application to capabilities and context. Agent2Agent, or A2A, focuses on communication between autonomous agents that may be owned by different systems or organizations.
A practical system can use both. An agent might use MCP to access its tools and data, then use A2A to delegate a larger task to another agent. MCP answers “How can this application use that capability?” A2A answers “How can these agents coordinate work?”
Security Risks and Controls
A secure host maintains an explicit allowlist of servers and tools, displays meaningful consent when access is granted, and associates every call with the user or workload identity that authorized it. Tool schemas should be narrow enough to reject unexpected arguments, while audit logs should record the server, capability, inputs, result status, and approval path.
Returned resources and tool results are also a prompt-injection surface. A document read through MCP may contain text that asks the model to ignore its instructions or exfiltrate data. The host must preserve the distinction between untrusted content and system policy, and it should prevent one server’s output from silently expanding another server’s permissions.
Standardization improves interoperability, but it does not make a server trustworthy. An MCP server can expose sensitive data, misleading tool descriptions, unsafe actions, or compromised dependencies. Untrusted content retrieved through a resource can also contain prompt-injection instructions intended to manipulate the model.
Important controls include:
- Least privilege: give each server only the credentials and scope needed for its purpose.
- Server trust: verify the source, code, ownership, and update path of servers before connecting them.
- User visibility: make it clear which server will receive data and which action it will perform.
- Input validation: enforce schemas and business rules outside the model.
- Approval boundaries: confirm sensitive, external, financial, or destructive actions.
- Data minimization: avoid sending entire documents or conversations when only a small portion is needed.
- Logging and revocation: record calls, monitor anomalies, and make credentials and connections easy to disable.
The MCP project continues to refine its architecture and security guidance. The project’s 2026 specification update illustrates how the standard is evolving around simpler infrastructure, authorization, and production deployment.
When Should Developers Use MCP?
MCP is a strong fit when multiple AI clients need a consistent connection to the same capability, when tools should be discoverable at runtime, or when a team wants to separate AI orchestration from system-specific integration code.
A direct function call may remain simpler for a small application with one tightly controlled backend. Protocol adoption carries its own operational work: server lifecycle management, compatibility testing, authentication, observability, and governance.
What to Remember About What Is the Model Context Protocol (MCP)
MCP is a common language between AI applications and the tools and context around them. Its value comes from replacing isolated integration conventions with a discoverable, structured, and extensible protocol.
The standard does not remove the need for careful engineering. Hosts still must decide which servers to trust, which capabilities to expose, what data to share, and when a person must approve an action. MCP makes connections portable; governance makes them safe and useful.












