mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-04 02:21:47 +00:00
Connect to external MCP servers via stdio transport, discover their tools
at startup, and register them into the hermes-agent tool registry.
- New tools/mcp_tool.py: config loading, server connection via background
event loop, tool handler factories, discovery, and graceful shutdown
- model_tools.py: trigger MCP discovery after built-in tool imports
- cli.py: call shutdown_mcp_servers in _run_cleanup
- pyproject.toml: add mcp>=1.2.0 as optional dependency
- 27 unit tests covering config, schema conversion, handlers, registration,
SDK interaction, toolset injection, graceful fallback, and shutdown
Config format (in ~/.hermes/config.yaml):
mcp_servers:
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_approval.py | ||
| test_clarify_tool.py | ||
| test_code_execution.py | ||
| test_cron_prompt_injection.py | ||
| test_cronjob_tools.py | ||
| test_debug_helpers.py | ||
| test_delegate.py | ||
| test_file_operations.py | ||
| test_file_tools.py | ||
| test_file_tools_live.py | ||
| test_fuzzy_match.py | ||
| test_interrupt.py | ||
| test_mcp_tool.py | ||
| test_memory_tool.py | ||
| test_patch_parser.py | ||
| test_process_registry.py | ||
| test_registry.py | ||
| test_session_search.py | ||
| test_skill_view_traversal.py | ||
| test_skills_guard.py | ||
| test_skills_sync.py | ||
| test_todo_tool.py | ||
| test_write_deny.py | ||