Repository navigation
plugins
How a server serves material: it registers a plugin, and this layer reads it and serves it. A
loader turns an address into a local folder; the folder is read as a Claude plugin, its manifest
first; and each kind it ships is served by one set of rules: skills as skill:// resources, commands
as MCP prompts, agents through the agents extension. This area covers kubed/mcp/plugins.py,
prompts.py and agents.py, and QuickMCP.add_plugin, add_loader and plugins.
- A server ships one plugin folder in its wheel and serves it with
mcp.add_plugin(PLUGIN_DIR): each skill atskill://<server>/<name>/SKILL.md, its commands as prompts, its agents onagents/list. - A server that serves one embedded skill adds its plugin with no namespace, and the skill is
skill://<server>/<name>/SKILL.md: there is no root. - A server that serves many plugins registers a loader for its own scheme, a git or WebDAV one, and
adds each plugin under a namespace it chooses,
add_plugin(address, namespace="grafana"). - Two plugins added under one namespace serve as one; a second skill at an address already served is refused, naming the plugin that holds it.
- A published manifest names a component path outside its plugin; the path is dropped with a warning, and the rest of the plugin serves.
- A plugin groups its commands and agents in folders, as Claude Code reads them:
commands/db/migrate.mdis Claude Code's/<plugin>:db:migrateand the MCP promptdb_migrate. - A person picks a command in a host's prompt picker, fills in its arguments and sends it.
- A host that implements the agents extension lists a server's agents and runs one as a subagent.
PLUG-1. How a skill is loaded, listed, read and offered through the Skills extension is the
skills area's (SKL-2 to SKL-23), and AdvertiseLegacyExtensions is SKL-22. QuickMCP
itself is the app's. A loader for a scheme other than file, and which plugins a server
adds under which namespace, belong to that server.
PLUG-2. mcp.add_plugin(address, *, namespace=None) takes a string or a path, picks the loader
by the address's scheme (PLUG-7), reads the folder it materialises (PLUG-10 to PLUG-14), serves every
kind the plugin ships, and returns the registered Plugin.
PLUG-3. A plugin that does not load is refused with a PluginError, a ValueError, whose message
is plugin <address> is not served: <reason>. It is refused when no loader answers its scheme, its
loader fails, its folder is not a folder, its manifest is refused (PLUG-11) or it would serve
something already served (PLUG-18). Everything is read and checked before anything is served, so a
refused plugin serves nothing and is not in mcp.plugins.
PLUG-4. mcp.plugins is the registry: a tuple of the plugins the server serves, in the order they
were added.
PLUG-5. A Plugin is a frozen dataclass:
| Field | Value |
|---|---|
name, description, version
|
from the manifest (PLUG-11) |
root |
the folder the loader materialised |
components |
a Components: the paths each kind is read from, skills, commands and agents, root-relative with . for the root, and the notes (PLUG-14) |
address |
the address as given, a path as its string |
namespace |
the namespace as served, the server's name unless the caller named one (PLUG-15) |
skills |
the skill:// URI of the SKILL.md of each skill served |
prompts, agents
|
the names served |
read_plugin(root) returns the first five fields from a folder, with no namespace and nothing served.
PLUG-41. A server has one skills provider, one prompts provider and one agents extension,
whatever its plugins: an EntryOnlySkillProvider (SKL-3) whose load_skills() is every plugin's
skills, a FastMCP provider of every plugin's commands, and the agents extension (PLUG-27). Each reads
the plugins served once per call, in the order they were added, from one set that adding a plugin
replaces whole and nothing changes in place. A plugin's prompts are not the server's local prompts:
a prompt the server adds itself under a plugin prompt's name is the one served, as FastMCP's local
components come first.
PLUG-6. PluginLoader is a Protocol: schemes, a tuple of the address schemes it answers, and
materialise(address) -> Path, a local folder holding the plugin. A loader fetches and does nothing
else: the folder is read by this layer, never by a loader. A loader that raises PluginError,
OSError or ValueError refuses the plugin with the exception's message as the reason; any other
exception propagates.
PLUG-7. An address's scheme is what precedes its ://, compared in lowercase. An address with
none, a bare path included, is a file address.
PLUG-8. LocalLoader answers file. It takes a path, or a file:// URL whose host is empty or
localhost, and serves the folder where it is, with no copy and no extra dependency. A URL naming
another host is refused, and so is a path that is not a folder: <path> is not a folder.
PLUG-9. mcp.add_loader(loader) registers a loader for each of its schemes. LocalLoader is
always registered. A loader naming no scheme, or a scheme that already has one, is refused with a
ValueError. An address whose scheme has no loader is refused with the reason
no loader for <scheme>:// addresses: register one with mcp.add_loader().
PLUG-10. A plugin's manifest is the first of .claude-plugin/plugin.json and plugin.json that is
a regular file inside the plugin's root once resolved: one that is a symlink out of the root is not
read. A plugin with no manifest is read from the conventions alone (PLUG-13) and named by its folder.
PLUG-11. A manifest that is not readable JSON, or not a JSON object, refuses the plugin, and so does
a skills, commands or agents that is not a string or a list of strings, naming the field; a
commands object map is PLUG-13's. name, description and version are read when they are
strings; name falls back to the folder's name when it is not a usable name (PLUG-15). Every other
field is ignored.
PLUG-12. A component path is published content, never trusted as a path. It loses a leading ./
and a trailing /, and . or ./ names the root. A path that is empty, absolute or holds a ..
segment is dropped, noted <field> path '<path>' leaves the plugin root, and the field's other paths
are kept. A path that does not start with ./ is kept and noted
<field> path '<path>' does not start with ./. A path given twice is read once.
PLUG-13. Each kind's conventional folder, skills/, commands/ or agents/, is read when it is a
folder inside the root, as Claude Code does:
- a manifest's
skillsadds to the conventionalskills/, which is read first; - a manifest's
commandsoragentsreplaces the conventional folder: only its paths are read (PLUG-38).
skills paths are folders; commands paths are folders or .md files; agents paths are .md files
only, never a folder, and any other is dropped, noted agents entry '<path>' is not a .md file. A
commands object map is noted commands object map is not served and serves no command.
PLUG-14. A note says what the manifest or the folder got wrong without failing the plugin. Each
note is logged once, as a warning plugin <name>: <note>, when the plugin is added, and kept in
Plugin.components.notes.
PLUG-38. When a manifest's commands or agents leaves that kind's conventional folder unread, the
plugin notes Default <folder>/ folder is ignored because the manifest sets "<key>", Claude Code's own
wording. A declared path that is the folder, a path inside it, or the root reads it, and earns no note:
"agents": ["./agents/reviewer.md"] and "commands": "./commands/" are quiet. A commands object map
serves nothing (PLUG-13), so it is noted too.
PLUG-36. A commands or agents folder that cannot be listed, a PermissionError on NFS for one, is
a note, <kind> entry '<path>' cannot be listed: <error>, <path> that folder's from the plugin root,
logged once as PLUG-14's warning, and nothing in it is served; a subfolder that cannot be listed is
noted the same way, and the rest of its entry serves. The rest of the plugin is served, the other kinds and the other entries of that
kind included: no folder that cannot be listed stops the plugin, or the server, from loading.
PLUG-15. A namespace of None is the server's own name, the name its QuickMCP was built with:
a plugin added with none is the server's own, and its skills are named folders under
skill://<server>. There is no root: a skill is always a named folder under a namespace, and an
empty or blank namespace ("", " ", /) is refused with a ValueError. Any other namespace is
the caller's choice, such as a library, and loses its leading and trailing /. Each / segment of a
namespace must be a usable name, which is not . or ... A usable name is one non-empty token with
no whitespace, no control or other invisible character, no /, no @ and no :, Claude Code's
segment separator (kb PLG-21, AGT-6). A namespace that breaks
this, the server's name included when it is the default, is refused with a ValueError, before
anything is read.
PLUG-16. A skill is served at skill://<namespace>/<name>/SKILL.md, <name> being its folder's
name, one level below the skills folder it was found in (PLUG-19). So on a server named
selenium-flow, skills/lint/ is skill://selenium-flow/lint/SKILL.md by default and
skill://kit/lint/SKILL.md under kit. A declared skills folder that is a skill itself is its own
name. A skill's sections, resources and helpers are files in its own
folder, read through its SKILL.md.
PLUG-17. A prompt's and an agent's name is its own (PLUG-37) under the server's name: a
host already reads both from one server. Under any other explicit namespace it is prefixed with the
namespace, its / written _, and a _: greet under kit is kit_greet. Two plugins under the
server's name share prompt and agent names, and a name both serve clashes (PLUG-18).
PLUG-18. Plugins added under one namespace merge: their skills, prompts and agents are served side
by side. A skill URI, a prompt name or an agent name that an earlier plugin serves refuses the new
plugin (PLUG-3), with the reason <what> is already served by plugin <name>. Within one plugin the
first in path order is served and a later one with the same URI or name is skipped, with a warning: so
agents/review/security.md (review_security) wins over agents/review_security.md. For a prompt or
an agent the warning names both files: agent <name> is already served by <first path>; <second path> is skipped, and likewise prompt <name> ....
PLUG-19. A plugin's skills are, in each of its skills folders, every folder directly in it holding a
SKILL.md, in name order: one level only, as Claude Code loads them. A skill owns everything under its
folder, so no folder below one is searched, and a dot folder is never searched. A declared skills path
that is not a folder inside the root is noted skills entry '<path>' is not a folder in the plugin.
PLUG-40. A SKILL.md deeper in a skills folder, skills/group/nested/SKILL.md, is not served,
and noted <path> is not served: a skill is one folder below its skills folder, its path from the
plugin root. One that another skills folder serves, a declared . reading skills/x/ say, is not
noted.
PLUG-20. Each skill is loaded strictly with load_skill (SKL-5): one FastMCP refuses is not
served, with an error naming its folder and the reason, and the rest of the plugin is served. The
skills every plugin serves are one catalogue, keyed by their paths (PLUG-16), served by one provider
(PLUG-41) through serve() (SKL-4). It is added with the first plugin that serves a skill, so a
server whose plugins serve none has no skills provider and no Skills extension.
PLUG-37. A plugin is laid out and named as Claude Code reads it with --plugin-dir (material
delivery F63), and an MCP name is Claude Code's local name with its : segment separator written _,
kb's translation (kb PLG-25, PRM-41 to PRM-44, AGT-5 to AGT-8). The plugin segment of the local name
is the namespace: no prefix under the server's own, <namespace>_ under another (PLUG-17).
| Kind | In the plugin | Claude Code, locally | MCP name | MCP address |
|---|---|---|---|---|
| skill |
skills/<name>/SKILL.md, one level only |
<plugin>:<name> |
the skill's name
|
skill://<namespace>/<name>/SKILL.md |
| command |
commands/<a>/…/<stem>.md, any depth |
/<plugin>:<a>:…:<stem> |
<a>_…_<stem> |
a prompt |
| agent |
agents/<a>/…/<file>.md, any depth |
<plugin>:<a>:…:<name> |
<a>_…_<name>, <name> the frontmatter's, else the stem |
agents/list, agents/get
|
So commands/db/migrate.md is the prompt db_migrate, kb_db_migrate under kb, and
agents/review/security.md named security is the agent review_security.
PLUG-39. Every segment of a command's or an agent's name, and the name they join into, must be a
usable name (PLUG-15). A file whose name is not, agents/x@y/r.md, is skipped with a warning naming the
file and agent name '<name>' is not a usable name, or prompt name '<name>' … for a command, and never
claims the name: a later file with a usable one is served under it.
PLUG-21. A plugin's command files are the *.md files at any depth in each of its commands
folders, in path order, and each .md file its manifest lists. A dot folder or dot file below the
folder is not read. A listed file that is not a regular file inside the root is noted
commands entry '<path>' is not in the plugin, and a listed folder that is not a folder inside it
commands entry '<path>' is not a folder in the plugin. A file that resolves outside the root is not
read.
PLUG-22. A command is served as an MCP prompt named as PLUG-37 says: the folders between its
commands folder and the file, then its file name without .md, joined with _. A listed file is its
stem alone. Commands take no name frontmatter.
PLUG-23. A command file is YAML frontmatter and a body. The header opens only on a first line that
is exactly ---, trailing whitespace allowed, and ends at the next such line, so a --- inside a
value is no end. The keys read are description, its whitespace collapsed and none when empty, and
arguments: a list of mappings, each with a name and optionally description, required
(default false) and default. Every key is kept as authored on the prompt, FilePrompt.frontmatter,
the invocation keys Claude Code reads (disable-model-invocation, user-invocable,
argument-hint) included; the MCP prompt ignores them.
PLUG-24. A placeholder is {{ name }}, spaces optional, name being a letter or _ and then
letters, digits or _. Single braces are text, so ${param} and a JSON example render as written.
PLUG-25. A command file is skipped, with a warning prompt <path> is skipped: <reason>, when it
cannot be read as UTF-8; it has no frontmatter or an unterminated one; its YAML does not parse or is
not a mapping; arguments is not a list, or an item is not a mapping with a name; an argument is
both required and has a default; or its body has a placeholder no argument declares
(placeholders with no argument: <names>). The plugin's other commands are unaffected.
PLUG-26. A prompt renders as one user text. A value of None or "" counts as not given. A
placeholder renders as the given value, else the argument's default, else the empty string. A
required argument not given fails with Missing required arguments: <names>.
PLUG-27. Once a server has a plugin, whatever its plugins hold, it declares
io.modelcontextprotocol/agents with {"listChanged": false} and binds agents/list and
agents/get. FastMCP declares it on server/discover, and AdvertiseLegacyExtensions (SKL-22) adds
it to a legacy initialize. The methods answer any caller. A server with no plugin binds neither:
they fail with Method not found. No notifications/agents/list_changed is sent.
PLUG-28. A plugin's agent files are the *.md files at any depth in its agents/ folder, in path
order, read as commands' are (PLUG-21), or else the .md files its manifest lists (PLUG-13). An agent's
name is the folders between agents/ and the file, then its frontmatter name, else its file stem,
joined with _ (PLUG-37); a listed file takes no folder segment. The name replaces only the file's
segment. There is no folder form: agents/explorer/AGENT.md named explorer is the agent
explorer_explorer, and with no name it is explorer_AGENT. An agent is never a resource, a prompt
or a tool: the server serves definitions, and the host runs them.
PLUG-29. An agent file is skipped, with a warning agent file <path> is skipped: <reason>, when it
cannot be read as UTF-8; it has no frontmatter, one whose YAML does not parse, or one that is not a
non-empty mapping; its frontmatter does not survive a trip through JSON; its name is set but not a
non-empty string; the name it builds is not usable (PLUG-39); or it has no non-empty string
description. The plugin's other agents are unaffected.
PLUG-30. agents/list returns {"resultType": "complete", "ttlMs": 0, "cacheScope": "private", "agents": [...]}, a card for every agent of every plugin, in name order: name (PLUG-17);
description, its whitespace collapsed; and capabilities, the frontmatter's when it is a list of
strings, else []. It has one page: any cursor fails with -32602 and Invalid agents cursor.
PLUG-31. agents/get takes a required, non-empty name and returns the same envelope with:
| Field | Value |
|---|---|
agent |
the name |
instructions |
the body, its line endings \n, stripped; absent when blank |
modelRoutingHint |
from model (PLUG-32); absent when none applies |
tools |
always []: the extension allows only the answering server's tools, and an agent's are the host's to grant |
_meta |
{"io.kubed/agent": {"frontmatter": …, "skills": {…}}} (PLUG-33) |
An unknown name fails with -32602, Agent not found and data: {"reason": "agent_not_found"}.
Each result is a deep copy.
PLUG-32. model is lowercased and split into runs of letters and digits. The first run that is
opus, sonnet or haiku gives {"role": "large"}, "medium" or "small", with
"vision": false. inherit, a model naming none of them, and one that is not a string give none.
PLUG-33. _meta["io.kubed/agent"] is the shape every kubed server shares. frontmatter is the
header as written. skills maps each name in the frontmatter's skills list that names a skill its
plugin serves to that skill's SKILL.md URI (PLUG-16); other names are left out, a skills that is
not a list of strings counts as none, and the value is {} when none resolve.
PLUG-34. An agent's instructions are its body as written. Nothing in them is rewritten.
PLUG-35. A plugin's hooks, its .mcp.json and mcpServers, its output styles, a marketplace
beside it, and any file outside its skills, commands and agents are not served.
These pages describe what is on main; the spec says what is built and what is only proposed.
kubed-mcp · MIT