# MCPConfigError

> **Class** in `deepagents_code`

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

An MCP configuration file is malformed or structurally invalid.

Subclasses `ValueError` so existing `except ValueError` handlers
keep working; new code can catch this specifically to render a
user-actionable message (typically with a file path and hint).

## Signature

```python
MCPConfigError()
```

## Extends

- `ValueError`

---

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