@smn3786/mcp-sse-bridge
v1.0.3
Published
A lightweight Node.js bridge that connects a local Stdio-based MCP client to a remote SSE-based MCP server.
Maintainers
Readme
MCP SSE Bridge
A lightweight Node.js bridge that connects a local Stdio-based MCP client (like Claude Desktop or IDEs) to a remote SSE-based MCP server.
Specs
- Transport: Bridges
StdioServerTransport(local) <->SSEClientTransport(remote). - Input: JSON-RPC messages via Stdio.
- Output: JSON-RPC messages via Server-Sent Events (SSE) and HTTP POST.
- Dependencies:
@modelcontextprotocol/sdkeventsource(polyfill for Node.js)
Build
Install Dependencies
npm installBuild Bundle This project uses
esbuildto bundle the script and its dependencies into a single file.npm run buildThe output file will be located at
dist/sse-bridge.js.
Usage
Via npx
You can run the bridge directly without installation using npx:
npx -y @smn3786/mcp-sse-bridge <remote-sse-url>Local Usage
Run the bundled script using Node.js:
node dist/sse-bridge.js <remote-sse-url>Configuration Examples
1. Using Local Installation (Recommended)
Install via npm install @smn3786/mcp-sse-bridge, then configure:
{
"mcpServers": {
"shadcn-mcp-server": {
"command": "node",
"args": [
"/absolute/path/to/node_modules/@smn3786/mcp-sse-bridge/dist/sse-bridge.js",
"http://<remote-ip>:<port>/sse"
]
}
}
}2. Using npx
{
"mcpServers": {
"shadcn-mcp-server": {
"command": "npx",
"args": [
"-y",
"@smn3786/mcp-sse-bridge",
"http://<remote-ip>:<port>/sse"
]
}
}
}