Cover image
Try Now
2024-12-11

Espejo de https: //github.com/yonaka15/mcp-server-runner

3 years

Works with Finder

0

Github Watches

1

Github Forks

0

Github Stars

MCP Server Runner

Note: This project is currently under active development and in WIP (Work In Progress) status. Features and APIs may change significantly.

A WebSocket server implementation for running Model Context Protocol (MCP) servers. This application enables MCP servers to be accessed via WebSocket connections, facilitating integration with web applications and other network-enabled clients.

Development Status

  • 🚧 Work In Progress: This software is in active development
  • ⚠️ API Stability: APIs and features may change without notice
  • 🧪 Testing: Currently undergoing testing and refinement
  • 📝 Documentation: Documentation is being actively updated

Overview

MCP Server Runner acts as a bridge between WebSocket clients and MCP server implementations. It:

  • Launches an MCP server process
  • Manages WebSocket connections
  • Handles bidirectional communication between clients and the MCP server
  • Supports graceful shutdown and error handling

Features

  • WebSocket server implementation with single-client support
  • Process management for MCP server instances
  • Bidirectional message passing between client and server
  • Graceful shutdown handling
  • Comprehensive error logging
  • Cross-platform support (Unix/Windows)

Prerequisites

  • Rust 1.70 or higher
  • An MCP server implementation executable

Configuration

The application is configured through environment variables:

PROGRAM=        # Path to the MCP server executable (required)
ARGS=           # Comma-separated list of arguments for the MCP server
HOST=0.0.0.0    # Host address to bind to (default: 0.0.0.0)
PORT=8080       # Port to listen on (default: 8080)

Additional environment variables will be passed through to the MCP server process.

Usage

  1. Set up the environment variables:

    export PROGRAM=npx
    export ARGS=-y,@modelcontextprotocol/server-github
    export PORT=8080
    export GITHUB_PERSONAL_ACCESS_TOKEN=github_pat_***
    
  2. Run the server:

    cargo run
    
  3. Connect to the WebSocket server:

    const ws = new WebSocket("ws://localhost:8080");
    

Docker Support

A Dockerfile and docker-compose.yml are provided for containerized deployment:

docker-compose up --build

Development

Build the project:

cargo build

Run tests:

cargo test

Run with debug logging:

RUST_LOG=debug cargo run

Architecture

The application follows a modular architecture:

  • main.rs: Application entry point and server setup
  • process/: Process management and I/O handling
  • websocket/: WebSocket connection management
  • state.rs: Global state management
  • shutdown.rs: Graceful shutdown handling

Error Handling

  • Standard error output from the MCP server is logged but not forwarded to clients
  • WebSocket connection errors are handled gracefully
  • Process errors are logged with detailed information

Limitations

  • Supports only one client connection at a time
  • Does not support WebSocket SSL/TLS (use a reverse proxy for secure connections)
  • No built-in authentication mechanism

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Additional Resources

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://duotify.com
  • Professional code reviewer for a unique language, friendly and helpful.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

    Reviews

    1 (1)
    Avatar
    user_ojzGwdl7
    2025-04-16

    I have been using MCP_Servers by DannyyLC for a while now and it has significantly improved my server management experience. The seamless integration and user-friendly interface make it a top choice for anyone looking for reliable and efficient server solutions. Highly recommend checking it out at https://mcp.so/server/MCP_Servers/DannyyLC!