@yglabs/mcp-http2stdio-internal
v0.1.0
Published
Wrap an upstream HTTP MCP server as a local stdio MCP server.
Maintainers
Readme
mcp-http2stdio
Wrap an upstream HTTP MCP server as a local stdio MCP server.
Quick Start
Run directly with npx:
npx -y @yglabs/mcp-http2stdio@latest --url <upstream-mcp-http-url>Global install:
npm install -g @yglabs/mcp-http2stdio
mcp-http2stdio --url <upstream-mcp-http-url>Usage
mcp-http2stdio --url <upstream-mcp-http-url> [--account <upn>] [--client-id <guid>]Options:
--url: required upstream HTTP MCP server URL.--account: optional MSAL account hint.--client-id: optional OAuth client id. Defaults toaebc6443-996d-45c2-90f0-388ff96faa56.
Behavior
- Local transport is stdio MCP.
- Upstream transport is HTTP MCP.
- Requests and notifications are transparently proxied to the upstream server.
initializeis not handled locally; it is forwarded upstream like any other MCP request.- default client-id is aebc6443-996d-45c2-90f0-388ff96faa56
MCP Client Configuration
[mcp_servers.http_proxy]
enabled = true
command = "npx"
args = ["-y", "@yglabs/mcp-http2stdio@latest", "--url", "<upstream-mcp-http-url>"]Authentication
Authentication follows the @microsoft/workiq MSAL flow as closely as practical, with one intentional local change:
- token cache root:
~/.mcp-http2stdio - token cache file:
~/.mcp-http2stdio/msal_token_cache.dat
On Windows this resolves to:
C:\Users\<user>\.mcp-http2stdio\msal_token_cache.datmacOS Broker
macOS defaults to browser-based auth (http://localhost redirect). To enable the broker path used by @microsoft/workiq, create:
~/.mcp-http2stdio/.mcp-http2stdio.jsonwith:
{
"enableMacBroker": "true"
}Development
Build the project:
dotnet build McpHttp2Stdio.slnxPublish native binaries into the npm package layout:
npm run publish:npmVerify the npm tarball layout and executable shim:
npm run release:verifyCreate a local tarball:
npm run pack:npmPublish to npm:
npm publish --access public