# 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,
    *,
    trust_project_mcp: bool | None = None,
) -> ConfigResolution | ConfigResolutionError
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `config_path` | `str \| None` | Yes | Explicit `--mcp-config` path, or `None` for auto-discovery. |
| `trust_project_mcp` | `bool \| None` | No | Whether project configs have whole-config trust for the current session. Persisted approvals and denials still apply. (default: `None`) |

## 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/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/mcp_login_service.py#L197)