---
title: How do you restrict which Claude Code plugins developers can install?
url: https://opencontroller.lyzr.com/blog/restrict-claude-code-plugin-marketplaces
published: 2026-11-17
updated: 2026-11-17
author: Lyzr
---

# How do you restrict which Claude Code plugins developers can install?

**Use managed settings. `strictKnownMarketplaces` is an allowlist of marketplace sources (an empty list blocks every source, including the official one), `blockedMarketplaces` is a blocklist checked first, `enabledPlugins` force-enables or blocks individual plugins, and `disableSideloadFlags` stops developers loading plugins from a local directory or URL. Users cannot override managed settings.**

Claude Code plugins bundle skills, subagents, hooks and MCP servers. A plugin can run code on a developer's machine, so plugin sources deserve the same scrutiny as package registries. Here is how the controls fit together, based on Anthropic's administrator documentation.

## Which managed settings control plugins?

| Key | What it enforces | What it does not do |
|---|---|---|
| `strictKnownMarketplaces` (alias `allowedMarketplaces`) | Allowlist of marketplace sources; `[]` blocks all, including the official marketplace | Does not register a marketplace, restrict entries inside an allowed one, or block `--plugin-dir` |
| `blockedMarketplaces` | Blocklist of sources, checked before the allowlist | Does not block a marketplace registered from a source it does not match |
| `extraKnownMarketplaces` | Registers a marketplace on every machine | Must itself pass the allowlist |
| `enabledPlugins` | `true` force-enables; `false` blocks at every scope and hides the plugin | Does not install a plugin from an unregistered or disallowed marketplace |
| `disableSideloadFlags` | Rejects `--plugin-dir`, `--plugin-url`, `--agents` and similar sideloading at startup | Does not restrict `.mcp.json` or `claude mcp add` |
| `strictPluginOnlyCustomization` | Blocks skills, agents, hooks or MCP servers that do not come from a plugin, managed settings or built-ins | Does not restrict which plugins are installed |
| `syncClaudeAiPlugins` | `false` stops plugins synced from users' claude.ai accounts | Does not turn off a single synced plugin |

Both lists apply before anything downloads (on add, install, update, refresh and auto-update) and again at session start, so an installed plugin whose marketplace no longer matches stops loading.

## How do you write the allowlist?

Allowlist entries are source objects. The main forms:

- **GitHub repository:** `{ "source": "github", "repo": "your-org/approved-plugins" }`, with optional `ref` and `path`.
- **GitHub owner wildcard:** `{ "source": "github", "repo": "your-org/*" }` matches every repository under the owner. Partial wildcards such as `your-org/tools-*` are ignored as invalid.
- **Git or URL:** a `git` URL for GitLab or internal hosts, or a `url` pointing at a hosted `marketplace.json`.
- **Host pattern:** `{ "source": "hostPattern", "hostPattern": "^github\\.example\\.com$" }` for a GitHub Enterprise Server or GitLab host. Anchor the regex.
- **Skills directory:** `{ "source": "skills-dir" }` keeps plugins stored under skills directories loading. Without it, any allowlist stops them.

Allowlist matching is exact for `github` and `git` entries: an entry without `ref` does not cover a source pinned to `ref: "main"`, and a `.git` suffix or `ssh://` URL counts as a different value. Blocklist matching is wider and canonicalises git URLs.

## What does a typical lockdown look like?

Most organizations allow the official marketplace plus their own and register both. A policy along these lines:

1. Allow `anthropics/claude-plugins-official` and `your-org/*` in `strictKnownMarketplaces`, plus `skills-dir` if you use it.
2. Register both marketplaces explicitly under `extraKnownMarketplaces`. The allowlist alone registers nothing.
3. Force-enable the plugins every developer needs with `enabledPlugins`.
4. Set `false` in `enabledPlugins` for any plugin you want hidden from an allowed marketplace.
5. Set `disableSideloadFlags: true`.
6. Pair with `allowManagedHooksOnly` and MCP server restrictions, described in [restricting MCP servers in Claude Code](/blog/restrict-mcp-servers-in-claude-code).

