Cover image
Try Now
2025-01-16

使用远程配置的声明性,可组合的模型上下文协议服务器

3 years

Works with Finder

1

Github Watches

1

Github Forks

5

Github Stars

Here's an enhanced README with more technical details based on the codebase:

mcp-remote-server

A configurable Model Context Protocol (MCP) server that dynamically loads its capabilities from a remote configuration. This leverages the ModelContextProtocol to create a local server that can communicate with your local MCP client.

Overview

mcp-remote-server acts as a bridge between MCP clients and remote APIs. It parses a remote hosted configuration (specified via MCP_CONTROL_PLANE_URL) that contains a list of tools, resources, and prompts, each pointing to remote API endpoints.

Key Features

  • Dynamic Configuration: Server capabilities are defined through a remote JSON configuration
  • Auto-Refresh: Configuration is automatically refreshed every 60 seconds
  • Supports All MCP Primitives:
    • Tools: Execute actions through remote API calls
    • Resources: Expose remote data as readable resources
    • Prompts: Define reusable prompt templates

Configuration Format

{
  "tools": [{
    "name": "tool-name",
    "description": "Tool description",
    "inputSchema": {
      "type": "object",
      "properties": {
        // JSON Schema for tool inputs
      }
    },
    "handler": "https://api.example.com/tool-endpoint"
  }],
  "resources": [{
    "uri": "resource://identifier",
    "name": "Resource Name",
    "description": "Resource description",
    "mimeType": "application/json",
    "handler": "https://api.example.com/resource-endpoint"
  }],
  "prompts": [{
    "name": "prompt-name",
    "description": "Prompt description",
    "arguments": [{
      "name": "arg-name",
      "description": "Argument description",
      "required": true
    }],
    "handler": "https://api.example.com/prompt-endpoint"
  }]
}

Handler API Requirements

Remote handlers must return appropriately formatted responses:

  • Tool Handlers: Return JSON that will be stringified and wrapped in an MCP tool response
  • Resource Handlers: Return content that matches the specified mimeType
  • Prompt Handlers: Return either a string (automatically wrapped in a message) or an array of MCP-formatted messages

Installation

bun install

Usage

  1. Set your control plane URL:
export MCP_CONTROL_PLANE_URL="https://your-config-endpoint"
  1. Run the server:
bun run index.ts

Limitations

  • Only supports HTTP/HTTPS handler endpoints
  • Configuration must be accessible via HTTP GET request
  • Handler responses must be JSON-compatible
  • Runs locally only (standard MCP limitation)

This project was created using bun init in bun v1.1.32. Bun is a fast all-in-one JavaScript runtime. I chose Bun because it's fast and I wanted to try something a little different.

This project also uses Biome for type checking and linting. I chose Biome for the same reason as Bun. I wanted something different and I wish JS had a gofmt-like tool. This is a good start.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

    Reviews

    1 (1)
    Avatar
    user_eUkh6Twv
    2025-04-16

    I've been using mcp-remote-server by sirmews, and it's been a game-changer for managing remote servers efficiently. The setup is straightforward, and the functionalities are robust, making server operations seamless. Highly recommend it! Check it out at: https://github.com/sirmews/mcp-remote-server