MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / connect_mcp

Function connect_mcp

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

Source from the content-addressed store, hash-verified

2641}
2642
2643async fn connect_mcp(
2644 State(_state): State<Arc<ServerState>>,
2645 Path(name): Path<String>,
2646) -> Result<Json<bool>> {
2647 let manager = get_mcp_oauth_manager();
2648 ensure_mcp_server_registered(manager, &name).await?;
2649 manager
2650 .connect(&name)
2651 .await
2652 .map_err(mcp_error_to_api_error)?;
2653 Ok(Json(true))
2654}
2655
2656async fn disconnect_mcp(
2657 State(_state): State<Arc<ServerState>>,

Callers

nothing calls this directly

Calls 3

get_mcp_oauth_managerFunction · 0.85
connectMethod · 0.45

Tested by

no test coverage detected