hklee71/remote-mcp-baseline
If you are the rightful owner of remote-mcp-baseline and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Remote MCP Server is a versatile implementation of the Model Context Protocol, designed to support both modern and legacy transport methods for seamless integration with MCP-compatible clients.
Remote MCP Server
A Model Context Protocol (MCP) server implementation supporting both modern Streamable HTTP and legacy HTTP+SSE transports, designed for integration with Claude.ai and other MCP-compatible clients.
Features
- ✅ MCP Protocol Revision 2025-03-26 compliant
- ✅ Streamable HTTP transport (primary)
- ✅ Legacy HTTP+SSE transport (backward compatibility)
- ✅ Basic tools: echo, ping, get_time
- ✅ Docker containerization
- ✅ Health check endpoint
- ✅ CORS support for browser clients
Prerequisites
- Node.js 20+ (for local development)
- Docker and Docker Compose (for containerized deployment)
- npm or yarn
Quick Start
Local Development
- Clone the repository:
git clone <repository-url>
cd remote-mcp-server
- Install dependencies:
npm install
- Copy environment variables:
cp .env.example .env
- Run in development mode:
npm run dev
Docker Deployment
- Build and run with Docker Compose:
# Basic logging (info level)
docker-compose up -d
# Detailed logging (debug level)
LOG_LEVEL=debug docker-compose up -d
- Check server health:
curl http://localhost:3001/health
- View logs:
# View logs
docker-compose logs mcp-server
# Follow logs in real-time
docker-compose logs -f mcp-server
API Endpoints
- POST /mcp - Modern Streamable HTTP endpoint
- GET /mcp - Legacy SSE connection endpoint
- POST /messages - Legacy HTTP request endpoint
- GET /health - Health check endpoint
Testing with MCP Inspector
- Clone MCP Inspector:
git clone https://github.com/modelcontextprotocol/inspector
cd inspector
npm install
npm run dev
- Connect to server:
- URL:
http://localhost:3001 - Test tools, prompts, and resources
- URL:
Available Tools
-
echo - Echoes back the provided message
{ "name": "echo", "arguments": { "message": "Hello, MCP!" } } -
ping - Health check that returns pong with timestamp
{ "name": "ping", "arguments": {} } -
get_time - Returns current server time in various formats
{ "name": "get_time", "arguments": { "format": "iso" // or "unix", "readable" } }
Deployment to Synology NAS
- Export Docker image:
docker save remote-mcp-server:latest > mcp-server.tar
-
Import in Synology Container Manager:
- Upload the .tar file
- Create container with port 3001 mapped
- Configure environment variables
-
Set up Cloudflare tunnel to expose port 3001
Environment Variables
| Variable | Default | Description |
|---|---|---|
| PORT | 3001 | Server port |
| MCP_ENDPOINT | /mcp | Main MCP endpoint |
| ENABLE_LEGACY_TRANSPORT | true | Enable legacy HTTP+SSE support |
| LOG_LEVEL | info | Logging level: info (basic), debug (detailed) |
| NODE_ENV | development | Environment mode |
Architecture
┌─────────────────┐ ┌──────────────────┐
│ Claude.ai │────▶│ Cloudflare │
│ MCP Client │ │ Tunnel │
└─────────────────┘ └──────────────────┘
│
▼
┌──────────────────┐
│ MCP Server │
│ Port 3001 │
├──────────────────┤
│ • Streamable HTTP│
│ • Legacy SSE │
│ • Tools/Prompts │
└──────────────────┘
License
MIT