Skip to content
BENIBIX Learn

deniedMcpServers

AI⌨️ Claude CodeConfiguration

Also known as deniedMcpServers setting, MCP denylist

A list of MCP servers that may never load.

Think of it like

It is like a no list at the door. Even a friend cannot bring those people in.

Example

Jack's company bans one server that can delete files. IT puts it on the deny list, and it cannot load from any source.

Why it matters

It blocks one known risk without having to list every safe server.

Definition

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.

Example code

json
{
  "deniedMcpServers": [
    { "serverName": "filesystem" }
  ]
}
Block the server named filesystem everywhere.

Common mistake

Thinking IT can stop people from adding their own deny lines. Deny lists from all files still join.

Key takeaways

  1. 1
    Never loads. From anywhere.
  2. 2
    Beats the allow list. Always.
  3. 3
    Lists join. Every file.

Compare