# load_mcp_config_lenient

> **Function** in `deepagents_cli`

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

Load an MCP config file, returning None on any error.

Wraps `load_mcp_config` with lenient error handling suitable for
auto-discovery. Missing files are skipped silently; parse and validation
errors are logged as warnings.

## Signature

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

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `Path` | Yes | Path to the MCP config file. |

## Returns

`dict[str, Any] | None`

Parsed config dict, or None if the file is missing or invalid.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/b710a69b12e49479045eaa54dfb709326473500b/libs/cli/deepagents_cli/mcp_tools.py#L330)