remote-mcp-baseline

hklee71/remote-mcp-baseline

3.1

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.

Tools
3
Resources
0
Prompts
0

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

  1. Clone the repository:
git clone <repository-url>
cd remote-mcp-server
  1. Install dependencies:
npm install
  1. Copy environment variables:
cp .env.example .env
  1. Run in development mode:
npm run dev

Docker Deployment

  1. 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
  1. Check server health:
curl http://localhost:3001/health
  1. 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

  1. Clone MCP Inspector:
git clone https://github.com/modelcontextprotocol/inspector
cd inspector
npm install
npm run dev
  1. Connect to server:
    • URL: http://localhost:3001
    • Test tools, prompts, and resources

Available Tools

  1. echo - Echoes back the provided message

    {
      "name": "echo",
      "arguments": {
        "message": "Hello, MCP!"
      }
    }
    
  2. ping - Health check that returns pong with timestamp

    {
      "name": "ping",
      "arguments": {}
    }
    
  3. get_time - Returns current server time in various formats

    {
      "name": "get_time",
      "arguments": {
        "format": "iso" // or "unix", "readable"
      }
    }
    

Deployment to Synology NAS

  1. Export Docker image:
docker save remote-mcp-server:latest > mcp-server.tar
  1. Import in Synology Container Manager:

    • Upload the .tar file
    • Create container with port 3001 mapped
    • Configure environment variables
  2. Set up Cloudflare tunnel to expose port 3001

Environment Variables

VariableDefaultDescription
PORT3001Server port
MCP_ENDPOINT/mcpMain MCP endpoint
ENABLE_LEGACY_TRANSPORTtrueEnable legacy HTTP+SSE support
LOG_LEVELinfoLogging level: info (basic), debug (detailed)
NODE_ENVdevelopmentEnvironment mode

Architecture

┌─────────────────┐     ┌──────────────────┐
│   Claude.ai     │────▶│  Cloudflare      │
│   MCP Client    │     │  Tunnel          │
└─────────────────┘     └──────────────────┘
                                │
                                ▼
                        ┌──────────────────┐
                        │  MCP Server      │
                        │  Port 3001       │
                        ├──────────────────┤
                        │ • Streamable HTTP│
                        │ • Legacy SSE     │
                        │ • Tools/Prompts  │
                        └──────────────────┘

License

MIT