# scoped_mcp_server_name

> **Function** in `deepagents_code`

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

Namespace a plugin-declared MCP server's name under its plugin id.

Plugin identifiers may contain characters rejected by dcode's MCP loader.
Use `__` as the namespace separator so names stay unique and valid.

## Signature

```python
scoped_mcp_server_name(
    plugin_id: str,
    server_name: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `plugin_id` | `str` | Yes | Full plugin id in `name@marketplace` form. |
| `server_name` | `str` | Yes | Unscoped server name from the plugin config. |

## Returns

`str`

Scoped server name safe for `_SERVER_NAME_RE`.

---

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