这是增强的自述文件,其中包含基于代码库的更多技术细节:
mcp-远程服务器
可配置的模型上下文协议 (MCP) 服务器,可从远程配置动态加载其功能。它利用ModelContextProtocol创建一个可与本地 MCP 客户端通信的本地服务器。
概述
mcp-remote-server
充当 MCP 客户端和远程 API 之间的桥梁。它解析远程托管配置(通过MCP_CONTROL_PLANE_URL
指定),该配置包含一系列工具、资源和提示符,每个都指向远程 API 端点。
主要特点
- 动态配置:服务器功能通过远程 JSON 配置定义
- 自动刷新:配置每 60 秒自动刷新一次
- 支持所有 MCP 原语:
- 工具:通过远程 API 调用执行操作
- 资源:将远程数据公开为可读资源
- 提示:定义可重复使用的提示模板
配置格式
处理程序 API 要求
远程处理程序必须返回适当格式的响应:
- 工具处理程序:返回将被字符串化并包装在 MCP 工具响应中的 JSON
- 资源处理程序:返回与指定 mimeType 匹配的内容
- 提示处理程序:返回字符串(自动包装在消息中)或 MCP 格式的消息数组
安装
用法
- 设置您的控制平面 URL:
- 运行服务器:
限制
- 仅支持 HTTP/HTTPS 处理程序端点
- 必须可以通过 HTTP GET 请求访问配置
- 处理程序响应必须兼容 JSON
- 仅在本地运行(标准 MCP 限制)
该项目是在 bun v1.1.32 版本中使用bun init
创建的。Bun 是一个快速的一体化 JavaScript 运行时。我选择Bun是因为它速度快,而且我想尝试一些与众不同的东西。
这个项目也使用Biome进行类型检查和 linting。我选择 Biome 的原因和 Bun 一样。我想要一些不同的东西,并且希望 JS 能有一个类似gofmt
的工具。这是一个很好的开始。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
可配置的 MCP 服务器,可从远程配置动态加载功能,以将 MCP 客户端与远程 API 连接起来,从而执行操作、访问资源和利用提示模板。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server to run commands.Last updated -2933160TypeScriptMIT License
- AsecurityAlicenseAqualityA tool that dynamically generates and configures MCP servers by automatically creating necessary directories and files according to user specifications.Last updated -199JavaScriptMIT License
- -securityFlicense-qualityAn MCP server that connects to the Resource Hub, allowing centralized configuration and management of tools and resources across different MCP environments.Last updated -2JavaScript
- AsecurityAlicenseAqualityA dynamic service that creates and manages Model Context Protocol (MCP) servers, allowing users to spawn, customize, and control multiple MCP servers as child processes.Last updated -565TypeScriptMIT License