Control MCP server access for your organization changedmanaged-mcp
Upstream edited this page at 28 Nov 2026 18:34 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Nov 2026 18:37 UTC.
Upstream edited
Recorded here
Lines+10added
Lines−8removed
From line
295
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits39to this page, all time
The whole hunk
from line 295, old and new numbered
/
from line 295
295295
296296#### How `serverCommand` entries match
297297
298A `serverCommand` entry holds the command and its arguments as one array, as in `{ "serverCommand": ["npx", "-y", "server"] }`. Claude Code compares that array with the command and arguments in the server's configuration:
298A `serverCommand` entry holds the command and its arguments as one array, as in `{ "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }`. Claude Code compares that array with the command and arguments in the server's configuration:
299299
300* **Commands match exactly.** Every argument, in order. `["npx", "-y", "server"]` does not match `["npx", "server"]` or `["npx", "-y", "server", "--flag"]`.
300* **Commands match exactly.** Every argument, in order. The entry `["npx", "-y", "@modelcontextprotocol/server-filesystem", "."]` doesn't match either of these commands:
301 * `["npx", "@modelcontextprotocol/server-filesystem", "."]`, which drops `-y`
302 * `["npx", "-y", "@modelcontextprotocol/server-filesystem", ".", "--flag"]`, which adds an argument
301303* **The `env` block isn't compared.** `["node", "server.js"]` matches a server that runs that command with any `env` values. Some environment variables change what `node` loads at startup. To set the `env` values yourself, define the server in [`managed-mcp.json`](#exclusive-control-with-managed-mcp-json).
302304
303305#### How `serverUrl` entries match
from line 388
386388 ],
387389 "deniedMcpServers": [
388390 { "serverName": "dangerous-server" },
389 { "serverCommand": ["npx", "-y", "unapproved-package"] },
391 { "serverCommand": ["python", "/usr/local/bin/unapproved-server.py"] },
390392 { "serverUrl": "https://*.untrusted.example.com/*" }
391393 ]
392394}
from line 425
423425> ```json theme={null}
424426> {
425427> "allowedMcpServers": [
426> { "serverCommand": ["npx", "-y", "approved-package"] }
428> { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
427429> ]
428430> }
429431> ```
from line 432
430432>
431433> | Server | Result |
432434> | :- | :- |
433> | Stdio server with `["npx", "-y", "approved-package"]` | Allowed: matches command |
435> | Stdio server with `["npx", "-y", "@modelcontextprotocol/server-filesystem", "."]` | Allowed: matches command |
434436> | Stdio server with `["node", "server.js"]` | Blocked: doesn't match command |
435437> | HTTP server named `my-api` | Blocked: no name entries to match |
436438
from line 442
440442> {
441443> "allowedMcpServers": [
442444> { "serverName": "github" },
443> { "serverCommand": ["npx", "-y", "approved-package"] }
445> { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "."] }
444446> ]
445447> }
446448> ```
from line 449
447449>
448450> | Server | Result |
449451> | :- | :- |
450> | Stdio server named `local-tool` with `["npx", "-y", "approved-package"]` | Allowed: matches command |
452> | Stdio server named `local-tool` with `["npx", "-y", "@modelcontextprotocol/server-filesystem", "."]` | Allowed: matches command |
451453> | Stdio server named `local-tool` with `["node", "server.js"]` | Blocked: command entries exist but doesn't match |
452454> | Stdio server named `github` with `["node", "server.js"]` | Blocked: stdio servers must match commands when command entries exist |
453455> | HTTP server named `github` | Allowed: matches name |
No line in this hunk matches that.