mcpway 0.1.3

Run MCP stdio servers over SSE, WebSocket, and Streamable HTTP transports.
mcpway-0.1.3 is not a library.
Visit the last successful build: mcpway-0.1.6

mcpway

crates.io

MCPway

mcpway runs MCP stdio servers over SSE, WebSocket, and Streamable HTTP.

Install

cargo install mcpway

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 (open on macOS, xdg-open on Linux, start on Windows).
  • connect --oauth-no-browser is available when launching a browser is not possible in your environment.

Quick Start

cargo build --release -p mcpway
./target/release/mcpway --stdio "./my-mcp-server --root ." --port 8000

Bridge Modes

Examples of supported input/output pairs:

# stdio -> sse (default output for --stdio)
mcpway --stdio "./my-mcp-server --root ." --port 8000

# stdio -> stdio (managed relay mode)
mcpway --stdio "./my-mcp-server --root ." --outputTransport stdio

# stdio -> ws
mcpway --stdio "./my-mcp-server --root ." --outputTransport ws --port 8000

# stdio -> streamable-http
mcpway --stdio "./my-mcp-server --root ." --outputTransport streamableHttp --port 8000

# sse -> stdio
mcpway --sse https://example.com/sse

# streamable-http -> stdio
mcpway --streamableHttp https://example.com/mcp

For endpoint-first usage, use connect:

mcpway connect https://example.com/mcp
mcpway connect wss://example.com/ws --protocol ws

Cargo Workspace

Run from repository root:

cargo metadata --no-deps
cargo check -p mcpway
cargo test -p mcpway
cargo run -p mcpway -- --help

Release Smoke Test (macOS)

Run this on a macOS host before cutting a release:

cargo check -p mcpway
cargo test -p mcpway

# stdio -> stdio
cargo run -p mcpway -- --stdio "./my-mcp-server --root ." --outputTransport stdio

# stdio -> sse
cargo run -p mcpway -- --stdio "./my-mcp-server --root ." --outputTransport sse --port 8000

# oauth flow (verifies browser launch on macOS via `open`)
cargo run -p mcpway -- connect https://example.com/mcp --oauth-login

Command Reference

Shortcuts:

  • -h / --help is available everywhere.
  • No custom short flags are defined; use full --long-option flags.

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

Maintainer

@drvova

License

MIT