# resolve_and_load_mcp_tools

> **Function** in `deepagents_cli`

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

Resolve MCP config and load tools.

Auto-discovers configs from standard locations and merges them.
When `explicit_config_path` is provided it is added as the
highest-precedence source (errors in that file are fatal).

## Signature

```python
resolve_and_load_mcp_tools(
    *,
    explicit_config_path: str | None = None,
    no_mcp: bool = False,
    trust_project_mcp: bool | None = None,
    project_context: ProjectContext | None = None,
) -> tuple[list[BaseTool], MCPSessionManager | None, list[MCPServerInfo]]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `explicit_config_path` | `str \| None` | No | Extra config file to layer on top of auto-discovered configs (highest precedence). Errors are fatal. (default: `None`) |
| `no_mcp` | `bool` | No | If True, disable all MCP loading. (default: `False`) |
| `trust_project_mcp` | `bool \| None` | No | Controls project-level stdio server trust:  - `True`: allow all project stdio servers (flag/prompt approved). - `False`: filter out project stdio servers, log warning. - `None` (default): check the persistent trust store; if the     fingerprint matches, allow; otherwise filter + warn. (default: `None`) |
| `project_context` | `ProjectContext \| None` | No | Explicit project path context for config discovery and trust resolution. (default: `None`) |

## Returns

`tuple[list[BaseTool], MCPSessionManager | None, list[MCPServerInfo]]`

Tuple of `(tools_list, session_manager, server_infos)`.

When no tools are loaded, returns `([], None, [])`.

---

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