allowedMcpServers vs deniedMcpServers
People think the allow list wins when a server is on both. The deny list always wins, and it is checked first. The allow list is a list of the only servers that may load, while the deny list names the ones that never may. Deny lists from every file join, so anyone can block a server for themselves.
allowedMcpServers
A list of the only MCP servers people may add.
allowedMcpServers is a settings key that lists the MCP servers people may add. Claude Code blocks any server not on it, wherever it is set up. That holds even for a plugin. Each entry names a server by name, command or URL. Left unset, every server is fine. An empty list blocks all the servers people add.
deniedMcpServers
A list of MCP servers that may never load.
deniedMcpServers is a settings key that blocks the MCP servers it names. Claude Code will not load a match from any place, such as a plugin, a flag or claude.ai. Each entry names a server by name, command or URL. The deny list wins over the allow list. Deny lists from all files are joined.
In one line
- allowedMcpServers
- A list of the only MCP servers people may add.
- deniedMcpServers
- A list of MCP servers that may never load.