YM

yonaka15/mcp-server-runner

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

19 stars 8 forks 품질 58 트렌드 22MIT

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...

개요

: 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. - 🚧 : This software is in active development - ⚠️ : APIs and features may change without notice - 🧪 : Currently undergoing testing and refinement - 📝 : Documentation is being actively updated MCP Server Runner acts as a bridge between WebSocket clients and MCP server implementations.

README

원문 README의 일부입니다. 원문 보기.

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

Environment Variables

The application can be configured through environment variables:

PROGRAM=        # Path to the MCP server executable (required if no config file)
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)
CONFIG_FILE=    # Path to JSON configuration file

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

JSON Configuration

Alternatively, you can provide a JSON configuration file:

{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/workspace"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here"
      }
    }
  },
  "default_server": "filesystem",
  "host": "0.0.0.0",
  "port": 8080
}

You can specify the configuration file in two ways:

  1. As a command-line argument: mcp-server-runner config.json
  2. Using the CONFIG_FILE environment variable: CONFIG_FILE=config.json mcp-server-runner

The JSON configuration allows you to define multiple server configurations and select one as the default.

Configuration Priority

  1. Command-line specified config file
  2. CONFIG_FILE environment variable
  3. Environment variables (PROGRAM, ARGS, etc.)
  4. Default values

Usage

GitHub에서 전체 README 보기

설치

npx -y @modelcontextprotocol/server-filesystem /path/to/workspace
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →