pub struct ClientRpcMcp<'a> { /* private fields */ }Expand description
mcp.* RPCs.
Implementations§
Source§impl<'a> ClientRpcMcp<'a>
impl<'a> ClientRpcMcp<'a>
Sourcepub fn config(&self) -> ClientRpcMcpConfig<'a>
pub fn config(&self) -> ClientRpcMcpConfig<'a>
mcp.config.* sub-namespace.
Sourcepub fn installations(&self) -> ClientRpcMcpInstallations<'a>
pub fn installations(&self) -> ClientRpcMcpInstallations<'a>
mcp.installations.* sub-namespace.
Sourcepub async fn discover(
&self,
params: McpDiscoverRequest,
) -> Result<McpDiscoverResult, Error>
pub async fn discover( &self, params: McpDiscoverRequest, ) -> Result<McpDiscoverResult, Error>
Discovers MCP servers from user, workspace, plugin, and builtin sources.
Wire method: mcp.discover.
§Parameters
params- Optional working directory used as context for MCP server discovery.
§Returns
MCP servers discovered from user, workspace, plugin, and built-in sources.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn plan_install(
&self,
params: McpPlanInstallRequest,
) -> Result<McpPlanInstallResult, Error>
pub async fn plan_install( &self, params: McpPlanInstallRequest, ) -> Result<McpPlanInstallResult, Error>
Requests a side-effect-free MCP install plan from a catalog candidate handle or a caller-supplied card. This host-implemented server method is available through SDK/TUI hosts; standalone and C-ABI runtimes whose host does not implement server-method dispatch return JSON-RPC MethodNotFound. A runtime with planning available returns a normalised plan and opaque single-use plan handle; a runtime without it returns the typed planning-unavailable result. A completed plan reports resource identity, provenance, eligible transport choices, the user-scope target, required typed values and secret placeholders, the policy result, the configuration changes installing would make, and whether a reload would be needed. Planning never writes configuration, stores a secret, or reloads MCP servers, so abandoning a plan needs no call and leaves nothing behind.
Wire method: mcp.planInstall.
§Parameters
params- A side-effect-free request for an MCP install plan. Computing a plan never writes configuration, stores a secret, or reloads MCP servers.
§Returns
Outcome of an mcp.planInstall call: either a normalised plan, or one typed refusal. Nothing is written in either case.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn plan_install_with_options(
&self,
params: McpPlanInstallOptions,
) -> Result<McpPlanInstallResult, Error>
pub async fn plan_install_with_options( &self, params: McpPlanInstallOptions, ) -> Result<McpPlanInstallResult, Error>
Requests a side-effect-free MCP install plan from a catalog candidate handle or a caller-supplied card. This host-implemented server method is available through SDK/TUI hosts; standalone and C-ABI runtimes whose host does not implement server-method dispatch return JSON-RPC MethodNotFound. A runtime with planning available returns a normalised plan and opaque single-use plan handle; a runtime without it returns the typed planning-unavailable result. A completed plan reports resource identity, provenance, eligible transport choices, the user-scope target, required typed values and secret placeholders, the policy result, the configuration changes installing would make, and whether a reload would be needed. Planning never writes configuration, stores a secret, or reloads MCP servers, so abandoning a plan needs no call and leaves nothing behind.
Wire method: mcp.planInstall.
§Parameters
params- A side-effect-free request for an MCP install plan. Computing a plan never writes configuration, stores a secret, or reloads MCP servers.
§Returns
Outcome of an mcp.planInstall call: either a normalised plan, or one typed refusal. Nothing is written in either case.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Accepts McpPlanInstallOptions, including inputs added after McpPlanInstallRequest.
Sourcepub async fn prepare_install(
&self,
params: McpPrepareInstallRequest,
) -> Result<McpInstallationManagementResult, Error>
pub async fn prepare_install( &self, params: McpPrepareInstallRequest, ) -> Result<McpInstallationManagementResult, Error>
Consumes a bound catalogue plan and retains one exact fully resolved personal remote MCP operation requiring no supplied values or configured secrets. Returns its runtime operation ID and original expiry before any confirmation, activation, writer initialisation or installation effect. Register the original connection, operation and selected-session binding before calling applyInstall. Missing lower owned admission is unavailable, never a raw-config fallback.
Wire method: mcp.prepareInstall.
§Parameters
params- Side-effect-free preparation of one original bound remote MCP choice.
§Returns
Management result with contract receipt, or a typed request/negotiation refusal.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn apply_install(
&self,
params: McpApplyInstallRequest,
) -> Result<McpInstallationResult, Error>
pub async fn apply_install( &self, params: McpApplyInstallRequest, ) -> Result<McpInstallationResult, Error>
Consumes a retained prepared MCP operation once, revalidates its original authority, requests explicit human consent through installations.confirm on the original connection, then revalidates source and applies the sealed transaction. An uncertain result requires original-operation inspection or recovery, never replay.
Wire method: mcp.applyInstall.
§Parameters
params- Applies exactly one previously prepared operation on its original connection.
§Returns
An installation result together with the exact honoured contract, or a negotiation refusal.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn plan_uninstall(
&self,
params: McpPlanUninstallRequest,
) -> Result<McpInstallationManagementResult, Error>
pub async fn plan_uninstall( &self, params: McpPlanUninstallRequest, ) -> Result<McpInstallationManagementResult, Error>
Prepares a read-only removal plan for an exact owned receipt under the selected existing session. Returns the original operation ID before confirmation; neither planning nor abandonment changes configuration or shared OAuth credentials.
Wire method: mcp.planUninstall.
§Parameters
params- Read-only preparation of one owned removal under fresh selected-session authority.
§Returns
Management result with contract receipt, or a typed request/negotiation refusal.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn apply_uninstall(
&self,
params: McpApplyUninstallRequest,
) -> Result<McpInstallationResult, Error>
pub async fn apply_uninstall( &self, params: McpApplyUninstallRequest, ) -> Result<McpInstallationResult, Error>
Consumes the original owned-removal plan once and requests fresh exact human confirmation on its original connection. Drift is refused; unrelated manual configuration and shared OAuth credentials are preserved.
Wire method: mcp.applyUninstall.
§Parameters
params- One-use application of the exact retained removal plan.
§Returns
An installation result together with the exact honoured contract, or a negotiation refusal.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.