Summary
Add HTTP transport support to the MCP server, in addition to the existing stdio transport.
Parent tracking issue: joshrotenberg/jpx-cloud#1 (jpx-server as multi-agent query service)
Motivation
- Enables remote MCP server deployment (not just local stdio)
- Allows multiple clients to connect to a single server instance
- Better suited for containerized/cloud deployments
- Foundation for SaaS offering
Current State
- Using
rmcp v0.12 with transport-io feature (stdio only)
rmcp already supports HTTP via transport-streamable-http-server feature
- Latest
rmcp is v0.14.0
Proposed Implementation
-
Update rmcp to latest version
-
Add feature flag in Cargo.toml:
mcp-http = ["rmcp/transport-streamable-http-server", ...]
-
Add CLI flags via clap:
# Current behavior (default)
jpx-server --transport stdio
# HTTP mode
jpx-server --transport http --port 3000
jpx-server --transport http --port 3000 --host 0.0.0.0
-
Transport selection in mcp/mod.rs:
match args.transport {
Transport::Stdio => service.serve(stdio()).await?,
Transport::Http => service.serve(StreamableHttpService::new(...)).await?,
}
Open Questions
- Authentication: Should we support API keys in this PR or separate? (Leaning separate - keep this focused on transport)
- TLS: Support HTTPS directly or assume reverse proxy handles it initially?
- Default port: 3000? 8080? Something else?
References
Summary
Add HTTP transport support to the MCP server, in addition to the existing stdio transport.
Parent tracking issue: joshrotenberg/jpx-cloud#1 (jpx-server as multi-agent query service)
Motivation
Current State
rmcpv0.12 withtransport-iofeature (stdio only)rmcpalready supports HTTP viatransport-streamable-http-serverfeaturermcpis v0.14.0Proposed Implementation
Update rmcp to latest version
Add feature flag in
Cargo.toml:Add CLI flags via clap:
Transport selection in
mcp/mod.rs:Open Questions
References