# deniedMcpServers

> A list of MCP servers that may never load.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** deniedMcpServers setting, MCP denylist

## Think of it like

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

## 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

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

## Example code

```json
{
  "deniedMcpServers": [
    { "serverName": "filesystem" }
  ]
}
```

Block the server named filesystem everywhere.

## Why it matters

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

## Common mistake

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

## Three principles

- **Never loads.** From anywhere.
- **Beats the allow list.** Always.
- **Lists join.** Every file.

## Related terms

- [allowedMcpServers](https://learn.benibix.com/term/ai/allowed-mcp-servers-setting)
- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)
- [--mcp-config Flag](https://learn.benibix.com/term/ai/mcp-config-flag)

## Told apart from

- [allowedMcpServers vs deniedMcpServers](https://learn.benibix.com/compare/allowed-mcp-servers-setting-vs-denied-mcp-servers-setting): 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.

---

Source: https://learn.benibix.com/term/ai/denied-mcp-servers-setting
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
