# load_mcp_config_lenient

> **Function** in `deepagents_code`

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

Load a single MCP config file, returning `None` on any error.

Disabled servers are removed before per-server validation, so explicitly
denied entries can neither block loading nor surface to a caller inspecting
the config. The single-file counterpart to `load_merged_mcp_configs_lenient`
(which the trust prompt uses); this one has no production caller today and is
retained as the standalone lenient loader.

## Signature

```python
load_mcp_config_lenient(
    config_path: Path,
    *,
    disabled_servers: Collection[str] = (),
) -> dict[str, Any] | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path` | Yes | Config path to load. |
| `disabled_servers` | `Collection[str]` | No | Server names to remove before validation. (default: `()`) |

## Returns

`dict[str, Any] | None`

The parsed config, or `None` if loading or validation fails.

---

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