Integrations
Supports deploying the remote MCP server on Cloudflare Workers, allowing for globally distributed MCP functionality with low latency
Planned integration with NestJS framework mentioned in the roadmap for enhanced server-side implementation options
Provides a standalone Node.js implementation option for hosting the remote MCP server
Remote-MCP:远程模型上下文协议
一种类型安全、双向且简单的 远程 MCP 通信解决方案,允许远程访问和集中管理模型上下文。
建筑学
我为什么现在做这个
是的,我知道官方的 MCP 路线图包含 2025 年第一季度的远程 MCP 支持。但是,我和其他许多人一样,迫切需要远程访问。这个库就是为了弥补这一差距而创建的,它提供了一种从本地 MCP 客户端立即连接到远程 MCP 服务器的方法,而无需等待未来的官方实现。
注意:我不希望这件事变得太复杂或太过复杂。这种方法目前就有效。
入门
注意:该项目目前处于积极开发阶段,且处于实验阶段。预计会发生重大变更并可能出现问题。
客户端使用情况
使用公开发布的包
只需将以下代码放入您的 MCP 客户端设置中,这里我以 Claude 为例:
编写您自己的本地 MCP 服务器
安装要求:
然后编写自己的代码,如下所示:
服务器使用情况(远程 MCP 实施)
您可以在examples
目录中看到一些示例。
编写您自己的远程 MCP 服务器
在npm install @remote-mcp/server
之后,你可以像下面这样建立自己的远程 MCP 服务器:
然后您可以在 MCP 客户端中看到以下内容:
套餐
该存储库包含:
@remote-mcp/client
:客户端库充当本地 MCP 服务器,连接到远程实现。@remote-mcp/server
:用于创建可远程访问的 MCP 服务(用作远程实现)的服务器库。
路线图
核心功能
- [x] 基本类型安全的客户端/服务器通信
- [x] 基本 MCP 命令支持
- [x] 基本 MCP 工具支持
- [x] 基本 MCP 提示支持
- [ ] 碰撞安全处理(WIP,优先)
- [ ] 完整的事件订阅系统
- [ ] 资源变更通知
- [ ] 工具/提示列表变更通知
- [ ] HTTP 标头支持
- [x] 自定义标题
- [ ] 身份验证中间件
- [ ] 基本错误处理改进
- [ ] 基本中间件支持
框架支持
- [ ] Nest.js 集成(
@remote-mcp/nestjs
)
高级功能
- [ ] 双向通信
- [ ] 服务器到客户端的请求
- [ ] 服务器/客户端之间的资源共享
- [ ] 基本监控和日志记录
贡献
欢迎贡献。详情请参阅CONTRIBUTING.md 。
免责声明
该库是一个补充扩展,不是官方 MCP 规范的一部分,它建立在现有的 MCP 概念之上。
执照
本项目遵循 MIT 许可证。详情请参阅LICENSE文件。
参考
This server cannot be installed
一种类型安全的解决方案,可实现对模型上下文协议 (MCP) 服务的远程访问,允许客户端连接到集中式 MCP 实现,而无需等待官方远程支持。
Related MCP Servers
- AsecurityAlicenseAqualityA beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.Last updated -3936JavaScriptApache 2.0
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server that provides a simple sleep/wait tool, useful for adding delays between operations such as waiting between API calls or testing eventually consistent systems.Last updated -167JavaScript
- -security-license-qualityA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.Last updated -1TypeScript
- -security-license-qualityA Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.Last updated -2