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

Function start_mcp_auth

crates/opencode-server/src/routes.rs:2591–2604  ·  view source on GitHub ↗
(Path(name): Path<String>)

Source from the content-addressed store, hash-verified

2589}
2590
2591async fn start_mcp_auth(Path(name): Path<String>) -> Result<Json<serde_json::Value>> {
2592 let manager = get_mcp_oauth_manager();
2593 ensure_mcp_server_registered(manager, &name).await?;
2594 let state = manager
2595 .start_oauth(&name)
2596 .await
2597 .map_err(mcp_error_to_api_error)?;
2598
2599 Ok(Json(serde_json::json!({
2600 "authorization_url": state.authorization_url,
2601 "client_id": state.client_id,
2602 "status": state.status
2603 })))
2604}
2605
2606#[derive(Debug, Deserialize)]
2607pub struct McpAuthCallbackRequest {

Callers

nothing calls this directly

Calls 3

get_mcp_oauth_managerFunction · 0.85
start_oauthMethod · 0.80

Tested by

no test coverage detected