Skip to main content

Module serve

Module serve 

Source
Expand description

grex serve — launch the MCP stdio server (feat-m7-1 stage 8).

Wires the rmcp framework (built in grex-mcp) to the actual stdio transport on top of a Tokio runtime. The runtime is constructed per-invocation: cli::run is sync, but rmcp’s stdio loop is async, so we bridge with a current-thread runtime started on demand.

§Tracing discipline

grex-mcp::GrexMcpServer::run reinstalls a stderr-pinned subscriber using EnvFilter::try_from_default_env() with info fallback. To silence rmcp’s “Service initialized as server” INFO line in production, main.rs defaults RUST_LOG to grex=info,rmcp=warn when no env var is present (Stage 5 wiring note #7). Tests can override with RUST_LOG=….

Functions§

run