feat: add Hermes Agent MCP integration with Windows stdio fix#2797
Open
OmniaZ1 wants to merge 1 commit into
Open
feat: add Hermes Agent MCP integration with Windows stdio fix#2797OmniaZ1 wants to merge 1 commit into
OmniaZ1 wants to merge 1 commit into
Conversation
- Add --hermes flag to setup/remove commands - Add YAML config writer for Hermes config.yaml - Implement hermes agent config with HTTP and stdio transports - Fix Windows npx path issue by using inline node -e script - Add unit tests for Hermes integration - Add skill name mapping for Hermes MCP tool naming convention
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context7 MCP integration for Hermes Agent
What does this PR do?
This PR adds full Hermes Agent MCP integration to Context7, enabling one-click setup of Context7 documentation tools for Hermes Agent users.
Features
1. New
--hermesflag for setup/remove commands2. Two transport modes supported
HTTP Mode (recommended):
Stdio Mode (for offline environments):
3. Windows stdio execution fix
Windows npm/npx has issues resolving scoped package bins from
npx -y @upstash/context7-mcp. The fix uses an inlinenode -escript that:require.resolve()to find the package_npxcache directorymodule._load()This reduces connection time from timeout/failure to ~1 second on Windows.
4. Hermes tool naming convention
Hermes MCP tools follow the
mcp_{server}_{tool}naming convention. This PR automatically adapts the Context7 skill and rule content:resolve-library-id→mcp_context7_resolve_library_idquery-docs→mcp_context7_query_docs5. Full test coverage
Files Changed
packages/cli/package.jsonyamldependencypackages/cli/src/setup/agents.tshermesagent config with Windows stdio fixpackages/cli/src/setup/mcp-writer.tsreadYamlConfig,writeYamlConfig,appendYamlServer,removeYamlServer)packages/cli/src/setup/templates.tspackages/cli/src/commands/setup.ts--hermesflagpackages/cli/src/commands/remove.ts--hermesflagpackages/cli/src/__tests__/setup.test.tspackages/cli/src/__tests__/remove.test.tspnpm-lock.yamlVerification
Platform Support
✅ Windows (fully tested, includes Windows-specific npm path fix)
✅ Linux (should work, uses standard node/npm paths)
✅ macOS (should work, uses standard node/npm paths)
Related Issues
Screenshots
Setup output:
Hermes connection test: