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

# Model Context Protocol (MCP)

> Model Context Protocol support across OpenHands platforms

Model Context Protocol (MCP) is an open standard that allows OpenHands to communicate with external tool servers, extending the agent's capabilities with custom tools, specialized data processing, external API access, and more. MCP is based on the open standard defined at [modelcontextprotocol.io](https://modelcontextprotocol.io).

## How MCP Works

When OpenHands starts, it:

1. Reads the MCP configuration
2. Connects to configured servers (SSE, SHTTP, or stdio)
3. Registers tools provided by these servers with the agent
4. Routes tool calls to appropriate MCP servers during execution

## MCP Support Matrix

| Platform            | Support Level  | Configuration Method         | Documentation                                           |
| ------------------- | -------------- | ---------------------------- | ------------------------------------------------------- |
| **CLI**             | ✅ Full Support | `~/.openhands/mcp.json` file | [CLI MCP Servers](/openhands/usage/cli/mcp-servers)     |
| **SDK**             | ✅ Full Support | Programmatic configuration   | [SDK MCP Guide](/sdk/guides/mcp)                        |
| **Local GUI**       | ✅ Full Support | Settings UI + config files   | [Local GUI](/openhands/usage/run-openhands/local-setup) |
| **OpenHands Cloud** | ✅ Full Support | Cloud UI settings            | [Cloud GUI](/openhands/usage/cloud/cloud-ui)            |

## Platform-Specific Differences

<Tabs>
  <Tab title="CLI">
    * Configuration via `~/.openhands/mcp.json` file
    * Real-time status monitoring with `/mcp` command
    * Supports all MCP transport protocols (SSE, SHTTP, stdio)
    * Manual configuration required
  </Tab>

  <Tab title="SDK">
    * Programmatic configuration in code
    * Full control over MCP server lifecycle
    * Dynamic server registration and management
    * Integration with custom tool systems
  </Tab>

  <Tab title="Local GUI">
    * Visual configuration through Settings UI
    * File-based configuration backup
    * Real-time server status display
    * Supports all transport protocols
  </Tab>

  <Tab title="OpenHands Cloud">
    * Cloud-based configuration management
    * Managed MCP server hosting options
    * Team-wide configuration sharing
    * Enterprise security features
  </Tab>
</Tabs>

## Getting Started with MCP

* **For detailed configuration**: See [MCP Settings](/openhands/usage/settings/mcp-settings)
* **For CLI usage**: See [CLI MCP Servers](/openhands/usage/cli/mcp-servers)
* **For SDK integration**: See [SDK MCP Guide](/sdk/guides/mcp)
* **For architecture details**: See [MCP Architecture](/sdk/arch/mcp)
