> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Context Protocol

> Understand the Model Context Protocol (MCP) — what it is, how it works, and why it matters for AI applications.

AI models like Claude and GPT are powerful, but they're limited to what they were trained on. The Model Context Protocol (MCP) gives them a standard way to connect to external tools, data sources, and real-world capabilities.

<Frame>
  <iframe src="https://www.youtube.com/embed/zyDm-MJgDOA" title="Mastering MCP: The Ultimate Guide to AI Connectivity" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />
</Frame>

## Why AI models need MCP

Without access to external tools and data, AI models can't:

* Access up-to-date information
* Interact with external systems
* Perform actions in the real world
* Work with your private data

MCP solves this by creating a universal way for AI to plug into tools and data — similar to how USB-C standardized device connections.

<Frame>
  <img src="https://mintcdn.com/replit/0ixNWaRF232g0Gwn/images/tutorials/mcp.avif?fit=max&auto=format&n=0ixNWaRF232g0Gwn&q=85&s=fa8ad7a48e8e22fef036f6ef9c804536" alt="MCP diagram showing AI models connecting to external tools and data sources" width="1920" height="1055" data-path="images/tutorials/mcp.avif" />
</Frame>

With MCP, AI models can:

* Access specialized tools and APIs
* Read from private data sources
* Take actions in the real world
* Connect to other systems seamlessly

## How MCP works

The MCP architecture has three main components:

1. **The client side** — AI models like Claude or applications that need to access external tools.
2. **The communication layer** — the protocol itself that standardizes how requests and responses are formatted.
3. **The server side** — programs that provide access to tools, data sources, and specialized capabilities.

<AccordionGroup>
  <Accordion title="What's an MCP client?">
    An MCP client is something like Claude, Replit Agent, or a command-line interface that connects to a large language model. It's the "device" that plugs into external tools or data sources.

    Examples of MCP clients:

    * Claude in the browser
    * Replit Agent
    * Command-line interfaces for AI
    * Custom applications built with AI SDKs
  </Accordion>

  <Accordion title="What's an MCP server?">
    An MCP server provides tools and capabilities to AI models. Think of it like giving AI a set of specialized tools to solve problems.

    Examples of what MCP servers enable:

    * Accessing specific data sources to answer questions
    * Connecting AI to APIs so it can take actions online
    * Reading or writing files
    * Making calculations or running code
    * Pulling content from services like Notion, Linear, or Stripe
  </Accordion>
</AccordionGroup>

## What MCP unlocks

MCP defines several primitives that make it powerful for AI applications:

* **Resources** — share data and content with AI models
* **Tools** — let AI models perform actions through your services
* **Prompts** — reusable templates for consistent AI interactions
* **Sampling** — allow your services to request information from AI models
* **Transports** — connect clients and servers efficiently

## Skills vs. MCP servers

Skills and MCP servers are the two main ways to extend AI agents — and they serve different purposes.

|              | Skills                                                                  | MCP servers                                              |
| ------------ | ----------------------------------------------------------------------- | -------------------------------------------------------- |
| **Best for** | Workflows, conventions, reference materials                             | Connecting to external services, taking actions          |
| **Loads**    | Lightweight — name + description only until invoked                     | Heavier — all tool descriptions load upfront             |
| **Defines**  | *How* your agent should work                                            | *What* your agent can access                             |
| **Example**  | "Stock Analyzer" skill — research investments with a specific framework | "Stripe" MCP server — read payment and subscription data |

See [Agent skills](/learn/agent-skills) for the matching mindset on skills.

## Real-world applications

MCP enables a wide range of AI applications:

* **Customer service systems** that access company databases to answer specific questions
* **Research assistants** that search and summarize content from multiple sources
* **Productivity tools** that interact with your files and applications
* **Content creation tools** that access media libraries and publishing platforms

## Benefits

MCP offers three key benefits:

* Ready-to-use integrations your AI can connect to immediately
* The ability to switch between AI providers without rewriting your connections
* Security features that keep your sensitive data protected

<Note>
  MCP is an emerging standard with growing support across the AI ecosystem. New tools and integrations are added regularly.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Connect via MCP" icon="server" href="/build/connect-via-mcp">
    Hands-on: connect a pre-listed MCP server or add a custom one in Replit.
  </Card>

  <Card title="MCP Servers reference" icon="folder-tree" href="/references/mcp/overview">
    Catalog of pre-listed servers, security model, and authentication options.
  </Card>

  <Card title="Agent skills" icon="puzzle-piece" href="/learn/agent-skills">
    The other way to extend Agent — when and how to use skills.
  </Card>

  <Card title="MCP protocol documentation" icon="arrow-up-right-from-square" href="https://modelcontextprotocol.io">
    Read the open standard's official documentation.
  </Card>
</CardGroup>
