[MCPB]: Add a Claude Desktop bundle for the MCP server - #7
Merged
Merged
Conversation
Claude Desktop's remote connector UI cannot send an API token header, so it could not talk to the server at all. The bundle wraps a dependency-free Node script that speaks stdio to Desktop and forwards each message verbatim over HTTPS with the token attached, so it gains no capabilities of its own. Packs to a 2.9 kB, three-file bundle. CI runs the proxy tests and attaches a build as an artifact. Prompt: Can you help me build a MCPB to allow our staff to access the admin MCP server? Also add details to the readme, including how to build and how to install Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
erimicel
approved these changes
Sep 18, 2026
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.
Claude Code can talk to the server over HTTP directly, but Claude Desktop cannot — its remote connector UI has no way to send an API token header, so Desktop users had no route in at all.
This adds an MCPB bundle under
mcpb/: a.mcpbfile that installs into Claude Desktop with a double-click. Inside is a dependency-free Node script that speaks stdio to Desktop and forwards every message verbatim to the server over HTTPS with the token attached — so it understands nothing about MCP and gains no capabilities of its own. The tools a user sees are exactly the ones their account can already reach in admin.Three
user_configfields (server URL, API token, auth header name) keep the bundle generic, so anyone using the gem can pack their own. The token is stored in the OS keychain and revocable from the existing MCP Tokens page.Packs to a 2.9 kB, three-file bundle with no
node_modules.Testing Notes
Automated:
cd mcpb && npm test— 13 tests spawning the proxy as a real child process against a stub HTTP server: header injection (default and custom), chunk-split and multi-message stdin, the 204 notification case, unreachable server, non-JSON error bodies, parse errors, and missing configuration. CI runs these and attaches a packed bundle as an artifact.Manual — happy path:
cd mcpb && npx @anthropic-ai/mcpb pack . ../activeadmin-mcp.mcpb.mcpb, fill in the server URL, token, and (for Olio)X-MCP-Authorizationas the auth header.Verified end to end against production, which uses the custom header:
The notification correctly produced no reply.
Error cases:
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"The server rejected the API token (HTTP 401). Generate a new token in the admin panel and update the extension's settings."}}— confirmed against production.-32603error naming the URL, rather than Desktop hanging forever on a reply that never comes.README: new "Claude Desktop (MCPB bundle)" section covering how it works, building, installing, revoking access, and troubleshooting.
🤖 Generated with Claude Code