ai-hub
[en]es
[concept][changing]

What is the Model Context Protocol (MCP)?

MCP is an open standard that connects AI models to external tools and data sources through a universal protocol.

// 3 min read · updated 2026-05

What is it

The Model Context Protocol (MCP) is an open standard created by Anthropic that defines how AI applications connect with external tools and data sources. Before MCP, every integration between a model and a tool required custom code. MCP establishes a single protocol that both sides implement once.

Anthropic's official analogy is direct: MCP is the USB-C of AI applications. Just as USB-C lets you connect any peripheral to any computer without adapters, MCP lets any model talk to any tool without custom integrations.

Mental model

The problem MCP solves is a combinatorics problem. If you have M AI models and N tools, without a standard you need M × N distinct integrations. Each model needs its own code to talk to each tool.

graph TD subgraph "Without MCP: M × N integrations" GPT4 --> T1[Tool A] GPT4 --> T2[Tool B] Claude --> T1 Claude --> T2 Gemini --> T1 Gemini --> T2 end

With MCP, each model implements the protocol once (as a host) and each tool implements it once (as a server). The problem goes from M × N to M + N.

graph TD subgraph "With MCP: M + N integrations" GPT4 --> MCP[MCP Protocol] Claude --> MCP Gemini --> MCP MCP --> T1[Tool A] MCP --> T2[Tool B] end

The architecture has three key components:

  • Host: the AI application that consumes capabilities (Claude Code, Cursor, a chatbot).
  • MCP Server: exposes a tool's capabilities through the protocol.
  • Resources and Tools: servers expose resources (data the model can read) and tools (actions the model can execute).

How it's used

In practice, using MCP involves two steps: configuring a server for the tool and connecting it to a host that consumes it.

Configuring an MCP Server

An MCP server is typically configured in a host configuration file. For example, to connect Claude Code to a Stitch server:

{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-stitch"],
      "env": {
        "STITCH_API_KEY": "your-api-key"
      }
    }
  }
}

Once configured, the host automatically discovers what resources and tools the server exposes. The model can read designs, query databases, or execute actions without the user writing integration code.

Typical flow

  1. The host initiates the connection with the MCP server.
  2. The server responds with the list of available resources and tools.
  3. The model decides which tool to invoke or which resource to read based on the conversation context.
  4. The server executes the action or returns the data in the protocol's format.
  5. The model incorporates the result into its response or its next action.

When to use it / when not to

Use MCP when:

  • You need to connect an AI model with multiple tools and want to avoid custom integrations.
  • You're building a tool and want any compatible model to be able to use it.
  • Your workflow requires the model to read external data or execute actions autonomously.

Don't use MCP when:

  • You only need a simple integration between one model and one tool: a direct API call is simpler.
  • The tool doesn't have an MCP server available and it's not worth building one for a single use case.
  • You need fine-grained control over the format of exchanged data: MCP standardizes, but that standardization can limit very specific cases.

// related