This repository provides a bridge, server, and client for connecting Claude Desktop to remote servers via HTTP SSE, enabling independent server development and faster iteration cycles. This repository provides a
This project provides a bridge between Claude Desktop and remote servers using the Model Context Protocol (MCP). Since Claude Desktop doesn't natively support remote server connections, this solution uses a claude_gateway
script to translate stdio communication to an HTTP SSE endpoint.
The claude_gateway
package can be installed globally via npm (npm install -g mcp-server-and-gw
) or used directly with npx (npx claude_gateway http://localhost:9999
). Environment variables like MCP_HOST
and MCP_PORT
can also be used for configuration.
The gateway script, written in Node.js, facilitates communication between Claude Desktop and a server. Configuration involves building the script (yarn install
, yarn build
), copying it to a designated location, and updating the claude_desktop_config.json
file to point to the script. The server (node build/server.js
) must be running for Claude to discover resources and tools.
The repository also includes example server (src/server.ts
) and client (src/client.ts
) implementations for independent development and testing of the SSE server. These examples demonstrate how to establish a connection, exchange messages, and interact with the server's resources and tools.
boilingdata/mcp-server-and-gw
November 28, 2024
March 28, 2025
TypeScript