Skip to content

bug: uteke init --agent hermes generates plugin missing __init__.py, causing load failure #402

Closed

Description

@ajianaz

Description

When uteke init --agent hermes generates the Hermes plugin template at ~/.hermes/plugins/uteke-tool/, it creates plugin.yaml and tool.py but does not create an __init__.py file. Hermes requires __init__.py in the plugin directory to load it as a Python package.

Additionally, the MCP server integration path (uteke-mcp-run) connects successfully but its tools are not injected into the Hermes agent's available tool list, making the MCP setup effectively non-functional despite appearing healthy in hermes mcp test.

Error Log (Plugin)

2026-06-20 17:01:22,158 WARNING hermes_cli.plugins: Failed to load plugin 'uteke-tool': No __init__.py in /Users/ajianaz/.hermes/plugins/uteke-tool

This warning appears on every Hermes startup and the plugin never loads.


Bug 1: Missing __init__.py in generated plugin

Current Plugin Directory Structure

~/.hermes/plugins/uteke-tool/
├── README.md
├── plugin.yaml
└── tool.py        # ← No __init__.py!

Expected Plugin Directory Structure

~/.hermes/plugins/uteke-tool/
├── __init__.py    # ← Missing — required by Hermes plugin loader
├── README.md
├── plugin.yaml
└── tool.py

Steps to Reproduce

  1. Install uteke v0.2.0
  2. Run uteke init --agent hermes
  3. Enable the plugin: hermes plugins enable uteke-tool
  4. Restart Hermes
  5. Check logs: grep uteke ~/.hermes/logs/errors.log

Bug 2: MCP server tools not injected into agent tool list

Symptoms

MCP server uteke connects and discovers tools successfully:

$ hermes mcp test uteke
Testing 'uteke'...
  Transport: stdio → /Users/ajianaz/.local/bin/uteke-mcp-run
  Auth: none
  ✓ Connected (378ms)
  ✓ Tools discovered: 6

    uteke_remember     Store a memory in uteke semantic memory...
    uteke_recall       Semantic recall from uteke...
    uteke_search       Keyword text search in uteke memory...
    uteke_stats        Get uteke memory store statistics...
    uteke_forget       Delete a specific memory from uteke by ID.
    uteke_list         List memories from uteke...

However, none of the 6 tools (mcp_uteke_remember, mcp_uteke_recall, etc.) appear in the agent's available tool list during a session. The agent cannot call them — only CLI wrapper via terminal() works.

MCP Server Config (working)

# ~/.hermes/config.yaml
mcp_servers:
  uteke:
    command: /Users/ajianaz/.local/bin/uteke-mcp-run
    enabled: true

MCP Server Binary

uteke-mcp-run is a wrapper script that invokes uteke-mcp-server via Hermes Python (which has the mcp==1.26.0 SDK):

#!/bin/bash
exec /Users/ajianaz/.hermes/hermes-agent/venv/bin/python -u /Users/ajianaz/.local/bin/uteke-mcp-server "$@"

JSON-RPC Response (verified)

The MCP server responds correctly to initialize and tools/list:

{"jsonrpc":"2.0","id":2,"result":{"tools":[
  {"name":"uteke_remember","description":"Store a memory...","inputSchema":{...}},
  {"name":"uteke_recall","description":"Semantic recall...","inputSchema":{...}},
  {"name":"uteke_search","description":"Keyword text search...","inputSchema":{...}},
  {"name":"uteke_stats","description":"Get statistics...","inputSchema":{...}},
  {"name":"uteke_forget","description":"Delete memory...","inputSchema":{...}},
  {"name":"uteke_list","description":"List memories...","inputSchema":{...}}
]}}

What's Missing in Logs

No MCP discovery log entries appear during session startup — e.g., no discover_mcp_tools or registering mcp_uteke_* messages. The MCP stderr log only shows starting MCP server 'uteke' entries, suggesting the connection is established but tool injection into the agent's toolset may not be happening for the TUI/desktop gateway.

Possible Causes

  1. uteke side: The uteke-mcp-server may not be sending the correct protocol handshake or capability flags that Hermes expects for tool registration
  2. Hermes side: The TUI/desktop gateway may not run MCP tool discovery at session startup (only the hermes mcp test CLI does)
  3. Transport issue: The stdio transport may work for one-shot testing but fail for persistent session injection

Steps to Reproduce

  1. Configure MCP server in ~/.hermes/config.yaml as shown above
  2. Run hermes mcp test uteke — confirms 6 tools connected
  3. Start a new Hermes session (TUI or desktop)
  4. The agent has no mcp_uteke_* tools in its available tool list
  5. Only terminal() wrapper can call uteke CLI commands

Environment

  • uteke: 0.2.0 (Rust binary, M1 arm64)
  • uteke-mcp-server: Python script (MCP SDK 1.26.0 via Hermes venv)
  • Hermes Agent: v0.16.0 (2026.6.5)
  • Platform: macOS 26.5 (Apple Silicon)
  • Python: 3.11.15
  • MCP SDK: 1.26.0

Related Issues

Activity

  1. added
    bug
    scope:cli
    scope:integration
    on Jun 20, 2026
  2. ajianaz commented on Jun 21, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #413. now generates in the plugin directory.

    For Bug 2 (MCP tools not injected): this is a Hermes-side issue. The uteke MCP server correctly responds to — the problem is in Hermes' TUI/desktop gateway.

  3. added 3 commits that reference this issue on Jun 21, 2026
  4. added 2 commits that reference this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:mediumscope:cliscope:integration

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions