fix: make the marketplace manifest installable, resolve the binary at runtime - #18
Merged
Merged
Conversation
… runtime `.claude-plugin/marketplace.json` was not a marketplace manifest — it held display metadata (tagline, tags, icon) and none of the three fields the format requires, so `claude plugin marketplace add CodeWithJuber/connector-hub` had nothing to read. Rewritten with `name`, `owner`, and a `plugins` array whose single entry points at the repo root. `claude plugin validate .` now passes. The plugin's `.mcp.json` also pointed straight at `crates/target/release/connector-hub`. Plugin hosts install by cloning, so that path never exists at install time and the server failed to start with no useful message. Added `bin/connector-hub-mcp`, which resolves a binary from `$CONNECTOR_HUB_BIN`, the release build, the debug build, or `$PATH`, and otherwise exits with the exact cargo command to run. It also pins `CONNECTOR_HUB_SPECS_DIR` to the checkout's own `specs/`, so a binary built elsewhere still loads this checkout's catalogue. Manifests bumped to 2.2.0; parity check still passes. Verified: launcher serves MCP from an unrelated cwd and returns all 24 providers / 301 operations; `connector-hub validate` and `claude plugin validate .` both pass.
MCP hosts launch stdio servers with a bare environment, so a plugin-installed hub started with no provider credentials at all — every call returned ConfigurationRequired even when the keys existed in the user's shell profile. The launcher now sources $CONNECTOR_HUB_ENV, defaulting to ~/.config/connector-hub/env, before exec. One file per machine instead of the same key pasted into every agent's MCP config. Documented in the README, including why an empty-string value is worse than a commented-out one.
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.
Follow-up to #17. Two things still stopped the repo from installing as a plugin.
1.
marketplace.jsonwas not a marketplace manifestIt contained
tagline,tags,icon— display metadata — and none ofname+owner+plugins, which the format requires.claude plugin marketplace add CodeWithJuber/connector-hubhad nothing to read.Rewritten with a
pluginsarray whose single entry hassource: "./"(the plugin is the repo root).claude plugin validate .now passes — one warning, for theinterfaceblock that the Codex and Kimi manifests use and Claude Code ignores.2.
.mcp.jsonpointed at a build artifact that does not exist at install timeIt called
${CLAUDE_PLUGIN_ROOT}/crates/target/release/connector-hubdirectly. Plugin hosts install by cloning the repo —target/is gitignored, so that path is always missing on a fresh install and the server failed to start with nothing useful on stderr.Added
bin/connector-hub-mcp, which resolves a binary in this order:$CONNECTOR_HUB_BIN— explicit override$CLAUDE_PLUGIN_ROOT/crates/target/release/connector-hubconnector-hubon$PATH— covers anyone who already built itIf none resolve it exits with the exact
cargo build --releasecommand to run, instead of a silent failure. It also exportsCONNECTOR_HUB_SPECS_DIRfrom the checkout when unset, so a binary found on$PATHstill loads this checkout's catalogue rather than whichever one it was built next to.Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_018Xs4hZtZhd9Vi6EJnVnwDf