MCP Config

McpConfig resource class for asynchronous operations.

class runloop_api_client.sdk.async_mcp_config.AsyncMcpConfig(client, mcp_config_id)[source]

Asynchronous wrapper around an MCP config resource.

MCP configs define how to connect to upstream MCP (Model Context Protocol) servers. They specify the target endpoint and which tools are allowed. Use with devboxes to securely connect to MCP servers.

Example

>>> runloop = AsyncRunloopSDK()
>>> mcp_config = await runloop.mcp_config.create(
...     name="my-mcp-server",
...     endpoint="https://mcp.example.com",
...     allowed_tools=["*"],
... )
>>> info = await mcp_config.get_info()
>>> print(f"MCP Config: {info.name}")
property id: str

Return the MCP config ID.

Returns:

Unique MCP config ID

Return type:

str

async get_info(**options)[source]

Retrieve the latest MCP config details.

Parameters:

options (Unpack[BaseRequestOptions]) – Optional request configuration

Returns:

API response describing the MCP config

Return type:

McpConfigView

async update(**params)[source]

Update the MCP config.

Parameters:

params (Unpack[SDKMcpConfigUpdateParams]) – See SDKMcpConfigUpdateParams for available parameters

Returns:

Updated MCP config view

Return type:

McpConfigView

async delete(**options)[source]

Delete the MCP config. This action is irreversible.

Parameters:

options (Unpack[LongRequestOptions]) – Optional long-running request configuration

Returns:

API response acknowledging deletion

Return type:

McpConfigView