mcpway 0.2.0

Run MCP stdio servers over SSE, WebSocket, Streamable HTTP, and gRPC transports.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::support::stdio_child::CommandSpec;

pub fn parse_command_spec(cmd: &str) -> Result<CommandSpec, String> {
    let parts = shell_words::split(cmd).map_err(|err| err.to_string())?;
    if parts.is_empty() {
        return Err("stdio command is empty".into());
    }
    Ok(CommandSpec {
        program: parts[0].clone(),
        args: parts[1..].to_vec(),
    })
}