Remote OpenClaw Blog
Hermes Agent MCP Integration: How to Use Model Context Protocol
7 min read ·
Hermes Agent supports Model Context Protocol (MCP) natively, allowing the agent to connect to external tool servers for GitHub, databases, file systems, and custom APIs through a standardized interface. As of Hermes Agent v0.7.0 (released April 3, 2026), MCP integration includes automatic server discovery, dynamic tool updates, and support for both stdio and HTTP server types.
MCP solves a fundamental problem in AI agent design: instead of building every integration directly into the agent, MCP lets the agent connect to specialized tool servers that expose capabilities through a standard protocol. This means Hermes Agent can interact with any service that has an MCP server — without requiring changes to the agent's core code.
What Is Model Context Protocol?
Model Context Protocol (MCP) is an open standard created by Anthropic that defines how AI agents communicate with external tool servers. It provides a uniform way for agents to discover, invoke, and receive results from tools hosted outside the agent's own process.
Before MCP, every agent framework built its own integration layer. If you wanted Hermes Agent to interact with GitHub, you needed a GitHub-specific plugin. With MCP, any service that exposes an MCP-compliant server becomes immediately usable by any MCP-compatible agent — including Hermes Agent, OpenClaw, and Claude Desktop.
The protocol defines three core capabilities: tool invocation (agent calls a tool on the server), resource access (agent reads data from the server), and sampling (server requests LLM inference from the agent). This bidirectional communication makes MCP more flexible than simple API wrappers.
How Hermes Agent Uses MCP
Hermes Agent treats MCP servers as first-class tool providers that integrate directly into its tool registry. When Hermes starts, it connects to all configured MCP servers, discovers their available tools, and registers those tools alongside its built-in capabilities.
This means the agent does not distinguish between built-in tools and MCP tools during task execution. If a task requires a GitHub pull request review and a database query, Hermes will call the GitHub MCP server for the PR data and the database MCP server for the query — seamlessly mixing tool sources within a single conversation.
Automatic Discovery
At startup, Hermes queries each configured MCP server for its tool list. The server responds with tool names, descriptions, and parameter schemas. Hermes registers all of these into its internal tool registry, making them available to the LLM for tool calling.
Dynamic Updates
MCP servers can notify Hermes when their tool list changes at runtime by sending a notifications/tools/list_changed notification. Hermes automatically re-fetches the updated tool list without requiring a restart. This is useful for MCP servers that add or remove capabilities based on external state.
MCP Server Types Compared
Hermes Agent supports two distinct MCP server types, each suited to different deployment scenarios.
| Feature | Stdio Server | HTTP Server |
|---|---|---|
| Communication | stdin/stdout (local process) | HTTP/HTTPS (network) |
| Deployment | Runs as subprocess of Hermes | Runs on any reachable host |
| Latency | Very low (inter-process) | Variable (network dependent) |
| Security | Inherits host permissions | Requires auth configuration |
| Best for | File system, local tools, CLI wrappers | Remote APIs, shared services, cloud tools |
| Example | Filesystem MCP server, SQLite MCP server | GitHub MCP server, Slack MCP server |
Stdio servers are simpler to set up because they run locally and do not require network configuration. HTTP servers are more flexible because they can run on separate machines and serve multiple agents simultaneously.
Setting Up MCP Servers in Hermes
MCP server configuration in Hermes Agent lives in ~/.hermes/config.yaml under the mcp_servers key. Each server entry specifies the server type, command or URL, and any required environment variables.
Stdio Server Example (Filesystem)
mcp_servers:
filesystem:
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- "/home/user/projects"
HTTP Server Example (GitHub)
mcp_servers:
github:
type: http
url: "http://localhost:8080"
env:
GITHUB_TOKEN: "ghp_your_token_here"
Verifying the Connection
After adding server configurations, restart Hermes Agent and check the logs for successful tool registration:
docker compose restart hermes
docker compose logs hermes | grep "MCP"
You should see log entries confirming each MCP server connection and the number of tools registered from each server.
Marketplace
Free skills and AI personas for OpenClaw — browse the marketplace.
Browse the Marketplace →Common MCP Server Connections
The MCP ecosystem includes dozens of community-maintained servers covering popular services. These are the most commonly used with Hermes Agent as of April 2026.
GitHub MCP Server
Provides tools for repository management, pull request operations, issue tracking, and code search. Requires a GitHub personal access token. This is one of the most popular MCP servers for development-focused Hermes deployments.
SQLite / PostgreSQL MCP Server
Exposes database query and schema inspection tools. Useful for agents that need to read from or write to databases as part of their workflows. The SQLite server is particularly relevant since Hermes Agent uses SQLite for its own memory storage.
Filesystem MCP Server
Grants the agent read/write access to specified directories on the host filesystem. Access is sandboxed to the paths you configure — the server will not allow operations outside those directories.
Slack MCP Server
Adds tools for channel management, message posting, and user lookup beyond what Hermes Agent's built-in Slack gateway provides. Useful when you need programmatic Slack operations rather than conversational messaging.
For a broader overview of MCP server options, see the MCP servers explained guide, which covers the protocol in the context of both OpenClaw and Hermes Agent.
Advanced MCP Features
Hermes Agent's MCP implementation includes several capabilities beyond basic tool invocation that are worth understanding for advanced deployments.
LLM Sampling
MCP servers can request LLM inference from Hermes Agent through the sampling/createMessage protocol, as defined in the MCP specification. This allows an MCP server to ask the agent to generate text — for summarization, classification, or content creation — without maintaining its own model connection. The agent uses its configured LLM provider to fulfill these requests.
Resource Access
Beyond tools, MCP servers can expose resources — data objects that the agent can read but not modify through tool calls. Resources are useful for providing context (documentation, configuration files, reference data) that the agent can incorporate into its reasoning.
Per-Model Tool Call Parsers
Hermes Agent includes optimized tool call parsers for different LLM providers. This matters for MCP because tool calling formats vary between models. Hermes automatically translates MCP tool schemas into the correct format for whichever model you are using — whether that is Claude, GPT-4.1, or a local Ollama model.
Limitations and Tradeoffs
MCP integration adds significant flexibility but comes with costs and constraints that should inform your deployment decisions.
- Token overhead increases with each server. Every connected MCP server adds tool definitions to the agent's context window. According to Hermes Agent documentation, tool definitions consume a significant portion of each API request. Connecting too many servers (10+) can meaningfully increase per-request costs.
- Stdio servers increase memory usage. Each stdio MCP server runs as a subprocess of the Hermes Agent process. On memory-constrained VPS plans, running multiple stdio servers alongside the agent may cause resource contention.
- HTTP servers add latency. Remote MCP servers introduce network latency for every tool call. For time-sensitive workflows, prefer stdio servers or colocate HTTP servers on the same host.
- Security model requires careful configuration. MCP servers can have broad permissions (filesystem access, database write access, API tokens). Misconfigured MCP servers can expose sensitive data or systems to the agent. Review each server's permission scope before connecting it.
- Not all MCP servers are equally maintained. The MCP ecosystem is growing rapidly, but server quality varies. Test MCP servers in a development environment before connecting them to production Hermes Agent instances.
Related Guides
- What Is Hermes Agent?
- OpenClaw MCP Servers Explained
- OpenClaw vs Hermes Agent
- AI Agent Frameworks Compared 2026
Frequently Asked Questions
What is MCP in Hermes Agent?
MCP (Model Context Protocol) is an open standard that lets AI agents connect to external tool servers. In Hermes Agent, MCP allows the agent to use tools hosted outside its own process — GitHub APIs, databases, file systems, browser stacks, and custom services — through a standardized protocol. Hermes discovers MCP servers at startup and registers their tools automatically.
Which MCP server types does Hermes Agent support?
Hermes Agent supports two MCP server types: stdio servers that run as local subprocesses communicating over stdin/stdout, and HTTP servers that connect to remote endpoints over the network. Both types are configured in the mcp_servers section of ~/.hermes/config.yaml.
Does Hermes Agent support dynamic MCP tool updates?
Yes. MCP servers can send a notifications/tools/list_changed notification to Hermes Agent at runtime. When Hermes receives this notification, it automatically re-fetches the server's tool list and updates its internal tool registry without requiring a restart.
Can MCP servers request LLM inference from Hermes Agent?
Yes. Through the sampling/createMessage protocol, an MCP server can ask Hermes Agent to generate text on its behalf. This enables MCP servers to leverage the agent's configured LLM provider for tasks like summarization, classification, or content generation without maintaining their own model connections.
How many MCP servers can Hermes Agent connect to simultaneously?
There is no hard limit on the number of MCP servers Hermes Agent can connect to. However, each connected server adds tools to the agent's registry, which increases the token overhead per API call. In practice, connecting 3-5 MCP servers with a combined 15-25 tools works well without significantly impacting response latency or cost.