Skip to main content
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.

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

PlatformSupport LevelConfiguration MethodDocumentation
CLI✅ Full Support~/.openhands/mcp.json fileCLI Settings
SDK✅ Full SupportProgrammatic configurationSDK MCP Guide
Local GUI✅ Full SupportSettings UI + config filesLocal GUI
OpenHands Cloud✅ Full SupportCloud UI settingsCloud GUI

Platform-Specific Differences

  • CLI
  • SDK
  • Local GUI
  • OpenHands Cloud
  • Configuration via ~/.openhands/mcp.json file
  • Real-time status monitoring with /mcp command
  • Supports all MCP transport protocols (SSE, SHTTP, stdio)
  • Manual configuration required

Getting Started with MCP