Skip to content

fix(packaging): include mcp_serve in py-modules so hermes mcp serve works on pip installs#35044

Merged
teknium1 merged 1 commit into
NousResearch:mainfrom
liuhao1024:fix/mcp-serve-packaging
May 30, 2026
Merged

fix(packaging): include mcp_serve in py-modules so hermes mcp serve works on pip installs#35044
teknium1 merged 1 commit into
NousResearch:mainfrom
liuhao1024:fix/mcp-serve-packaging

Conversation

@liuhao1024

@liuhao1024 liuhao1024 commented May 29, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the missing mcp_serve module to the setuptools py-modules list in pyproject.toml, fixing hermes mcp serve crashing with ModuleNotFoundError: No module named 'mcp_serve' on standard pip installs.

Related Issue

Fixes #34871

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • pyproject.toml: Added "mcp_serve" to the [tool.setuptools] py-modules list so the top-level module is included in built wheels

How to Test

  1. Install hermes-agent via pip: pip install hermes-agent
  2. Run hermes mcp serve
  3. Verify it no longer crashes with ModuleNotFoundError: No module named 'mcp_serve'

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/test_mcp_serve.py tests/hermes_cli/test_mcp_config*.py -q and all tests pass (119 passed)
  • I've added tests for my changes -- or N/A (packaging metadata change, existing tests cover the module)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) -- or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys -- or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows -- or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide -- or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior -- or N/A

Code Intelligence

  • GitNexus unavailable -- grep-based fallback used.
  • Checked: pyproject.toml (py-modules list), hermes_cli/mcp_config.py:794 (from mcp_serve import run_mcp_server), mcp_serve.py (root module, 897 lines)
  • Blast radius: LOW -- single packaging metadata line, no code logic changes
  • Related patterns: Other top-level modules (run_agent, model_tools, etc.) already in the list; mcp_serve was the only missing one

Infographic

mcp_serve packaging fix

…orks on pip installs

mcp_serve.py was missing from the setuptools py-modules list, causing
hermes mcp serve to crash with ModuleNotFoundError on standard pip installs.

Fixes NousResearch#34871
@liuhao1024 liuhao1024 requested a review from a team May 29, 2026 23:56
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/mcp MCP client and OAuth labels May 30, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #22148 — both PRs make the identical one-line change (add mcp_serve to py-modules in pyproject.toml). #22148 was filed first and is already triaged.

@teknium1 teknium1 merged commit a57cc00 into NousResearch:main May 30, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/mcp MCP client and OAuth type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hermes mcp serve crashes with ModuleNotFoundError: No module named 'mcp_serve' on standard pip install

3 participants