Sponsored by Deepsite.site

mcp-proxy-server

Created By
pyleeai6 months ago
Content

mcp-proxy-server

A proxy server for Model Context Protocol (MCP) that allows connections to multiple backend MCP servers.

Getting Started

Installation

Globally

Install the package globally:

npm install -g @pyleeai/mcp-proxy-server

As a library

Install it in your project:

npm install @pyleeai/mcp-proxy-server

Usage

If installed globally:

mcp-proxy-server

Configuration

The MCP Proxy Server can be configured using environment variables.

CONFIGURATION_URL="http://example.com/configuration"
LOG_PATH=./logs/mcp-proxy-server.log

Environment Variables

  • The CONFIGURATION_URL is required.
  • The LOG_PATH is optional.

Configuration JSON

The CONFIGURATION_URL points to JSON that contains the configuration for the proxy server. It should have the following structure:

{
    "mcp": {
        "servers": {
            "fetch": {
                "args": [
                    "mcp-server-fetch"
                ],
                "command": "uvx"
            },
            "filesystem": {
                "args": [
                    "-y",
                    "@modelcontextprotocol/server-filesystem",
                    "."
                ],
                "command": "npx"
            }
        }
    }
}

Contributing

Contributions are welcome! Here's how you can contribute to the project:

Prerequisites

  • Bun v1.2.2 or later

Setup

  1. Clone the repository:
git clone https://github.com/your-username/mcp-proxy-server.git
cd mcp-proxy-server
  1. Install dependencies:
bun install

Usage

Running the Server

Start the server:

bun start

Scripts

The project includes several npm scripts to help with development:

  • bun lint - Lints the codebase using Biome
  • bun format - Formats the codebase using Biome
  • bun check - Runs both lint and format checks
  • bun typecheck - Checks TypeScript types without emitting output
  • bun test - Runs all tests
  • bun start - Starts the development server
  • bun build - Builds the project
  • bun inspector - Runs the MCP inspector tool

Code Style

This project uses Biome for code formatting and linting. Please ensure your code follows these standards by running:

bun check

Testing

The project uses Bun's built-in test runner for comprehensive testing.

Running Tests

# Run all tests
bun test

# Run tests with watch mode (auto-rerun on file changes)
bun test --watch

# Run tests with coverage reporting
bun test --coverage

Test Structure

The test suite is organized in the test directory with the following subdirectories:

  • test/unit - Unit tests for individual components
  • test/integration - Integration tests for combined components

Publishing

To publish the package to npm using Bun:

  1. Update the version in package.json:
bun run npm version [patch|minor|major]
  1. Build the package:
bun run build
  1. Publish to npm:
bun publish

Note that publishing requires appropriate npm credentials and access rights.

Release Process

This project uses GoReleaser for creating and publishing releases.

GoReleaser Configuration

The release process is defined in .goreleaser.yaml and includes:

  • Building for multiple platforms (Linux, macOS, Windows)
  • Support for both x64 and arm64 architectures
  • Creating distributable archives
  • Generating changelogs
  • Creating GitHub releases

Creating a Release

  1. Tag a new version:
git tag -a v1.0.0 -m "Release v1.0.0"
  1. Push the tag:
git push origin v1.0.0
  1. The CI/CD pipeline will automatically:
    • Build for all target platforms
    • Create archives for distribution
    • Generate changelogs
    • Publish the release on GitHub
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
Tavily Mcp
Amap Maps高德地图官方 MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
ChatWiseThe second fastest AI chatbot™
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors