Skip to main content
Glama

MCP Server with SSE

by Fuglys

MCP Server with SSE

Een eenvoudige MCP (Model Context Protocol) server met Server-Sent Events (SSE) functionaliteit, geoptimaliseerd voor deployment op Render.com.

Features

  • 🚀 Express.js server - Lightweight en snel

  • 📡 Server-Sent Events (SSE) - Real-time data streaming

  • Timestamp broadcasting - Elke 5 seconden

  • 💓 Keep-alive pings - Elke 30 seconden

  • 🌐 CORS enabled - Cross-origin requests toegestaan

  • 🏥 Health checks - Voor Render.com monitoring

  • 📊 Status endpoints - Server informatie en statistieken

Endpoints

  • GET / - Server informatie en beschikbare endpoints

  • GET /health - Health check voor monitoring

  • GET /sse - Server-Sent Events stream

  • GET /mcp/status - Uitgebreide server status

Local Development

  1. Installeer dependencies:

    npm install
  2. Start de server:

    npm start # of voor development: npm run dev
  3. Test SSE verbinding: Open http://localhost:3000/sse in je browser of gebruik curl:

    curl -N http://localhost:3000/sse

Deployment op Render.com

Automatische Deployment

  1. Connect GitHub repository in Render dashboard

  2. Selecteer deze repository

  3. Render detecteert automatisch de render.yaml configuratie

  4. Deploy - Render gebruikt automatisch de configuratie

Handmatige Deployment

  1. Maak nieuwe Web Service in Render

  2. Configuratie:

    • Build Command: npm install

    • Start Command: npm start

    • Health Check Path: /health

    • Environment: Node.js

    • Plan: Free tier

SSE Data Format

De SSE stream stuurt JSON data in het volgende formaat:

Connection Event

{ "type": "connection", "message": "SSE connection established", "timestamp": "2024-01-01T12:00:00.000Z", "server": "MCP Server" }

Timestamp Event (elke 5 seconden)

{ "type": "timestamp", "timestamp": "2024-01-01T12:00:05.000Z", "uptime": 123.456, "memory": { "rss": 12345678, "heapTotal": 8765432, "heapUsed": 5432109, "external": 987654 } }

Keep-alive Ping (elke 30 seconden)

: keep-alive 1704110400000

Environment Variables

  • PORT - Server port (default: 3000, Render sets automatically)

  • NODE_ENV - Environment (production/development)

CORS Configuration

De server is geconfigureerd om alle origins toe te staan voor maximale compatibiliteit:

cors({ origin: '*', methods: ['GET', 'POST', 'OPTIONS'], allowedHeaders: ['Content-Type', 'Cache-Control', 'Accept'], credentials: false })

Error Handling

  • 500 errors - Gelogd en JSON response

  • 404 errors - Friendly message met beschikbare endpoints

  • SSE disconnects - Automatic cleanup van intervals

  • Graceful shutdown - SIGTERM/SIGINT handling

Monitoring

Health Check

curl https://your-app.onrender.com/health

Server Status

curl https://your-app.onrender.com/mcp/status

Dependencies

  • express - Web framework

  • cors - Cross-origin resource sharing

License

MIT License - Zie LICENSE bestand voor details.

Support

Voor vragen of issues, maak een GitHub issue aan in deze repository: https://github.com/Fuglys/mcp-server

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables real-time data streaming through Server-Sent Events with timestamp broadcasting and server monitoring capabilities. Optimized for deployment on Render.com with health checks and status endpoints.

  1. Features
    1. Endpoints
      1. Local Development
        1. Deployment op Render.com
          1. Automatische Deployment
          2. Handmatige Deployment
        2. SSE Data Format
          1. Connection Event
          2. Timestamp Event (elke 5 seconden)
          3. Keep-alive Ping (elke 30 seconden)
        3. Environment Variables
          1. CORS Configuration
            1. Error Handling
              1. Monitoring
                1. Health Check
                2. Server Status
              2. Dependencies
                1. License
                  1. Support

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fuglys/mcp-server'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server