# discover_mcp_configs

> **Function** in `deepagents_code`

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

Find MCP config files from standard locations.

Checks the paths listed in `MCP_CONFIG_DISCOVERY_PATHS`, lowest to
highest precedence.

## Signature

```python
discover_mcp_configs(
    *,
    project_context: ProjectContext | None = None,
) -> list[Path]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_context` | `ProjectContext \| None` | No | Explicit project path context, if available. (default: `None`) |

## Returns

`list[Path]`

Existing config file paths, ordered from lowest to highest precedence.

---

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