MCP Server Runner logo

MCP Server Runner

by MCP-Mirror

A WebSocket server implementation for running Model Context Protocol (MCP) servers, enabling access via WebSocket connections. It facilitates integration with web applications and other network-enabled clients.

View on GitHub

Last updated: N/A

What is MCP Server Runner?

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, and supports graceful shutdown and error handling.

How to use MCP Server Runner?

  1. Set up environment variables (PROGRAM, ARGS, HOST, PORT). 2. Run the server using cargo run. 3. Connect to the WebSocket server using a WebSocket client (e.g., new WebSocket("ws://localhost:8080")). Docker support is also available using docker-compose up --build.

Key features of MCP Server Runner

  • 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)

Use cases of MCP Server Runner

  • Integrating MCP servers with web applications

  • Enabling network-enabled clients to interact with MCP servers

  • Creating real-time communication channels with MCP servers

  • Facilitating remote access and control of MCP servers

FAQ from MCP Server Runner

Does it support multiple client connections?

No, it currently supports only one client connection at a time.

Does it support WebSocket SSL/TLS?

No, it does not support WebSocket SSL/TLS. Use a reverse proxy for secure connections.

Is there a built-in authentication mechanism?

No, there is no built-in authentication mechanism.

What are the prerequisites for running the server?

Rust 1.70 or higher and an MCP server implementation executable are required.

How do I configure the server?

The application is configured through environment variables such as PROGRAM, ARGS, HOST, and PORT.