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

# MCP Connection

> Extend your agents with Model Context Protocol servers

Connect your agents to external systems and services through the Model Context Protocol. MCP enables seamless integration with databases, APIs, file systems, and third-party platforms, giving your agents access to real-world data and capabilities.

<video autoPlay muted loop playsInline className="w-full aspect-video rounded-2xl border h-[370px] border-[#e7e5e4] dark:hidden" src="https://a62edz1qni.ufs.sh/f/zshoAVKVBR3ifExQLBej0JxH8hCGVL79pSnazX4b6WyPoqur" />

<video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl h-[370px] hidden dark:block" src="https://a62edz1qni.ufs.sh/f/zshoAVKVBR3iexHO73j1JMs3QDgVqivHtNyXh6muzU7w2EPb" />

***

## What is MCP?

The [Model Context Protocol](https://modelcontextprotocol.io) is a standardized way for AI agents to interact with external systems. MCP servers act as bridges between your agent and various services, enabling your AI to:

* **Access external data sources** - Connect to databases, file systems, cloud storage, and APIs
* **Integrate with platforms** - Work with GitHub, Slack, Google Drive, Notion, and more
* **Execute system operations** - Run commands, query databases, manipulate files
* **Maintain context** - Keep consistent access to resources across conversations

Think of MCP as a universal adapter that lets your agent plug into virtually any service or data source through a standardized interface.

***

## Setup MCP Tab View

<Steps>
  <Step title="Navigate to MCP Tab View">
    Go to **Tools & MCP Page** to view and manage your connected servers.

    <img className="dark:hidden mx-auto" src="https://mintcdn.com/tuhh-d1de0e06/NLF4OVAebw6tUaJP/images/mcp-view-light.png?fit=max&auto=format&n=NLF4OVAebw6tUaJP&q=85&s=7d3a256f1a5c86f57a7f3ae243a732de" alt="MCP servers interface" style={{ width:"99%", borderRadius: "8px", border: "1px solid #e7e5e4", margin: "10px" }} width="1251" height="648" data-path="images/mcp-view-light.png" />

    <img className="hidden dark:block" src="https://mintcdn.com/tuhh-d1de0e06/NLF4OVAebw6tUaJP/images/mcp-view-dark.png?fit=max&auto=format&n=NLF4OVAebw6tUaJP&q=85&s=2e5f57b43f7ee5b70551c06c14b54f3f" alt="MCP servers interface" style={{ width:"99%", borderRadius: "8px", border: "1px solid #e7e5e4", margin: "10px" }} width="1251" height="648" data-path="images/mcp-view-dark.png" />
  </Step>

  <Step title="Add a New Server">
    Click **Add Server** and configure your MCP connection:

    <img className="dark:hidden mx-auto" src="https://mintcdn.com/tuhh-d1de0e06/NLF4OVAebw6tUaJP/images/mcp-form-light.png?fit=max&auto=format&n=NLF4OVAebw6tUaJP&q=85&s=114c6d9a75b0b8c249ec8b9278f97ca0" alt="Add MCP server form" style={{ width:"99%", borderRadius: "8px", border: "1px solid #e7e5e4", margin: "10px" }} width="1251" height="648" data-path="images/mcp-form-light.png" />

    <img className="hidden dark:block" src="https://mintcdn.com/tuhh-d1de0e06/NLF4OVAebw6tUaJP/images/mcp-form-dark.png?fit=max&auto=format&n=NLF4OVAebw6tUaJP&q=85&s=3596811d6bc35ca2239e2a4addfc9327" alt="Add MCP server form" style={{ width:"99%", borderRadius: "8px", border: "1px solid #e7e5e4", margin: "10px" }} width="1251" height="648" data-path="images/mcp-form-dark.png" />
  </Step>

  <Step title="Enable for Projects">
    Once added, enable the MCP server for specific projects where you want your agent to have access to its capabilities.
  </Step>

  <Step title="Test Your Connection">
    Start a conversation with your agent and ask it to use the connected service:

    <img className="dark:hidden mx-auto" src="https://mintcdn.com/tuhh-d1de0e06/NLF4OVAebw6tUaJP/images/chat-light.png?fit=max&auto=format&n=NLF4OVAebw6tUaJP&q=85&s=d982bd871b8c523266835546853ee852" alt="Testing MCP in chat" style={{ width:"99%", borderRadius: "8px", border: "1px solid #e7e5e4", margin: "10px" }} width="1288" height="856" data-path="images/chat-light.png" />

    <img className="hidden dark:block" src="https://mintcdn.com/tuhh-d1de0e06/NLF4OVAebw6tUaJP/images/chat-dark.png?fit=max&auto=format&n=NLF4OVAebw6tUaJP&q=85&s=a5542b8c8c411fbd151c4dbefd642683" alt="Testing MCP in chat" style={{ width:"99%", borderRadius: "8px", border: "1px solid #e7e5e4", margin: "10px" }} width="1288" height="856" data-path="images/chat-dark.png" />

    Your agent will automatically use MCP tools when relevant to the conversation.
  </Step>
</Steps>

***

## Using MCP Servers

### Via UI

<Steps>
  <Step title="Connect Servers">
    Navigate to **Tools & MCP Page** and add the servers you need.
  </Step>

  <Step title="Enable for Projects">
    Select which projects should have access to each MCP server.
  </Step>

  <Step title="Chat Naturally">
    Your agent will automatically use MCP resources when they're relevant to your conversation. No special commands needed.
  </Step>

  <Step title="Monitor Activity">
    Use the **Sources** tab to see which MCP servers were called and what data was accessed.
  </Step>
</Steps>

### Via API

You can programmatically manage MCP servers through the API.

Check the [MCP API Reference](/api-reference/mcp/create) for detailed documentation on:

* Adding and removing servers
* Managing server configurations
* Enabling servers for projects
* Monitoring server status

The AI automatically determines when to use MCP resources based on the conversation context and available server capabilities.
