Skip to content

feat: interactive MCP tool configuration in hermes tools - #1694

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-c91521bf
Mar 17, 2026
Merged

feat: interactive MCP tool configuration in hermes tools#1694
teknium1 merged 1 commit into
mainfrom
hermes/hermes-c91521bf

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Adds the ability to selectively enable/disable individual MCP server tools through the interactive hermes tools TUI.

Problem

Users could configure MCP tool filters via:

  • CLI commands: hermes tools disable github:create_issue
  • Manual config editing: mcp_servers.<name>.tools.exclude

But the interactive hermes tools curses TUI only showed built-in toolsets. Users had no way to browse available MCP tools or toggle them visually — they had to already know the tool names.

Solution

tools/mcp_tool.py — New probe_mcp_server_tools() function:

  • Temporarily connects to configured MCP servers
  • Discovers tool names and descriptions via the MCP protocol
  • Disconnects cleanly — no registry side effects
  • Returns {server_name: [(tool_name, description), ...]}

hermes_cli/tools_config.py — New "Configure MCP tools" menu option:

  • Appears in the interactive menu when MCP servers are configured
  • Probes servers with progress feedback
  • Shows a per-server curses checklist with tool descriptions (truncated to 70 chars)
  • Pre-selects tools based on existing include/exclude config
  • Writes changes back as tools.exclude entries
  • Reports which servers failed to connect

UX Flow

hermes tools → Select an option:
  1. Configure CLI (15/17 enabled)
  2. Configure Telegram (12/17 enabled)
  3. Reconfigure an existing tool's provider or API key
  4. Configure MCP tools     ← NEW
  5. Done

When "Configure MCP tools" is selected:

  1. Shows "Discovering tools from MCP servers..."
  2. Connects to each enabled server
  3. For each server, shows a curses checklist:
MCP Server: github  (8 tools)
  ↑↓ navigate  SPACE toggle  ENTER confirm  ESC cancel
  → [✓] create_issue  (Create a new GitHub issue)
    [✓] search_repositories  (Search for GitHub repositories)
    [ ] delete_repository  (Permanently delete a repository)
  1. Saves selections to config.yaml

Tests

22 new tests covering:

  • Probe function: empty config, disabled servers, failed connections, missing descriptions, cleanup on failure
  • Interactive flow: pre-selection from exclude/include lists, description truncation, multi-server handling, cancel behavior, mode switching (include→exclude)

Existing behavior preserved

The CLI commands (hermes tools enable/disable server:tool) and the hermes tools list output continue to work unchanged.

Add the ability to selectively enable/disable individual MCP server
tools through the interactive 'hermes tools' TUI.

Changes:
- tools/mcp_tool.py: Add probe_mcp_server_tools() — lightweight function
  that temporarily connects to configured MCP servers, discovers their
  tools (names + descriptions), and disconnects. No registry side effects.

- hermes_cli/tools_config.py: Add 'Configure MCP tools' option to the
  interactive menu. When selected:
  1. Probes all enabled MCP servers for their available tools
  2. Shows a per-server curses checklist with tool descriptions
  3. Pre-selects tools based on existing include/exclude config
  4. Writes changes back as tools.exclude entries in config.yaml
  5. Reports which servers failed to connect

The existing CLI commands (hermes tools enable/disable server:tool)
continue to work unchanged. This adds the interactive TUI counterpart
so users can browse and toggle MCP tools visually.

Tests: 22 new tests covering probe function edge cases and interactive
flow (pre-selection, exclude/include modes, description truncation,
multi-server handling, error paths).
@teknium1
teknium1 merged commit ce7418e into main Mar 17, 2026
1 check failed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…h#1694)

Add the ability to selectively enable/disable individual MCP server
tools through the interactive 'hermes tools' TUI.

Changes:
- tools/mcp_tool.py: Add probe_mcp_server_tools() — lightweight function
  that temporarily connects to configured MCP servers, discovers their
  tools (names + descriptions), and disconnects. No registry side effects.

- hermes_cli/tools_config.py: Add 'Configure MCP tools' option to the
  interactive menu. When selected:
  1. Probes all enabled MCP servers for their available tools
  2. Shows a per-server curses checklist with tool descriptions
  3. Pre-selects tools based on existing include/exclude config
  4. Writes changes back as tools.exclude entries in config.yaml
  5. Reports which servers failed to connect

