Plugin-provided MCP server names use colons (plugin:name:server) which cannot be used in allowedMcpServers serverName entries

Resolved 💬 4 comments Opened Mar 10, 2026 by ryan-niemes-helix Closed Apr 8, 2026

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

  1. Install a plugin that bundles an MCP server (e.g., context7 from claude-plugins-official)
  2. Remove allowedMcpServers from managed-settings.json so the server starts
  3. Observe the server name in the debug log: plugin:context7:context7
  4. Add allowedMcpServers back with {"serverName": "plugin:context7:context7"}
  5. 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:

  • serverName should support colon-separated plugin MCP server names, OR
  • Plugin MCP servers should be registered with a name that is allowlistable (e.g., plugin.context7.context7 or just context7), OR
  • A dedicated pluginName or serverNamePrefix matcher should be added to allowedMcpServers

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 serverCommand workaround
  • 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.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