mcpway
mcpway runs MCP stdio servers over SSE, WebSocket, and Streamable HTTP.
Install
Crates.io: https://crates.io/crates/mcpway
Supported Platforms
mcpway is supported on:
- Linux
- macOS
- Windows
Platform notes:
- OAuth browser launch uses platform-native open commands (
openon macOS,xdg-openon Linux,starton Windows). connect --oauth-no-browseris available when launching a browser is not possible in your environment.
Quick Start
Bridge Modes
Examples of supported input/output pairs:
# stdio -> sse (default output for --stdio)
# stdio -> stdio (managed relay mode)
# stdio -> ws
# stdio -> streamable-http
# sse -> stdio
# streamable-http -> stdio
For endpoint-first usage, use connect:
Cloudflare MCP is also available as a built-in import source:
Rust API users can bootstrap Cloudflare Code Mode directly:
use ToolClientBuilder;
use json;
async
If Cloudflare returns 401 or 403, tool_api now returns an AuthorizationRequired error with an OAuth redirect hint.
Cargo Workspace
Run from repository root:
Release Smoke Test (macOS)
Run this on a macOS host before cutting a release:
# stdio -> stdio
# stdio -> sse
# oauth flow (verifies browser launch on macOS via `open`)
Command Reference
Shortcuts:
-h/--helpis available everywhere.- No custom short flags are defined; use full
--long-optionflags.
Commands:
mcpway [OPTIONS](run gateway)mcpway generate --definition <PATH> --out <DIR> [OPTIONS]mcpway regenerate --metadata <PATH> [OPTIONS]mcpway connect [ENDPOINT] [OPTIONS]mcpway discover [OPTIONS]mcpway import [OPTIONS]mcpway logs <COMMAND>mcpway logs tail [OPTIONS]
mcpway [OPTIONS]
--stdio --sse --streamableHttp --outputTransport --port --baseUrl --ssePath --messagePath --streamableHttpPath --logLevel --cors --healthEndpoint --header --env --oauth2Bearer --stateful --sessionTimeout --protocolVersion --runtimePrompt --runtimeAdminPort
mcpway generate
--definition --server --out --artifact-name --bundle-mcpway --no-bundle-mcpway --mcpway-binary --compile-wrapper --no-compile-wrapper
mcpway regenerate
--metadata --definition --server --out --bundle-mcpway --no-bundle-mcpway --mcpway-binary --compile-wrapper --no-compile-wrapper
mcpway connect
--server --stdio-cmd --stdio-arg --stdio-env --stdio-wrapper --save-wrapper --protocol --header --oauth2Bearer --oauth-profile --oauth-issuer --oauth-client-id --oauth-scope --oauth-flow --oauth-no-browser --oauth-cache --oauth-login --oauth-logout --oauth-audience --save-profile --registry --profile-name --logLevel --protocolVersion
mcpway discover
--from --project-root --json --strict-conflicts
mcpway import
--from --project-root --json --strict-conflicts --registry --save-profiles --bundle-mcpway --compile-wrapper
mcpway logs tail
--file --lines --level --transport --json --no-follow