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

Method add_mcp_server

src/apps/cli/src/modes/chat.rs:2502–2512  ·  view source on GitHub ↗

Schedule adding a new MCP server (deferred to allow loading state to render)

(&mut self, name: &str, config_json_str: &str, chat_view: &mut ChatView)

Source from the content-addressed store, hash-verified

2500
2501 /// Schedule adding a new MCP server (deferred to allow loading state to render)
2502 fn add_mcp_server(&mut self, name: &str, config_json_str: &str, chat_view: &mut ChatView) {
2503 if self.pending_mcp_op.is_some() || self.has_pending_mcp_add_task() {
2504 return;
2505 }
2506
2507 chat_view.set_status(Some(format!("Adding MCP server '{}'...", name)));
2508 self.pending_mcp_op = Some(PendingMcpOp::Add {
2509 name: name.to_string(),
2510 config_json: config_json_str.to_string(),
2511 });
2512 }
2513
2514 /// Execute MCP server add (called from main loop after render)
2515 fn execute_mcp_add(

Callers 1

handle_key_eventMethod · 0.80

Calls 2

set_statusMethod · 0.45

Tested by

no test coverage detected