Solution to Remote MCP Communication, enabling effortless integration for centralized management of Model…
Remote-MCP: Remote Model Context Protocol
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A **type-safe, bidirectional and simple** solution for **remote MCP communication**, allowing remote access and centralized management of model contexts.
Architecture
Why I Made This (Now)
Yes, I know that the official MCP roadmap includes remote MCP support in the first quarter of 2025. However, the need for remote access was *immediate* for me, and likely for many others. This library was created to bridge that gap, providing a way to connect to a remote MCP server from a local MCP client *right now*, without waiting for future official implementations.
Note: I don't want this to be a sophisticated or overcomplicated thing. This way **just works right now**.
Getting Started
> *Note: This project is currently under active development and is considered experimental. Expect breaking changes and potential issues.*
Client Usage
Use Publicly Published Package
Just put the following code in your MCP client settings, in here I'm using Claude as an example:
Code Your Own Local MCP Server
Install requirements:
then write your own code like the following:
Server Usage (Remote MCP Implementation)
You can see some examples in the examples directory.
- Cloudflare Workers
- Standalone Node.js
Code Your Own Remote MCP Server
After npm install @remote-mcp/server, you can your own remote MCP server like the following:
Then you can see like the following in your MCP client:
Packages
This repository contains:
* @remote-mcp/client: Client library acting as a local MCP server, connecting to a remote implementation.
* @remote-mcp/server: Server library for creating remotely accessible MCP services (used as the remote implementation).
Roadmap
Core Features
- [x] Basic *Type-safe* Client/Server Communication
- [x] Basic MCP Command Support
- [x] Basic MCP Tool Support
- [x] Basic MCP Prompt Support
- [ ] Crash-Safe Handling (WIP, top priority)
- [ ] Complete Event Subscription System
- [ ] Resource change notifications
- [ ] Tool/Prompt list change notifications
- [ ] HTTP Header Support
- [x] Custom Headers
- [ ] Authentication Middleware
- [ ] Basic error handling improvements
- [ ] Basic middleware support
Framework Support
- [ ] Nest.js Integration (@remote-mcp/nestjs)
Advanced Features
- [ ] Bidirectional communication