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

Method connect_stdio

crates/opencode-mcp/src/client.rs:222–234  ·  view source on GitHub ↗
(&self, config: McpServerConfig)

Source from the content-addressed store, hash-verified

220 // -- Connection methods ---------------------------------------------------
221
222 pub async fn connect_stdio(&self, config: McpServerConfig) -> Result<(), McpClientError> {
223 let result = self.connect_stdio_inner(config).await;
224 match &result {
225 Ok(()) => self.set_status(McpStatus::Connected).await,
226 Err(e) => {
227 self.set_status(McpStatus::Failed {
228 error: e.to_string(),
229 })
230 .await;
231 }
232 }
233 result
234 }
235
236 async fn connect_stdio_inner(&self, config: McpServerConfig) -> Result<(), McpClientError> {
237 let transport = StdioTransport::new(&config.command, &config.args, config.env).await?;

Callers 2

stdioMethod · 0.80
add_stdioMethod · 0.80

Calls 2

connect_stdio_innerMethod · 0.80
set_statusMethod · 0.45

Tested by

no test coverage detected