# resolve_mcp_config

> **Function** in `deepagents_code`

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

Resolve an MCP config dict for login without printing anything.

## Signature

```python
resolve_mcp_config(
    config_path: str | None,
) -> ConfigResolution | ConfigResolutionError
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `str \| None` | Yes | Explicit `--mcp-config` path, or `None` for auto-discovery. |

## Returns

`ConfigResolution | ConfigResolutionError`

A `ConfigResolution` on success, or a `ConfigResolutionError`
describing why no usable config could be assembled.

---

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