fix: make the hub installable outside its repo root - #17
Merged
Conversation
Three things blocked installing this hub globally into MCP hosts:
1. `specs/` was resolved as a bare relative path, so any host that launches
the binary with a different working directory got an empty catalogue —
zero providers, no error. Specs are now resolved via
`CONNECTOR_HUB_SPECS_DIR`, then `./specs`, then by walking up from the
executable.
2. Both plugin manifests point at `./.mcp.json` and `./skills/`; neither
existed, so the Claude Code and Codex plugins could not load. Added both.
The MCP entry uses `${CLAUDE_PLUGIN_ROOT}` and sets the specs dir
explicitly.
3. The four manifests advertised 21 providers / 278 operations; the catalogue
has been 24 / 301 since the ops connectors landed. Synced, bumped to 2.1.0.
Also collapses a `collapsible_match` in hub-net that fails
`cargo clippy -- -D warnings` on Rust 1.95+, which is what CI runs.
Verified: cargo fmt --check, clippy -D warnings, test --workspace, and
`connector-hub validate` (301 operations, 24 providers) all pass.
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.
Three things blocked installing this hub globally into MCP hosts.
1. Specs were unreachable from any working directory but the repo root
build_catalogue()andvalidateboth didPath::new("specs"). MCP hosts launch stdio servers with an arbitrary cwd, so the server started with zero providers and no error —list_providersjust returned an empty array.Specs are now resolved in order:
CONNECTOR_HUB_SPECS_DIR— explicit override./specs— repo-root invocation, unchanged behaviourspecs/found by walking up from the executable — coverscrates/target/release/connector-hub2. Both plugin manifests pointed at files that did not exist
.claude-plugin/plugin.jsonand.codex-plugin/plugin.jsondeclare"mcpServers": "./.mcp.json"and"skills": "./skills/". Neither path existed in the repo, so neither plugin could load. Added:.mcp.json— uses${CLAUDE_PLUGIN_ROOT}and setsCONNECTOR_HUB_SPECS_DIRexplicitly, which only works because of fix 1skills/connector-hub/SKILL.md— search → describe → dry-run → call workflow, how to read the five execution states, and the rule that a non-Succeededstate is never "probably worked"3. Manifest counts were stale
All four manifests advertised 21 providers / 278 operations. The catalogue has been 24 / 301 since the ops connectors landed —
README.mdalready said so. Synced and bumped to 2.1.0 (parity check invalidatestill passes).Also
hub-net/src/client.rshad acollapsible_matchthat failscargo clippy --all-targets -- -D warningson Rust 1.95+, which is what CI runs. Collapsed into a match guard; behaviour is identical (a null body on POST/PUT/PATCH still sends no JSON).Verification
Confirmed end to end: MCP handshake from a cwd outside the repo returns all 24 providers.
🤖 Generated with Claude Code
https://claude.ai/code/session_018Xs4hZtZhd9Vi6EJnVnwDf