Expand description
grex-mcp — MCP-native server for grex (M7).
Stage 5 wires the rmcp framework: the server speaks the MCP
2025-06-18 wire protocol over any rmcp::transport (stdio in
production, tokio::io::duplex in tests). The handshake +
tools/list (returning empty) + transport-close shutdown are live;
the 11 tool handlers land in Stage 6, and cancellation in Stage 7.
§Stdout discipline
The MCP stdio transport multiplexes only JSON-RPC bytes on
stdout. All diagnostics MUST go to stderr. GrexMcpServer::run
installs a tracing_subscriber::fmt writer pinned to stderr —
idempotently, so test reuse and serve-from-CLI both work. The
no_println_lint.rs integration test enforces zero println! /
print! macros under src/ to prevent regressions.
Re-exports§
pub use error::CancelledExt;pub use error::REQUEST_CANCELLED;pub use tools::VERBS_EXPOSED;
Modules§
- error
- Error mapping from grex-core failure types to MCP error envelopes.
- tools
- Tool registry surface for the grex MCP server.
Structs§
- Grex
McpServer - The grex MCP server. One instance per
grex serveinvocation; one instance per integration test. Cheap to construct; all state behindArcsoServerHandlerimpls can clone onto handler tasks for free. - Server
State - Shared, immutable-after-build state every tool handler reads.