mcp-server-and-gw

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

68
5

MCP Gateway, Server, and Client

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.

Install claude_gateway

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.

Add Configuration into Claude

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.

Example Server and Client

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.

Repository

BO
boilingdata

boilingdata/mcp-server-and-gw

Created

November 28, 2024

Updated

March 28, 2025

Language

TypeScript

Category

Communication