hermes-agent/tests/tools
0xbyt4 3c252ae44b feat: add MCP (Model Context Protocol) client support
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"]
2026-03-02 21:03:14 +03:00
..
__init__.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_approval.py test: add regression tests for recursive delete false positive fix 2026-02-26 16:40:44 +03:00
test_clarify_tool.py test(tools): add unit tests for clarify_tool.py 2026-02-27 03:29:26 -05:00
test_code_execution.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_cron_prompt_injection.py fix: cron prompt injection scanner bypass for multi-word variants 2026-02-26 13:55:54 +03:00
test_cronjob_tools.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_debug_helpers.py test: add unit tests for 8 untested modules (batch 3) (#191) 2026-03-01 05:28:12 -08:00
test_delegate.py Merge remote-tracking branch 'origin/main' into codex/align-codex-provider-conventions-mainrepo 2026-02-26 10:56:29 -08:00
test_file_operations.py fix(tools): preserve empty content in ReadResult.to_dict() 2026-03-01 02:42:15 +03:00
test_file_tools.py test: enhance session source tests and add validation for chat types 2026-02-26 00:53:57 -08:00
test_file_tools_live.py feat(tests): add live integration tests for file operations and shell noise filtering 2026-02-28 22:57:58 -08:00
test_fuzzy_match.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_interrupt.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_mcp_tool.py feat: add MCP (Model Context Protocol) client support 2026-03-02 21:03:14 +03:00
test_memory_tool.py test: add unit tests for 8 untested modules 2026-02-26 13:27:58 +03:00
test_patch_parser.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_process_registry.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_registry.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_session_search.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_skill_view_traversal.py fix(security): block path traversal in skill_view file_path (fixes #220) 2026-03-02 02:00:09 -08:00
test_skills_guard.py test: add unit tests for 8 untested modules (batch 3) (#191) 2026-03-01 05:28:12 -08:00
test_skills_sync.py test: add unit tests for 8 untested modules (batch 3) (#191) 2026-03-01 05:28:12 -08:00
test_todo_tool.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_write_deny.py fix: resolve symlink bypass in write deny list on macOS 2026-02-26 13:30:55 +03:00