Skip to main content

@cloudbase/mcp-transformer

CloudBase MCP protocol conversion tool supports multiple transmission protocol conversion modes.

Global installation:

npm i -g @cloudbase/mcp-transformer

Command List

streamableToStdio - Streamable HTTP to STDIO Conversion

USAGE
npx @cloudbase/mcp-transformer streamableToStdio (--url value) [--token value] [--header value]...

FLAGS
--url POST server URL [required]
[--token] Authentication token, automatically added to the Authorization request header
[--header]... Custom request header (format: "Header: Value")
-h --help Show help information

Example:
npx @cloudbase/mcp-transformer streamableToStdio --url https://api.example.com/messages \
--token "Bearer xyz" \
--header "X-Request-ID: 123"

postToStdio - POST to STDIO

USAGE
npx @cloudbase/mcp-transformer postToStdio (--url value) [--token value] [--header value]...

FLAGS
--url POST server URL [required]
[--token] Authentication token, automatically added to the Authorization request header
[--header]... Custom request header (format: "Header: Value")
-h --help Show help information

Example:
npx @cloudbase/mcp-transformer postToStdio --url https://api.example.com/messages \
--token "Bearer xyz" \
--header "X-Request-ID: 123"

sseToStdio - SSE to STDIO

USAGE
npx @cloudbase/mcp-transformer sseToStdio (--url value) [--token value] [--header value]...

FLAGS
--url SSE server URL [required]
[--token] Authentication token
[--header]... Custom request header
-h --help Show help information

Example:
npx @cloudbase/mcp-transformer sseToStdio --url https://sse.example.com/events \
--header "Cache-Control: no-cache"

stdioToStreamable - STDIO to Streamable HTTP

USAGE
npx @cloudbase/mcp-transformer stdioToStreamable (--stdioCmd value) [--verifyAccess] [--port value] [--enableCors] [--stateful] [--sessionTimeout value] [--streamableHTTPPath value]

FLAGS
--stdioCmd STDIO service startup command [required]
[--verifyAccess/--noVerifyAccess] Verify access token [default = true]
[--port] Service port [default = 3000]
[--enableCors] Enable CORS [default = false]
[--stateful] Enable stateful session [default = false]
[--sessionTimeout] Session timeout (milliseconds). Only supported in stateful mode. Sessions will be deleted only upon explicit client termination if not set
[--streamableHTTPPath] Streamable HTTP endpoint path [default = /messages]
-h --help Show help information

Example:
npx @cloudbase/mcp-transformer stdioToStreamable \
--stdioCmd "node server.js" \
--port 8080 \
--enableCors \
--stateful \
--sessionTimeout 300000

stdioToCloudrunSse - STDIO to Cloud Run SSE

USAGE
npx @cloudbase/mcp-transformer stdioToCloudrunSse (--stdioCmd value) [--verifyAccess] [--port value] [--ssePath value] [--enableCors]

FLAGS
--stdioCmd STDIO service startup command [required]
[--verifyAccess] Verify access token [default = true]
[--port] Service port [default = 3000]
[--ssePath] SSE endpoint path [default = /messages]
[--enableCors] Enable CORS [default = false]
-h --help Show help information

Example:
npx @cloudbase/mcp-transformer stdioToCloudrunSse \
--stdioCmd "python server.py" \
--port 8080 \
--enableCors

stdioToCloudrun - STDIO to Cloud Run POST + SSE

USAGE
npx @cloudbase/mcp-transformer stdioToCloudrun (--stdioCmd value) [--verifyAccess] [--port value] [--enableCors] [--sseRoute local]

FLAGS
--stdioCmd STDIO service startup command [required]
[--verifyAccess] Verify access token [default = true]
[--port] Service port [default = 3000]
[--enableCors] Enable CORS [default = false]
[--sseRoute] SSE route setting (use 'local' for local development)
-h --help Show help information

Example (local development):
npx @cloudbase/mcp-transformer stdioToCloudrun \
--stdioCmd "node ./server.js" \
--sseRoute local \
--noVerifyAccess