
mcp proxy
一个 TypeScript 编写的代理库,支持通过 SSE 实现 MCP 传输层的双向通信。
Repository Info
About This Server
一个 TypeScript 编写的代理库,支持通过 SSE 实现 MCP 传输层的双向通信。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Proxies
A TypeScript library that provides proxy implementations for communication between transport layers of MCP.
Currently supports stdio proxy with Server-Sent Events (SSE) for bidirectional communication.
Usage
Installation
Wherever you have to put the command to run your MCP server, add the following command:
npx -y @indusbit/mcp-proxy stdio
By default, it connects to http://localhost:4000/sse.
Environment Variables
MCP_SERVER_URL: The URL for the SSE connectionMCP_LOG_FILE: Path to a log file for debugging (if not set, logging is disabled)
Command Line
After cloning the repository, install dependencies:
npm install
To start the stdio proxy, set the MCP_SERVER_URL environment variable to the base URL of the SSE server:
MCP_SERVER_URL=http://localhost:3000/sse npx . stdio
You can also set the MCP_LOG_FILE environment variable to a path to a log file for debugging:
MCP_SERVER_URL=http://localhost:3000/sse MCP_LOG_FILE=./logs/stdio.log npx stdio
When settign the MCP_LOG_FILE environment variable in an MCP client (like claude), don't forget to provide it a full path.
Proxy Types
stdio
The stdio proxy establishes a bidirectional communication channel between standard input/output and a server using Server-Sent Events (SSE):
- Connects to an SSE endpoint specified by
MCP_SERVER_URL(defaults to "http://localhost:4000/sse") - Receives a messaging endpoint from the server via an "endpoint" event
- Forwards messages from stdin to the server via HTTP POST requests
- Forwards messages from the server to stdout
Configuration
The following environment variables can be used to configure the proxies:
MCP_SERVER_URL: The base URL for the SSE connection (default: "http://localhost:4000/sse")MCP_LOG_FILE: Path to a log file for debugging (if not set, logging is disabled)
Development
Building
npm run build
License
MIT
Quick Start
Clone the repository
git clone https://github.com/indusbit/mcp-proxyInstall dependencies
cd mcp-proxy
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.