MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / disconnect_mcp

Function disconnect_mcp

crates/opencode-server/src/routes.rs:2656–2667  ·  view source on GitHub ↗
(
    State(_state): State<Arc<ServerState>>,
    Path(name): Path<String>,
)

Source from the content-addressed store, hash-verified

2654}
2655
2656async fn disconnect_mcp(
2657 State(_state): State<Arc<ServerState>>,
2658 Path(name): Path<String>,
2659) -> Result<Json<bool>> {
2660 let manager = get_mcp_oauth_manager();
2661 ensure_mcp_server_registered(manager, &name).await?;
2662 manager
2663 .disconnect(&name)
2664 .await
2665 .map_err(mcp_error_to_api_error)?;
2666 Ok(Json(true))
2667}
2668
2669#[derive(Debug, Serialize)]
2670pub struct McpLogsResponse {

Callers

nothing calls this directly

Calls 3

get_mcp_oauth_managerFunction · 0.85
disconnectMethod · 0.80

Tested by

no test coverage detected