MCPcopy Index your code
hub / github.com/github/copilot-sdk / enable

Method enable

python/copilot/generated/rpc.py:26065–26069  ·  view source on GitHub ↗

Enables an MCP server for the session.\n\nArgs:\n params: Name of the MCP server to enable for the session.

(self, params: MCPEnableRequest, *, timeout: float | None = None)

Source from the content-addressed store, hash-verified

26063 return MCPListToolsResult.from_dict(await self._client.request("session.mcp.listTools", params_dict, **_timeout_kwargs(timeout)))
26064
26065 async def enable(self, params: MCPEnableRequest, *, timeout: float | None = None) -> None:
26066 "Enables an MCP server for the session.\n\nArgs:\n params: Name of the MCP server to enable for the session."
26067 params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None}
26068 params_dict["sessionId"] = self._session_id
26069 await self._client.request("session.mcp.enable", params_dict, **_timeout_kwargs(timeout))
26070
26071 async def disable(self, params: MCPDisableRequest, *, timeout: float | None = None) -> None:
26072 "Disables an MCP server for the session.\n\nArgs:\n params: Name of the MCP server to disable for the session."

Calls 3

_timeout_kwargsFunction · 0.85
to_dictMethod · 0.45
requestMethod · 0.45