MCPcopy Create free account
hub / github.com/GCWing/BitFun / start_mcp_server

Function start_mcp_server

src/apps/desktop/src/api/mcp_api.rs:388–401  ·  view source on GitHub ↗
(state: State<'_, AppState>, server_id: String)

Source from the content-addressed store, hash-verified

386
387#[tauri::command]
388pub async fn start_mcp_server(state: State<'_, AppState>, server_id: String) -> Result<(), String> {
389 let mcp_service = state
390 .mcp_service
391 .as_ref()
392 .ok_or_else(|| "MCP service not initialized".to_string())?;
393
394 mcp_service
395 .server_manager()
396 .start_server(&server_id)
397 .await
398 .map_err(|e| e.to_string())?;
399
400 Ok(())
401}
402
403#[tauri::command]
404pub async fn stop_mcp_server(state: State<'_, AppState>, server_id: String) -> Result<(), String> {

Callers

nothing calls this directly

Calls 2

server_managerMethod · 0.80
start_serverMethod · 0.45

Tested by

no test coverage detected