- How you use it
- You ask for it
- What it can do
- writes files
- What's inside
The option
| Option | ASkill · v1.0.0MCP security-audit skill from GitHub awesome-copilot |
|---|---|
| How you use it | You ask for it |
| What it can do | writes files |
| What's inside |
What this thread does
Anthropic's 2.1.305 notes stop allowlist-filtering managed stdio servers whose substitutions occur only in env (use deniedMcpServers to block them), and 2.1.318 extends URL denies to matching Anthropic servers and cloud/runner connectors when their own URL is supplied (checked 2026-11-05).
The problem
By default anyone running Claude Code can connect any MCP server. Anthropic's managed-MCP page (read 18 October 2026) says it reviews connectors for its directory but does not security-audit or manage any MCP server. You are the admin and want a short list of approved servers.
Pick a pattern (from the docs)
| Goal | Setting |
|---|---|
| Block user-configured MCP; managed and in-process exceptions may still load | managed-mcp.json with {"mcpServers": {}} |
| Same configured servers for everyone, plus permitted exceptions | managed-mcp.json with the servers |
| Give everyone some remote servers, keep theirs | managedMcpServers in managed settings |
| Approved catalog; users add from it, rest blocked | allowedMcpServers + allowManagedMcpServersOnly: true |
| Only plugins may bring servers | strictPluginOnlyCustomization including mcp |
| Soft list users can broaden | allowedMcpServers alone |
| Block known-bad only | deniedMcpServers |
managed-mcp.json lives at /Library/Application Support/ClaudeCode/ (macOS), /etc/claude-code/ (Linux, WSL) or the ClaudeCode folder under Program Files (Windows). It cannot be delivered through server-managed settings; use MDM or any process with admin rights.
A hard allowlist (docs example, shortened)
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverUrl": "https://api.githubcopilot.com/*" },
{ "serverUrl": "https://*.internal.example.com/*" },
{ "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
],
"deniedMcpServers": [
{ "serverUrl": "https://*.untrusted.example.com/*" }
]
}
Put it in a managed settings source (server-managed settings, managed-settings.json, MDM profile or registry).
Traps the docs call out
serverNameis not a security control. It is the label a user types inclaude mcp add, so any server can be calledgithub. Enforce withserverUrlorserverCommand.- Allowlists from every scope merge, including the user's
~/.claude/settings.json, so users can widen yours unlessallowManagedMcpServersOnlyis true (needs v2.1.273 or later to read across sources). serverCommandmust match exactly, every argument in order, and theenvblock is not compared.- Port matching:
https://mcp.example.com/*matches port 443 only; use:*for any port. managed-mcp.jsonis readable by every user on the machine, so no API keys inenv; use${VAR}expansion or OAuth.- Silent removal: a server blocked by new policy just disappears from
/mcp; tell users before rollout. allowManagedMcpServersOnlyis separate fromallowManagedPermissionRulesOnly, which only covers permission rules.
Verify
On a managed machine claude mcp list should show only the managed set, and claude mcp add --transport http test https://example.com/mcp should fail with an enterprise-policy error (the docs say the URL need not exist). Set OTEL_LOG_TOOL_DETAILS=1 with OpenTelemetry export to see which servers people actually call.
Known bug reports (titles and status checked 2026-11-24)
GitHub issues in anthropics/claude-code report that claude mcp list ignored allow/deny lists (#95020, closed as completed on 2026-11-20), that allowedMcpServers from slow remote managed settings was not enforced at startup (#96408, still open), and that plugin MCP servers are ignored under allowManagedMcpServersOnly (#94803, still open). I did not reproduce them; test your setup rather than assuming the docs and the build agree.
Limits
Docs-based; I changed no settings. Prompt injection through an approved server is not addressed by an allowlist.
Started from a post by @Anthropic, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.