The existing CLI commands (hermes tools enable/disable server:tool)
continue to work unchanged. This adds the interactive TUI counterpart
so users can browse and toggle MCP tools visually.

Tests: 22 new tests covering probe function edge cases and interactive
flow (pre-selection, exclude/include modes, description truncation,
multi-server handling, error paths).
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…h#1694)

Add the ability to selectively enable/disable individual MCP server
tools through the interactive 'hermes tools' TUI.

Changes:
- tools/mcp_tool.py: Add probe_mcp_server_tools() — lightweight function
  that temporarily connects to configured MCP servers, discovers their
  tools (names + descriptions), and disconnects. No registry side effects.

- hermes_cli/tools_config.py: Add 'Configure MCP tools' option to the
  interactive menu. When selected:
  1. Probes all enabled MCP servers for their available tools
  2. Shows a per-server curses checklist with tool descriptions
  3. Pre-selects tools based on existing include/exclude config
  4. Writes changes back as tools.exclude entries in config.yaml
  5. Reports which servers failed to connect

The existing CLI commands (hermes tools enable/disable server:tool)
continue to work unchanged. This adds the interactive TUI counterpart
so users can browse and toggle MCP tools visually.

Tests: 22 new tests covering probe function edge cases and interactive
flow (pre-selection, exclude/include modes, description truncation,
multi-server handling, error paths).
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…h#1694)

Add the ability to selectively enable/disable individual MCP server
tools through the interactive 'hermes tools' TUI.

Changes:
- tools/mcp_tool.py: Add probe_mcp_server_tools() — lightweight function
  that temporarily connects to configured MCP servers, discovers their
  tools (names + descriptions), and disconnects. No registry side effects.

- hermes_cli/tools_config.py: Add 'Configure MCP tools' option to the
  interactive menu. When selected:
  1. Probes all enabled MCP servers for their available tools
  2. Shows a per-server curses checklist with tool descriptions
  3. Pre-selects tools based on existing include/exclude config
  4. Writes changes back as tools.exclude entries in config.yaml
  5. Reports which servers failed to connect

The existing CLI commands (hermes tools enable/disable server:tool)
continue to work unchanged. This adds the interactive TUI counterpart
so users can browse and toggle MCP tools visually.

Tests: 22 new tests covering probe function edge cases and interactive
flow (pre-selection, exclude/include modes, description truncation,
multi-server handling, error paths).
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…h#1694)

Add the ability to selectively enable/disable individual MCP server
tools through the interactive 'hermes tools' TUI.

Changes:
- tools/mcp_tool.py: Add probe_mcp_server_tools() — lightweight function
  that temporarily connects to configured MCP servers, discovers their
  tools (names + descriptions), and disconnects. No registry side effects.

- hermes_cli/tools_config.py: Add 'Configure MCP tools' option to the
  interactive menu. When selected:
  1. Probes all enabled MCP servers for their available tools
  2. Shows a per-server curses checklist with tool descriptions
  3. Pre-selects tools based on existing include/exclude config
  4. Writes changes back as tools.exclude entries in config.yaml
  5. Reports which servers failed to connect

The existing CLI commands (hermes tools enable/disable server:tool)
continue to work unchanged. This adds the interactive TUI counterpart
so users can browse and toggle MCP tools visually.

Tests: 22 new tests covering probe function edge cases and interactive
flow (pre-selection, exclude/include modes, description truncation,
multi-server handling, error paths).
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
…h#1694)

Add the ability to selectively enable/disable individual MCP server
tools through the interactive 'hermes tools' TUI.

Changes:
- tools/mcp_tool.py: Add probe_mcp_server_tools() — lightweight function
  that temporarily connects to configured MCP servers, discovers their
  tools (names + descriptions), and disconnects. No registry side effects.

- hermes_cli/tools_config.py: Add 'Configure MCP tools' option to the
  interactive menu. When selected:
  1. Probes all enabled MCP servers for their available tools
  2. Shows a per-server curses checklist with tool descriptions
  3. Pre-selects tools based on existing include/exclude config
  4. Writes changes back as tools.exclude entries in config.yaml
  5. Reports which servers failed to connect

The existing CLI commands (hermes tools enable/disable server:tool)
continue to work unchanged. This adds the interactive TUI counterpart
so users can browse and toggle MCP tools visually.

Tests: 22 new tests covering probe function edge cases and interactive
flow (pre-selection, exclude/include modes, description truncation,
multi-server handling, error paths).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant