Class SessionMcpApi

java.lang.Object
com.github.copilot.generated.rpc.SessionMcpApi

@Generated("copilot-sdk-codegen") public final class SessionMcpApi extends Object
API methods for the mcp namespace.
Since:
1.0.0
  • Field Details

  • Method Details

    • list

      Lists materialized MCP servers and their connection status. Cache misses may start and wait for MCP servers.
      Since:
      1.0.0
    • listConfigured

      Lists effective MCP configuration without starting, restarting, authenticating, or waiting for servers. An optional live observation is from an already materialized matching server; this is not a readiness guarantee.
      Since:
      1.0.0
    • listTools

      Lists the tools exposed by a connected MCP server on this session's host. This performs a live `tools/list` request. Tool UI metadata is returned independently of whether MCP Apps rendering is enabled for the session.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • enable

      Enables an MCP server for the session.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • enable

      Enables an MCP server for the session.

      Accepts the extensible request, including inputs added after the params record.

      Since:
      1.0.0
    • disable

      Disables an MCP server for the session.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • disable

      Disables an MCP server for the session.

      Accepts the extensible request, including inputs added after the params record.

      Since:
      1.0.0
    • reload

      Reloads MCP server connections for the session.
      Since:
      1.0.0
    • moveLoadingToBackground

      Releases any turns waiting on an in-flight MCP load without cancelling the load, letting the agent proceed while MCP servers finish connecting in the background. No-op when no MCP load is in flight or waiting turns were already released.
      Since:
      1.0.0
    • executeSampling

      Runs an MCP sampling inference on behalf of an MCP server.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • cancelSamplingExecution

      Cancels an in-flight MCP sampling execution by request ID.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • setEnvValueMode

      Sets how environment-variable values supplied to MCP servers are resolved (direct or indirect).

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • removeGitHub

      Removes the auto-managed `github` MCP server when present.
      Since:
      1.0.0
    • startServer

      Starts an individual MCP server on the live session. Omit `config` for a config-free start-by-name of an already-configured server (reuses the server's already-registered configuration); supply `config` to start from a caller-supplied configuration. Session-scoped and ephemeral: the server is added to this session's running set only and is reaped when the session ends. Does NOT modify persistent user configuration (`mcp.config.*`), so it does not affect future sessions. The server surfaces through `session.mcp.list` and the `session.mcp_servers_loaded` / `session.mcp_server_status_changed` events like any other server.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • startServer

      Starts an individual MCP server on the live session. Omit `config` for a config-free start-by-name of an already-configured server (reuses the server's already-registered configuration); supply `config` to start from a caller-supplied configuration. Session-scoped and ephemeral: the server is added to this session's running set only and is reaped when the session ends. Does NOT modify persistent user configuration (`mcp.config.*`), so it does not affect future sessions. The server surfaces through `session.mcp.list` and the `session.mcp_servers_loaded` / `session.mcp_server_status_changed` events like any other server.

      Accepts the extensible request, including inputs added after the params record.

      Since:
      1.0.0
    • restartServer

      Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • restartServer

      Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).

      Accepts the extensible request, including inputs added after the params record.

      Since:
      1.0.0
    • stopServer

      Stops an individual MCP server on the session's host.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • stopServer

      Stops an individual MCP server on the session's host.

      Accepts the extensible request, including inputs added after the params record.

      Since:
      1.0.0
    • isServerRunning

      Checks whether a named MCP server is currently running on the session's host.

      Note: the sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0