Plugin-provided MCP server names use colons (plugin:name:server) which cannot be used in allowedMcpServers serverName entries
Summary
Plugin-bundled MCP servers are registered internally with colon-separated names in the format plugin:<plugin-name>:<server-name> (e.g., plugin:context7:context7). However, the serverName field in allowedMcpServers does not support colons, making it impossible to allowlist these servers by name.
Steps to Reproduce
- Install a plugin that bundles an MCP server (e.g.,
context7fromclaude-plugins-official) - Remove
allowedMcpServersfrommanaged-settings.jsonso the server starts - Observe the server name in the debug log:
plugin:context7:context7 - Add
allowedMcpServersback with{"serverName": "plugin:context7:context7"} - Claude Code rejects this entry — colons are not allowed in
serverName
Debug Log Evidence
[DEBUG] MCP server "plugin:context7:context7": Starting connection with timeout of 30000ms
[DEBUG] MCP server "plugin:context7:context7": Successfully connected...
The internal server name is plugin:context7:context7.
Expected Behavior
One of:
serverNameshould support colon-separated plugin MCP server names, OR- Plugin MCP servers should be registered with a name that is allowlistable (e.g.,
plugin.context7.context7or justcontext7), OR - A dedicated
pluginNameorserverNamePrefixmatcher should be added toallowedMcpServers
Actual Behavior
{"serverName": "plugin:context7:context7"} is rejected. The only workaround is {"serverCommand": ["npx", "-y", "@upstash/context7-mcp"]} which matches by command — fragile and requires knowing the exact invocation.
Impact
Enterprise/managed environments using allowedMcpServers for security policy cannot selectively allowlist plugin-bundled MCP servers by name. They must either:
- Allow all MCP servers (remove
allowedMcpServers) - Use the fragile
serverCommandworkaround - Manually re-register the server outside the plugin system
Environment
- Claude Code version: 2.1.58
- macOS Darwin 25.3.0
- Plugin:
context7@claude-plugins-official
Related
See also: companion issue #32882 — plugin .mcp.json servers are silently ignored when allowedMcpServers is present.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