# merge_mcp_configs

> **Function** in `deepagents_cli`

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

Merge multiple MCP config dicts by server name.

Later entries override earlier ones for the same server name
(simple `dict.update` on `mcpServers`).

## Signature

```python
merge_mcp_configs(
    configs: list[dict[str, Any]],
) -> dict[str, Any]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `configs` | `list[dict[str, Any]]` | Yes | Ordered list of parsed config dicts (each with `mcpServers` key). |

## Returns

`dict[str, Any]`

Merged config with combined `mcpServers`.

---

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