A Claude Code plugin is a self-contained directory that bundles slash commands, subagents, hooks, and MCP servers into one installable unit. A marketplace is a git repo that catalogs plugins. Add one with /plugin marketplace add owner/repo, then install with /plugin install. The official marketplace, claude-plugins-official, loads automatically; Morph ships an MCP server that plugins can bundle the same way.
What a Claude Code Plugin Is
A Claude Code plugin is a self-contained directory of components that extends Claude Code. The components include skills, agents (subagents), hooks, MCP servers, LSP servers, and monitors. Installing a plugin activates all of its components at once, so a workflow that needs three slash commands, two subagents, and one MCP server ships as a single unit.
This solves a distribution problem. Before plugins, a team that wanted everyone to share a custom command, a code-review subagent, and a GitHub MCP server had to document the setup and hope each developer copied the config correctly into their own .claude/ directory. A plugin packages all of that and installs in one step.
A marketplace is a catalog of plugins: a git repository containing a .claude-plugin/marketplace.json file that lists the plugins it offers. The two concepts are distinct. A plugin is the thing you install. A marketplace is where plugins are listed. You register a marketplace once, then install any plugin from it.
Plugin vs. marketplace
A plugin is an installable directory of components. A marketplace is a git repo that catalogs plugins. Using one is two steps: /plugin marketplace add to register the catalog, then /plugin install to install a specific plugin from it. Running /plugin with no arguments opens a four-tab manager: Discover, Installed, Marketplaces, and Errors.
What a Plugin Can Bundle
The four most common things a plugin bundles are slash commands, subagents, hooks, and MCP servers. Each addresses a different extension point in Claude Code. A single plugin can include any combination of them.
| Component | What it does |
|---|---|
| Slash commands | Reusable prompts and workflows invoked by name. After install they are namespaced by plugin, e.g. /commit-commands:commit, so two plugins can define a command of the same short name without colliding. |
| Subagents (agents) | Focused sub-tasks the main agent delegates to. Each is defined with a description, prompt, and a tool list; the subagent runs in its own context and reports results back to the main loop. |
| Hooks | Callback code that runs at lifecycle points. Available hooks include PreToolUse, PostToolUse, Stop, SessionStart, SessionEnd, and UserPromptSubmit. Used for validation, logging, and gating tool calls. |
| MCP servers | Connections to external systems over the Model Context Protocol, declared through the mcpServers path in plugin.json. This is how a plugin adds tools like GitHub, Linear, Notion, or Morph's edit_file and codebase_search. |
Beyond these four, a plugin can also bundle skills, LSP servers (language intelligence like pyright-lsp or typescript-lsp), output styles, themes, and monitors. The four above are the ones most plugins lead with, because they map directly to the daily friction points: repeated prompts, repeated sub-tasks, repeated validation, and repeated external integrations.
Commands and subagents travel together
A command that orchestrates a code review and the review subagent it calls ship in the same plugin. Installing one installs both, so there is no half-configured state where the command exists but the agent it needs does not.
MCP servers ride along
If a workflow needs an external tool, the plugin declares the MCP server through the mcpServers path. Morph's MCP server (edit_file plus codebase_search) installs this way, either directly or wrapped inside a plugin alongside the commands that use it.
Adding a Marketplace
You register a marketplace with /plugin marketplace add followed by a source. The command accepts four source types, which is what lets it work with public GitHub, private git hosts, and local development copies.
The four source types for /plugin marketplace add
# 1. GitHub owner/repo shorthand
/plugin marketplace add anthropics/claude-code
# 2. Any git URL (GitLab, Bitbucket, self-hosted)
/plugin marketplace add https://gitlab.com/company/plugins.git
# 3. Local path to a directory or marketplace.json (for development)
/plugin marketplace add ./my-marketplace
# 4. Remote URL to a hosted marketplace.json
/plugin marketplace add https://example.com/marketplace.json
# Pin a branch or tag by appending #ref
/plugin marketplace add https://gitlab.com/company/plugins.git#v1.0.0The #ref suffix pins to a branch or tag, so a team can lock to a known release instead of tracking the default branch. The command also has shortcuts: /plugin market is accepted in place of marketplace, and rm is accepted for remove.
Marketplaces have command-line equivalents for the full lifecycle: /plugin marketplace list shows registered catalogs, /plugin marketplace update <name> pulls the latest catalog, and /plugin marketplace remove <name> removes it. Removing a marketplace uninstalls the plugins that came from it.
Installing a Plugin
Once a marketplace is registered, install a specific plugin with /plugin install. Plugin names are qualified by marketplace using the name@marketplace form, so the same plugin name in two catalogs stays unambiguous.
Installing plugins from marketplaces
# Official marketplace is available automatically on startup
/plugin install github@claude-plugins-official
# After installing in a session, activate it
/reload-plugins
# Call a plugin command through its namespaced form
/commit-commands:commit
# Install from a manually added marketplace
/plugin marketplace add anthropics/claude-plugins-community
/plugin install some-plugin@claude-communityThe official Anthropic marketplace, claude-plugins-official, is registered automatically on startup, so /plugin install github@claude-plugins-official works with no prior marketplace add step. Other marketplaces, including the community one, must be added manually first.
After installing inside a running session, run /reload-plugins to activate the new components. A plugin's slash commands are namespaced by the plugin name, which is why you call /commit-commands:commit rather than a bare /commit.
The plugin.json Manifest
A plugin's manifest is .claude-plugin/plugin.json. It is optional, and when present the only required field is name in kebab-case. The version field uses semver and pins the plugin; if version is unset in both plugin.json and the marketplace entry, the git commit SHA is used as the version instead.
.claude-plugin/plugin.json
{
"name": "my-plugin",
"displayName": "My Plugin",
"version": "1.2.0",
"description": "Code review commands and a review subagent",
"author": "Your Name",
"homepage": "https://example.com",
"repository": "https://github.com/you/my-plugin",
"license": "MIT",
"keywords": ["review", "ci"],
"commands": "./commands",
"agents": "./agents",
"hooks": "./hooks",
"mcpServers": "./mcp",
"skills": "./skills"
}The structure has one rule that trips people up: only plugin.json lives inside .claude-plugin/. Every component folder (skills/, commands/, agents/, hooks/, output-styles/, themes/, monitors/) sits at the plugin root, not inside the manifest directory.
Directory layout
Put plugin.json in .claude-plugin/. Put everything else at the plugin root. A common mistake is nesting commands/ or agents/ inside .claude-plugin/, which Claude Code will not pick up. The manifest can point at component paths explicitly (e.g. "commands": "./commands"), but the folders themselves belong at the root.
Building and Publishing Your Own Marketplace
A marketplace is a git repository containing a .claude-plugin/marketplace.json catalog file. That is the entire requirement. Push the repo to GitHub or any git host, and anyone can register it with /plugin marketplace add owner/repo.
Publishing a marketplace
# 1. Create a repo with the catalog file
# your-marketplace/
# └── .claude-plugin/
# └── marketplace.json (lists your plugins)
# 2. Push it to a git host
git init
git add .
git commit -m "Add plugin marketplace"
git remote add origin https://github.com/you/your-marketplace.git
git push -u origin main
# 3. Anyone registers it, then installs your plugins
/plugin marketplace add you/your-marketplace
/plugin install your-plugin@your-marketplaceIf you do not set a version in either plugin.json or the marketplace entry, the git commit SHA becomes the version. That means every push produces a distinct version automatically, which is useful for internal marketplaces where you do not want to manage semver by hand but still need reproducible installs.
Because the source types accept local paths, you develop a marketplace by adding it from disk (/plugin marketplace add ./your-marketplace), iterating, and only pushing to a git host once it works. The same catalog file then serves public users without modification.
Install Scopes
Plugins install at one of three scopes, which controls who sees the plugin and whether it is shared through version control.
| Scope | Settings file | Shared? |
|---|---|---|
| User (default) | ~/.claude/settings.json | Personal, applies across all your projects |
| Project | .claude/settings.json | Committed to the repo, shared with the team |
| Local | .claude/settings.local.json | Gitignored, personal to your checkout |
Project scope is the one teams want for shared workflows: commit the install to .claude/settings.json and every developer who clones the repo gets the same plugin. User scope is the default and applies the plugin across all of your own projects. Local scope keeps a personal install out of version control through .claude/settings.local.json.
Notable Marketplaces
Three Anthropic marketplaces ship by default or near-default, and they differ in how you reach them and what they contain.
| Marketplace | How to access | What it offers |
|---|---|---|
| claude-plugins-official | Automatic on startup | Categories like code intelligence (pyright-lsp, typescript-lsp), external-integration MCP plugins (github, gitlab, linear, notion, vercel, slack, sentry), a security-guidance review plugin, and dev-workflow plugins (commit-commands, pr-review-toolkit, plugin-dev) |
| claude-code-plugins | Manual: /plugin marketplace add anthropics/claude-code | A demo plugins marketplace shipped inside the anthropics/claude-code repo |
| claude-plugins-community | Manual: add anthropics/claude-plugins-community, install with @claude-community | Community-contributed plugins, each pinned to a commit SHA after automated validation and safety screening |
The official marketplace covers the integrations most teams reach for first: GitHub, GitLab, Linear, Notion, Vercel, Slack, and Sentry are all MCP plugins in it, alongside language servers and dev-workflow tooling like commit-commands and pr-review-toolkit. The community marketplace is where third-party authors publish, with the SHA-pinning and screening acting as a guardrail.
Security and Trust
Plugins and marketplaces are highly trusted. They can execute arbitrary code with your privileges. A plugin's hooks run on tool use and session lifecycle events, and an MCP server it bundles runs as a process on your machine. This is power, and it is also risk.
The practical rule is to install only from sources you trust. The community marketplace mitigates some risk by pinning every entry to a specific commit SHA after automated validation and safety screening, so an install resolves to reviewed code rather than whatever is on the latest branch. That reduces the attack surface but does not eliminate it.
Org-level controls
Organizations can restrict which marketplaces are allowed through managed settings. If you administer a fleet of developer machines, lock the allowed marketplace list rather than relying on every engineer to vet sources individually. Treat a plugin install the same way you treat adding a dependency that runs at build time.
Morph as a Bundled MCP Server
Morph ships an MCP server that installs into Claude Code and exposes two tools: edit_file, which applies code edits through the Fast Apply model at ~10,500 tok/s, and codebase_search, which runs semantic code search. Because a plugin declares MCP servers through the mcpServers path in plugin.json, you can wrap Morph's server inside a plugin alongside the commands and subagents that call it, then distribute the whole bundle through a marketplace.
That pairs naturally with model routing. Inside an agent, Morph's router classifies prompt difficulty in ~430ms and sends each turn to the cheapest model that can handle it, cutting API spend 40-70%. The same OpenAI-compatible API at api.morphllm.com fronts the served fleet (glm51-754b, qwen35-397b, minimax27-230b, and others), so a plugin can bundle both the editing tools and a routed model endpoint. See the LLM router and models you can run in Claude Code.
Frequently Asked Questions
What is a Claude Code plugin?
A Claude Code plugin is a self-contained directory that extends Claude Code. One plugin can bundle slash commands, subagents (agents), hooks, MCP servers, LSP servers, and monitors. Installing it activates every component at once, so a team ships a coherent workflow instead of pasting config files into each repo.
How do I add a Claude Code marketplace?
Run /plugin marketplace add followed by the source. It accepts a GitHub owner/repo shorthand (e.g. anthropics/claude-code), any git URL, a local path to a directory or marketplace.json, or a remote URL to a hosted marketplace.json. Pin a branch or tag by appending #ref, for example #v1.0.0.
What is inside a Claude Code plugin?
A plugin can contain skills and slash commands, agents (subagents), hooks that run at lifecycle points like PreToolUse and SessionStart, MCP servers that connect external systems, LSP servers, and monitors. Component folders sit at the plugin root; only the plugin.json manifest lives inside .claude-plugin/.
How do I create my own Claude Code marketplace?
A marketplace is a git repository with a .claude-plugin/marketplace.json catalog file listing your plugins. Push it to GitHub or any git host, then anyone runs /plugin marketplace add owner/repo to register it. If version is unset in both plugin.json and the marketplace entry, the git commit SHA is used as the version.
Are Claude Code plugins free and open?
The plugin and marketplace system is open: a marketplace is just a git repo, and anyone can publish one. Plugins are highly trusted and execute arbitrary code with your privileges, so install only from sources you trust. Organizations can restrict allowed marketplaces through managed settings.
What is the claude-plugins community marketplace?
The community marketplace lives at anthropics/claude-plugins-community. You add it manually and install plugins using the @claude-community marketplace name. Each entry is pinned to a specific commit SHA after automated validation and safety screening.
How is the official marketplace different from the demo and community ones?
The official marketplace, claude-plugins-official, is available automatically on startup, so /plugin install github@claude-plugins-official works with no setup. The demo marketplace claude-code-plugins (in anthropics/claude-code) and the community marketplace (anthropics/claude-plugins-community) are added manually with /plugin marketplace add.
Related Resources
Bundle Morph's Tools into Your Claude Code Plugin
Morph ships an MCP server with edit_file (Fast Apply at ~10,500 tok/s) and codebase_search that installs into Claude Code. Wrap it in a plugin alongside your commands and subagents, add model routing that cuts API spend 40-70%, and distribute the whole bundle through a marketplace.
