# merge_mcp_configs

> **Function** in `deepagents_code`

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

Merge multiple MCP config dicts by server name.

## Signature

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

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `configs` | `list[dict[str, Any]]` | Yes | Config dictionaries in ascending precedence order. |

## Returns

`dict[str, Any]`

A single config dict with later server definitions overriding earlier ones.

---

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