Repository navigation
bundles
A server's plugins as a Claude Code marketplace the client installs: marketplace.json and one
archive per bundle, served over plain HTTP, built per request from exactly what that request is
served. The text in an archive is the served text written back into a local plugin's forms. This
area covers the bundle routes, what an archive holds and how its text is translated.
- A person adds a server's marketplace by URL and installs its bundle: the skills, commands and
agents land as a local plugin, and the client sends
X-MCP-Via: localfrom then on. - A scoped marketplace URL (a library, a tag) installs only what that scope serves.
- A skill that names its reference by
skill://address works locally, because the archive names it by path below the plugin root. - A command written with
{{ name }}placeholders runs locally with Claude Code's arguments. - The server moves behind a gateway at a new path, and the archive links in its marketplace follow the request, with no config to change.
BND-1. (proposed) What is served to a request, and through which view, is the
plugin layer's (PLUG-53, PLUG-54). That a local client sees nothing twice is
delivery's (DLV-9). The gateway route that forwards the client's host and path
belongs to the deployment.
BND-2. (proposed) mcp.serve_bundles(path="/plugins") serves two kinds of route below
path:
-
GET <path>/.claude-plugin/marketplace.json, the marketplace; -
GET <path>/<bundle>.zip, one archive.
Each runs the server's view (PLUG-53) on its own HTTP request, so a marketplace and its archives serve what an MCP request with the same headers and query is served.
BND-3. (proposed) A bundle is every plugin served under one namespace's first segment:
kit and kit/tools are one bundle, kit. A bundle with nothing in the request's view is absent
from the marketplace, and its archive answers 404.
BND-4. (proposed) An archive's URL in the marketplace is built from the request: its scheme
from X-Forwarded-Proto, else the request's; its host from X-Forwarded-Host, else Host; its
path from X-Forwarded-Prefix and path; and the request's query kept, so the scope travels to the
archive. Nothing in the server's config names its public address.
BND-5. (proposed) marketplace.json is Claude Code's marketplace format: name, the server's
name; owner; and plugins, one entry per bundle in the view, in namespace order, each with
name (the bundle), description, version (BND-8), and source, {"source": "url", "url": <the archive>, "sha256": <the archive's digest>}.
BND-6. (proposed) An archive is a zip whose top is the plugin root:
.claude-plugin/plugin.json (name, description, version), then skills/<name>/…,
commands/<path> and agents/<path>, laid out so Claude Code reads the local names the MCP names
come from (PLUG-37): a skill folder per served skill, and each command and agent at its path below
its folder, with a namespace's segments after the first as leading folders.
BND-7. (proposed) An archive is deterministic: its members sorted, each with one fixed
timestamp and mode. The same view of the same generation gives the same bytes, so its sha256 is
stable until what it holds changes.
BND-8. (proposed) A bundle's version changes exactly when its archive's bytes change.
BND-9. (proposed) Text is translated while the archive is built, over each text file (PLUG-58) as served, so after every rewriter (PLUG-56). Binary files go in as served.
BND-10. (proposed) A skill:// URI of a file in the same bundle becomes
${CLAUDE_PLUGIN_ROOT}/skills/<name>/<file>. One of another bundle stays as it is, and reads while
the server is connected.
BND-11. (proposed) A command's {{ name }} placeholders become Claude Code's: the one argument
of a command that has exactly one becomes $ARGUMENTS, and each of several becomes $<n> in the
order its arguments lists them. Its arguments mapping becomes the list of names Claude Code
reads, and argument-hint is written from them when the file has none.
BND-12. (proposed) A prompt's disable-model-invocation and user-invocable are kept as
written, and so is every other frontmatter key.
These pages describe what is on main; the spec says what is built and what is only proposed.
kubed-mcp · MIT