# get_disabled_servers

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/mcp_disabled/get_disabled_servers)

Return the server names disabled by the user or by managed config.

## Signature

```python
get_disabled_servers(
    *,
    config_path: Path | None = None,
) -> set[str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path \| None` | No | Override the default config location; intended for tests. Passing a path also excludes managed policy from this read, so production callers must pass `None`. (default: `None`) |

## Returns

`set[str]`

Union of the user and managed deny sets. Managed denies survive an

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/mcp_disabled.py#L357)