[MCP] Integrate Model Context Protocol into Hermes — client + server #1121

Open
opened 2026-04-07 21:17:06 +00:00 by Timmy · 0 comments
Owner

Objective

Integrate Model Context Protocol (MCP) natively into Hermes so that agents can discover, invoke, and expose tools through a standardized protocol — both as MCP clients (calling external servers) and MCP servers (exposing Hermes tools to other agents).

Background

MCP is emerging as the "USB-C for AI tools." Claude Desktop, Cursor, and a growing ecosystem of local tools speak it. Hermes currently has a bespoke tool system (tools/*.py). Adding MCP makes us compatible with the broader agent ecosystem without rewriting every integration.

Acceptance Criteria

Phase 1 — MCP Client (1 week)

  • Hermes can load MCP servers from a JSON config file (~/.hermes/mcp_servers.json)
  • Native MCP client using mcp Python SDK or stdio/http transport
  • Hermes dynamically discovers tools from configured MCP servers at startup
  • At least 1 external MCP server proven working (e.g., filesystem, fetch, or github)

Phase 2 — MCP Server (1 week)

  • Hermes can expose its own toolset as an MCP server (python -m hermes.mcp_server)
  • Another MCP client (Claude Desktop, Cursor, or a second Hermes instance) can call Hermes tools through MCP
  • Server passes the mcp SDK inspector tests without errors

Phase 3 — Integration + Hardening (1 week)

  • Documentation: the-nexus/docs/hermes-mcp.md with setup, config schema, and troubleshooting
  • Poka-yoke: if an MCP server fails to start, Hermes logs the error but does not crash
  • CI test: a pytest suite validates both client and server behavior in tests/test_mcp.py

Suggested Implementation Path

  1. Add mcp>=1.0.0 to requirements (or vendor if we want zero-dependency purity)
  2. Build agent/mcp_client.py wrapping the SDK
  3. Build agent/mcp_server.py exposing selected Hermes tools
  4. Register both in hermes/__main__.py or config loader

Owner

Bezalel (forge) with review from Ezra (agent architecture)

Linked Epic

#1120

## Objective Integrate Model Context Protocol (MCP) natively into Hermes so that agents can discover, invoke, and expose tools through a standardized protocol — both as MCP clients (calling external servers) and MCP servers (exposing Hermes tools to other agents). ## Background MCP is emerging as the "USB-C for AI tools." Claude Desktop, Cursor, and a growing ecosystem of local tools speak it. Hermes currently has a bespoke tool system (`tools/*.py`). Adding MCP makes us compatible with the broader agent ecosystem without rewriting every integration. ## Acceptance Criteria ### Phase 1 — MCP Client (1 week) - [ ] Hermes can load MCP servers from a JSON config file (`~/.hermes/mcp_servers.json`) - [ ] Native MCP client using `mcp` Python SDK or stdio/http transport - [ ] Hermes dynamically discovers tools from configured MCP servers at startup - [ ] At least 1 external MCP server proven working (e.g., `filesystem`, `fetch`, or `github`) ### Phase 2 — MCP Server (1 week) - [ ] Hermes can expose its own toolset as an MCP server (`python -m hermes.mcp_server`) - [ ] Another MCP client (Claude Desktop, Cursor, or a second Hermes instance) can call Hermes tools through MCP - [ ] Server passes the `mcp` SDK inspector tests without errors ### Phase 3 — Integration + Hardening (1 week) - [ ] Documentation: `the-nexus/docs/hermes-mcp.md` with setup, config schema, and troubleshooting - [ ] Poka-yoke: if an MCP server fails to start, Hermes logs the error but does not crash - [ ] CI test: a pytest suite validates both client and server behavior in `tests/test_mcp.py` ## Suggested Implementation Path 1. Add `mcp>=1.0.0` to requirements (or vendor if we want zero-dependency purity) 2. Build `agent/mcp_client.py` wrapping the SDK 3. Build `agent/mcp_server.py` exposing selected Hermes tools 4. Register both in `hermes/__main__.py` or config loader ## Owner Bezalel (forge) with review from Ezra (agent architecture) ## Linked Epic #1120
bezalel was assigned by Timmy 2026-04-08 14:16:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#1121