# discover_plugin_mcp_configs

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/plugins/adapters/mcp/discover_plugin_mcp_configs)

Discover enabled plugins and compose their MCP config layers.

## Signature

```python
discover_plugin_mcp_configs(
    *,
    project_dir: Path | None = None,
) -> tuple[JsonObject, ...]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_dir` | `Path \| None` | No | Project directory for variable substitution. (default: `None`) |

## Returns

`tuple[JsonObject, ...]`

Plugin MCP config layers, or an empty tuple when discovery fails.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/plugins/adapters/mcp.py#L196)