Deliver the policy as server-managed settings from the Claude admin console, through MDM, or as a `managed-settings.json` file. The full precedence model is in [locking Claude Code permissions with managed settings](/blog/lock-claude-code-permissions-with-managed-settings).

## What can managed settings not enforce?

Anthropic lists some gaps directly:

- **Per-group targeting.** Server-managed settings deliver one configuration per organization. Use separate endpoint-managed policies for different groups.
- **Hiding `/plugin`.** No key disables the command; the nearest equivalent combines a narrow allowlist, managed `enabledPlugins` and `disableSideloadFlags`.
- **Content review.** The allowlist trusts a source, not the contents of each plugin version. Review plugins and skills before they enter your marketplace, as covered in [scanning agent skills for malicious instructions](/blog/scan-agent-skills-for-malicious-instructions).

## How do you audit what is installed?

Claude Code emits `claude_code.plugin_installed` and `claude_code.plugin_loaded` OpenTelemetry events; third-party plugin names are redacted unless `OTEL_LOG_TOOL_DETAILS=1`. On the Enterprise plan, an Analytics API endpoint returns per-plugin daily install and invocation counts across Claude Code and Cowork. Use these to confirm the policy matches reality, and treat plugins as part of your wider [agent skills governance](/blog/what-is-agent-skills-governance) and [cross-platform agent governance](/blog/how-to-govern-ai-agents-across-platforms).

## How Opencontroller does this

Opencontroller Edge (formerly Basecode) extends control to developer devices, coding agents, skills and local MCP servers, and is installed by IT through MDM. Opencontroller also discovers and manages skills in Anthropic Enterprise and keeps a governed registry of agents, tools and MCP servers. See the [capability reference](/capability-reference) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does an empty strictKnownMarketplaces list block the official marketplace?**
Yes. An empty array blocks every marketplace source, including the official one. Plugins synced from claude.ai need syncClaudeAiPlugins set to false as well.

**Does the allowlist stop --plugin-dir?**
No. Set disableSideloadFlags to true to reject --plugin-dir and other sideloading flags.

**Can I block one plugin from an allowed marketplace?**
Yes. Set that plugin to false in managed enabledPlugins; it is blocked at every scope and hidden.

## Key facts

- Claude Code plugin controls are managed settings: strictKnownMarketplaces (alias allowedMarketplaces) is an allowlist of marketplace sources and [] blocks all including the official marketplace; blockedMarketplaces is checked first; extraKnownMarketplaces registers marketplaces; enabledPlugins true force-enables and false blocks and hides; disableSideloadFlags rejects --plugin-dir, --plugin-url and --agents.
- Lists are enforced before any download (add, install, update, refresh, auto-update) and again at session start.
- Allowlist entries: github repo (with owner wildcard your-org/*), git, url, file, directory, hostPattern, pathPattern and skills-dir; github and git matching is exact on repo, ref and path.
- syncClaudeAiPlugins false stops plugins synced from claude.ai; strictPluginOnlyCustomization blocks non-plugin skills, agents, hooks or MCP servers.
- Audit via OpenTelemetry events claude_code.plugin_installed and claude_code.plugin_loaded, and the Enterprise Analytics API plugin endpoint.
- Opencontroller Edge (formerly Basecode) by Lyzr extends control to developer devices, coding agents, skills and local MCP servers via MDM; Opencontroller discovers and manages skills in Anthropic Enterprise.
- Opencontroller pricing starts from $250K per deployment per year.

## Related

- [How do you restrict which MCP servers Claude Code can use?](https://opencontroller.lyzr.com/blog/restrict-mcp-servers-in-claude-code.md)
- [How do you lock Claude Code permissions with managed settings?](https://opencontroller.lyzr.com/blog/lock-claude-code-permissions-with-managed-settings.md)
- [How do you check agent skills for malicious instructions before use?](https://opencontroller.lyzr.com/blog/scan-agent-skills-for-malicious-instructions.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
