Get the FREE Ultimate OpenClaw Setup Guide →

mcp -and-gw

An MCP stdio to HTTP SSE transport gateway with example server and MCP client

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio boilingdata-mcp-server-and-gw npx mcp-server-and-gw http://localhost:8808/ \
  --env MCP_HOST="localhost" \
  --env MCP_PORT="8808"

How to use

This MCP server acts as a bridge between standard input/output (stdio) and an HTTP SSE (Server-Sent Events) endpoint. It enables Claude Desktop or other MCP clients to discover and communicate with your local server by exposing an SSE-based transport over HTTP while the gateway handles the stdio side. You can run the gateway via npx (or install globally) and point it at your local MCP server, with environment variables controlling the host and port as needed. The README demonstrates using mcp-server-and-gw to bridge to a local server at http://localhost:8808/ and then configuring Claude Desktop to connect to that endpoint for discovery of resources and tools. The example server/client demonstrates how the server can expose resources and tools (such as a SQL query tool and a visualization tool) to a client through the MCP protocol.

Typical usage paths:

  • Start the gateway pointing to your SSE endpoint, e.g. npx mcp-server-and-gw http://localhost:8808/
  • Expose the gateway configuration to Claude Desktop by writing an appropriate claude_desktop_config.json that includes the gateway as an MCP server with command and args
  • Start your SSE server (for example via node examples/server.js) and then start the Claude Desktop client to discover resources and tools exposed by the server.

The tools demonstrated in the example include:

  • A query tool that runs a read-only SQL query (e.g., SELECT 42;) on a DuckDB database
  • A visualise tool that outputs a chart configuration compatible with Apache ECharts based on an SQL query result

How to install

Prerequisites:\n- Node.js and npm installed on your machine (the project uses npm to install the gateway).\n\nInstallation steps:\n1) Install the MCP gateway globally using npm:\nbash\nnpm install -g mcp-server-and-gw\n\n2) Or run directly with npx (no global install required):\nbash\nnpx mcp-server-and-gw http://localhost:8808/\n\n3) (Optional) Set environment variables to configure host/port for Claude or your own client:\nbash\n# Example environment variables used by the gateway integration with Claude\nexport MCP_HOST=localhost\nexport MCP_PORT=8808\n\n4) Start the SSE server (example from README):\nbash\nPORT=8808 node examples/server.js\n\n5) Start Claude Desktop or the MCP client and connect to the gateway endpoint at http://localhost:8808/

Additional notes

Tips and notes:\n- Ensure that npx is in your PATH when using the gateway command. If you prefer, install the gateway globally or use a full path to npx.\n- The gateway config shown in the README uses an example server name (Claude Gateway Example). You can rename this to something meaningful for your setup.\n- If you run multiple MCP servers, you can add more entries under mcpServers to expose additional endpoints or transports.\n- The environment variables MCP_HOST and MCP_PORT control how Claude Desktop discovers the gateway. Adjust them to match your local or remote setup.\n- The example demonstrates bridging stdio to HTTP SSE; depending on your deployment, you may need to ensure network access and firewall rules permit HTTP SSE traffic to reach the gateway.\n- When testing, start the SSE server first, then the gateway, then Claude Desktop to ensure resources and tools are discovered correctly.

Related MCP Servers

Sponsor this space

Reach thousands of developers