Load portable Agent Plugins
Agent Plugins is a cross-platform specification for declarative Agent extension packages. Each package bundles prompt skills (skills/) and MCP servers (mcp.json) in a single folder, enabling plug-and-play reuse across projects with no Python code required.
The bub-agent-plugins plugin lets Bub discover and load these packages automatically.
Quick start
Section titled “Quick start”Below you will create a plugin package containing a summary skill and a time server. The verification commands call the skill and tool directly and do not require a model API key.
Before starting, install the Bub app and ensure uvx is on your PATH.
-
Install the integration plugins
Terminal window bub install bub-mcp@main bub-agent-plugins@mainbub hooksbub-agent-pluginsdepends onbub-mcpfor MCP connection management (install both even if you only use skills). Verifyagent-pluginsappears underload_stateandprovide_channelsinbub hooks. -
Create a plugin package
Create
.agents/plugins/portable-notes/in your workspace:Directory.agents/
Directoryplugins/
Directoryportable-notes/
- plugin.json
Directoryskills/
Directoryplugin-summary/
- SKILL.md
- mcp.json
Create
plugin.json($schemaandnameare required, andnamemust match the directory name):.agents/plugins/portable-notes/plugin.json {"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json","name": "portable-notes","version": "1.0.0","description": "A summary skill and a time server for Bub"}Create
skills/plugin-summary/SKILL.md:.agents/plugins/portable-notes/skills/plugin-summary/SKILL.md ---name: plugin-summarydescription: Summarize notes into decisions and next actions.---Read the supplied notes:1. List the key decisions made;2. List remaining actions and their owners (mark unassigned items explicitly).Create
mcp.json($schemais required, and every server must declaretype:stdio,streamable-http, orsse):.agents/plugins/portable-notes/mcp.json {"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json","mcpServers": {"time": {"type": "stdio","command": "uvx","args": ["mcp-server-time"]}}} -
Verify the skill
Run these commands in the workspace:
Terminal window bub --workspace . run ',skill'bub --workspace . run ',skill name=plugin-summary'The first command lists
plugin-summary; the second prints its path and body (skills do not need a background channel, sobub runworks directly). -
Verify the MCP tool
Start
bub chat(which starts theagent-plugins.mcpbackground channel):Terminal window bub --workspace . chatOnce connected, call the plugin’s time tool directly (prefixed with
mcp.<plugin>.):,mcp.portable-notes.time_get_current_time timezone=UTCOn first launch,
uvxmay take a moment to download the server. If you seecommand not found, check the startup logs and retry once the tool registers.
Once you have configured a model, you can also let the model call the time tool directly or use $plugin-summary to summarize notes.
Coexistence with global MCP servers
Section titled “Coexistence with global MCP servers”MCP servers inside Agent Plugins are isolated from global ~/.bub/mcp.json servers:
| Source | Config file | Lifecycle channel | Tool name format |
|---|---|---|---|
| Global config | ~/.bub/mcp.json |
mcp.lifecycle |
mcp.<server>_<tool> |
| Agent Plugin | <plugin>/mcp.json |
agent-plugins.mcp |
mcp.<plugin>.<server>_<tool> |
Both can define a time server without name collisions. Note that bub mcp list / add / remove manage only ~/.bub/mcp.json.
Configure discovery paths and toggles
Section titled “Configure discovery paths and toggles”By default, Bub scans immediate subdirectories of:
- Workspace directory:
<workspace>/.agents/plugins/ - User global directory:
~/.agents/plugins/
Customize discovery paths or toggle components in ~/.bub/config.yml:
agent-plugins: paths: - /opt/agent-plugins/reporting auto_discover: true skills_enabled: true mcp_enabled: true data_root: ~/.bub/agent-plugins| Field | Default | Purpose |
|---|---|---|
paths |
[] |
Explicit plugin root directories (each containing plugin.json; relative paths resolve against the workspace) |
auto_discover |
true |
Scan default .agents/plugins directories; set false to load only paths |
skills_enabled / mcp_enabled |
true |
Enable or disable plugin skills and MCP servers independently |
data_root |
~/.bub/agent-plugins |
Root directory for persistent plugin data |
Priority: explicit paths > workspace directory > user global directory (first valid package wins on name collisions; workspace .agents/skills/ always overrides plugin skills of the same name).
Override via BUB_AGENT_PLUGINS_ environment variables (use JSON for lists):
export BUB_AGENT_PLUGINS_PATHS='["/opt/agent-plugins/reporting"]'export BUB_AGENT_PLUGINS_AUTO_DISCOVER=falseFor stdio MCP servers, Bub sets the working directory to the plugin root and injects PLUGIN_ROOT and PLUGIN_DATA environment variables. You can also interpolate ${PLUGIN_ROOT} and ${PLUGIN_DATA} in args, env values, and cwd:
{ "command": "python", "args": ["${PLUGIN_ROOT}/server.py"]}After downloading or updating a plugin package, restart Bub to load the new content.
Troubleshooting
Section titled “Troubleshooting”| Symptom | What to check |
|---|---|
agent-plugins missing from bub hooks |
Confirm both bub-mcp and bub-agent-plugins are installed in the active environment |
| Skill not discovered | Verify name in plugin.json matches the plugin folder name, and the skill’s name matches its subfolder name |
mcp.<plugin>... tool not found |
Use bub chat or bub gateway (bub run does not start background MCP channels) |
| Same-named skill ignored | Workspace .agents/skills/ takes precedence over plugin skills; rename the conflicting skill |