How to control Claude Code plugins and marketplaces

To control Claude Code plugins and marketplaces in an enterprise, deploy managed settings. Use extraKnownMarketplaces and enabledPlugins to register and enable approved plugins, strictKnownMarketplaces and blockedMarketplaces to limit where marketplaces can come from, and disableSideloadFlags to block plugins loaded from local folders. Users cannot override managed keys.
Know what a plugin can do
A plugin can bundle skills, subagents, hooks, MCP servers and other components. Claude Code’s plugin overview says an enabled plugin is part of every session, and that what a plugin runs, it runs as the user. A plugin’s skill and agent names and descriptions sit in Claude’s context on every turn, even in sessions where nothing from the plugin runs.
That makes the plugin list a policy decision before it is a convenience. Before you approve a marketplace, read the plugin security page, then decide which marketplaces are allowed and which plugins are enabled for everyone.
The steps below are checked against the Claude Code plugin and managed-settings docs as of 2026-11-15. Those pages do not name one CLI version for the core keys, so confirm the release you run on a test machine before you roll the policy out.
Choose how the policy reaches each machine
Plugin keys are read from managed settings. The official docs name three delivery mechanisms, and each one reaches a different set of machines.
- Server-managed settings. Set the JSON in the claude.ai admin console under Organization settings, then Claude Code, then Managed settings. This needs the Owner role. It is the only managed source that reaches Anthropic-hosted cloud sessions.
- MDM policies. On macOS, deliver a plist whose top-level keys are the settings keys. On Windows, store the JSON as a string in a registry value.
- A managed settings file. Place
managed-settings.jsonin the system path for the platform. Amanaged-settings.d/drop-in directory can sit beside it.
The plugin organization controls reference lists every key in this post.
By default, Claude Code uses the first source that delivers a policy key, checking server-managed settings first, then MDM, then the file. If server-managed settings deliver any unrelated key, the plugin keys in an MDM policy or file on that machine are ignored. Set managedSourcesBehavior to "merge" to apply every source instead.
Pre-install approved plugins
The fleet pattern uses two keys together. extraKnownMarketplaces registers the marketplace on each machine, keyed by its name in marketplace.json. enabledPlugins names each plugin as plugin-name@marketplace-name, and the value true force-enables it.
- Add the marketplace under
extraKnownMarketplaceswith asourceobject. SetautoUpdateif you want background refresh. - Add each plugin under
enabledPluginswith the valuetrue. - Deliver the policy through one of the three mechanisms above.
- Check one machine with
/plugin, which should list the marketplace and both plugins.
{
"extraKnownMarketplaces": {
"your-marketplace": {
"source": { "source": "github", "repo": "your-org/your-marketplace" },
"autoUpdate": true
}
},
"enabledPlugins": {
"code-formatter@your-marketplace": true,
"deploy-helper@your-marketplace": true
}
}
Claude Code registers the marketplace and installs both plugins at the start of the user’s next session. A managed autoUpdate value also locks the user’s own toggle, so the toggle returns an error instead of changing it.
Pin plugins per repository
To cover one repository instead of the whole fleet, put extraKnownMarketplaces and enabledPlugins in that repository’s .claude/settings.json. The docs add two conditions, and both matter.
- Claude Code applies a repository’s
extraKnownMarketplacesonly after the contributor accepts the workspace trust dialog for that folder. In an untrusted folder it ignores the entries without a message. - Setting
enabledPluginsin the repository does not install anything. Each contributor runsclaude plugin install <name>@<marketplace> --scope projectonce. Until they do, the/pluginErrors tab reports the plugin as enabled but not installed.
Restrict where plugins can come from
strictKnownMarketplaces is an allowlist of marketplace sources. blockedMarketplaces is a denylist that takes the same source objects and is checked first. The lists apply when a user adds a marketplace, on every install and update, and again at session start. An installed plugin whose marketplace no longer matches stops loading.
The common lockdown allows the official marketplace and your own marketplace, then rejects local sideloading.
{
"strictKnownMarketplaces": [
{ "source": "github", "repo": "anthropics/claude-plugins-official" },
{ "source": "github", "repo": "your-org/*" },
{ "source": "skills-dir" }
],
"extraKnownMarketplaces": {
"claude-plugins-official": {
"source": { "source": "github", "repo": "anthropics/claude-plugins-official" }
},
"your-marketplace": {
"source": { "source": "github", "repo": "your-org/your-marketplace" }
}
},
"enabledPlugins": {
"code-formatter@your-marketplace": true,
"deploy-helper@your-marketplace": true
},
"disableSideloadFlags": true
}
The allowlist does not register anything. Register each marketplace you need with an extraKnownMarketplaces entry, which must itself pass the allowlist. The { "source": "skills-dir" } entry matters too. Without it, plugins kept under ~/.claude/skills/ stop loading once any allowlist is set.
To block a marketplace across the fleet, add a source to blockedMarketplaces. The docs give this example, which blocks every repository under one owner.
{
"blockedMarketplaces": [
{ "source": "github", "repo": "untrusted-org/*" }
]
}
Compare the controls
Each control answers a different question. The table lists the key, what it enforces, and the limit the docs state for it.
| Control | Key | What it enforces | What it cannot do |
|---|---|---|---|
| Marketplace allowlist | strictKnownMarketplaces |
Only listed sources can be added and installed from. [] blocks all sources |
Does not register a marketplace or restrict plugins inside an allowed one |
| Marketplace denylist | blockedMarketplaces |
Listed sources are blocked, checked before the allowlist | Does not block a marketplace already registered from a source it does not match |
| Pin or block a plugin | enabledPlugins |
true force-enables. false blocks at every scope and hides the plugin |
Does not install a plugin whose marketplace is not registered or allowed |
| Sideloading | disableSideloadFlags |
Rejects --plugin-dir, --plugin-url, --agents and CLAUDE_CODE_PLUGIN_DIRS folders |
Does not restrict .mcp.json or claude mcp add |
| Stop a marketplace from auto-registering | CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL=1 |
Stops interactive sessions from registering the official marketplace | Does not remove a marketplace already registered |
| Turn off command-based plugins | disableCommandPluginSources |
Blocks plugins whose source runs a command on the machine | Does not affect other source types |
Two more limits belong in the rollout plan. The plugin keys have no per-user or per-group targeting, so every user who receives the settings gets the same policy. And no key disables /plugin itself. The nearest equivalent is an allowlist that names only your marketplace, managed enabledPlugins entries for the plugins you supply, and disableSideloadFlags.
Control updates across the fleet
Auto-update is set per marketplace. Put "autoUpdate": true or false on a managed extraKnownMarketplaces entry, and the user’s /plugin toggle stops working for that marketplace. To turn plugin auto-update off for every marketplace, set DISABLE_AUTOUPDATER in the managed env block. That also stops Claude Code’s own updates.
{
"env": {
"DISABLE_AUTOUPDATER": "1"
}
}
The opposite case also has a switch. To stop Claude Code’s own updates but keep plugin auto-update running, add "FORCE_AUTOUPDATE_PLUGINS": "1" to the same env block. Pick one of the two on purpose, because a fleet with plugin updates on picks up new plugin versions without a review step.
Audit what the fleet installed
Start with the OpenTelemetry events. claude_code.plugin_installed records each install, and claude_code.plugin_loaded records each enabled plugin at session start. Both events redact or omit third-party plugin and marketplace names unless OTEL_LOG_TOOL_DETAILS is set to 1, so decide that setting before you build a dashboard.
On the Enterprise plan, the Analytics API endpoint GET /v1/organizations/analytics/plugins returns per-plugin, per-day install and invocation counts across Claude Code and Cowork, grouped by user or RBAC group.
Rollout checklist
- Decide which marketplace sources are allowed, then write the
strictKnownMarketplaceslist, includingskills-dirif you use plugins from~/.claude/skills/. - Add
disableSideloadFlagsso--plugin-dircannot bypass the allowlist. - Register each approved marketplace under
extraKnownMarketplaces, withautoUpdateset on purpose. - Pin the approved plugins with
enabledPluginsand setfalsefor any plugin inside an allowed marketplace that you do not want. - Deliver the policy by server-managed settings, MDM or file. Cloud sessions read only server-managed settings.
- Check one machine with
/plugin, then confirm a headless run withclaude -p "List the plugins you have loaded" --output-format stream-json --verbose, whoseinitevent lists the loaded plugins. - Watch
claude_code.plugin_installedandclaude_code.plugin_loadedfor installs outside the list.
Enforcing this with AIControls
The keys above are Claude Code’s own managed settings, and they work without any Nirmata product. This post makes no claim about what AIControls does with plugins or marketplaces. The governance for AI coding agents page is the pillar for this topic, and the AIControls download page describes the product. For the managed file itself, read the Claude Code managed settings post. For the MCP side of the same policy, read the MCP server restriction post.
Frequently asked questions
Can a developer turn off a plugin that the organization has pinned in Claude Code?
No, not for a plugin the managed enabledPlugins entry sets to true. Managed settings take precedence over every other scope, so disabling the plugin in a user settings file does not stop it from loading. The troubleshooting section lists this as a symptom to check for. To block a plugin outright, set it to false in the managed enabledPlugins object. That blocks it at every scope and hides it from the marketplace listing.
What is the difference between strictKnownMarketplaces and blockedMarketplaces?
strictKnownMarketplaces is an allowlist. When it is set, users can add and install only from the listed marketplace sources. blockedMarketplaces is a denylist that is checked first, so a source on both lists is blocked. An empty array in strictKnownMarketplaces blocks every source, including the official marketplace. Both lists match the marketplace source, not the plugin inside it, so use enabledPlugins to control individual plugins.
Does an allowlist stop a developer from loading a plugin from a local folder?
Not by itself. strictKnownMarketplaces does not cover the --plugin-dir flag. Set disableSideloadFlags to true in managed settings, and Claude Code rejects --plugin-dir, --plugin-url, --agents, and folders named in CLAUDE_CODE_PLUGIN_DIRS at startup. The allowlist covers marketplace sources, and this key covers the flags that load plugins without one.
How do we see which plugins are running across the fleet?
Claude Code emits claude_code.plugin_installed when a plugin is installed and claude_code.plugin_loaded for each enabled plugin at session start. Plugin and marketplace names are redacted or omitted unless OTEL_LOG_TOOL_DETAILS is set to 1. On the Enterprise plan, the Analytics API endpoint for plugins returns per-plugin install and invocation counts by day, grouped by user or RBAC group.