ws-mcp logo

ws-mcp

Free

用 WebSocket 包装 MCP 服务器 (用于 [kitbitz](https://github.com/nick1udwig/kibitz))。

FreeFree tier
Type
Open Source

About ws-mcp

ws-mcp is a lightweight open-source Python tool that wraps MCP (Model Context Protocol) stdio servers with a WebSocket interface, enabling remote access and integration with tools like kibitz. It allows users to run one or multiple MCP servers via command-line arguments or a JSON configuration file, with support for environment variables through .env files. The tool is distributed as a Python package and can be quickly installed and executed using uv. Default servers include wcgw for system operations and file management, and fetch for HTTP requests. ws-mcp is ideal for developers looking to expose MCP servers over WebSocket for network-based workflows.

Key Features

Wraps MCP stdio servers with a WebSocket interface
Designed for integration with kibitz
Supports running multiple servers via command-line arguments or JSON config file
Environment variable loading from command line or .env file
Quick setup using uv and uvx
Includes default servers: wcgw and fetch
Open source (Python, 100% Python on GitHub)
Cross-platform (runs anywhere Python and uv are available)

Pros & Cons

Pros
  • Open source and completely free to use
  • Simple setup with uvx — one command to run
  • Flexible configuration via command-line or JSON file
  • Supports environment variables for API keys and secrets
  • Lightweight and minimal dependencies
Cons
  • Requires uv (Python package manager) to be installed
  • Only wraps stdio-based MCP servers; does not support other transports directly
  • Documentation is limited to the GitHub README
  • No official releases or versioning on GitHub yet

Best For

Connecting MCP servers to kibitz for remote tool callingExposing stdio-based MCP servers over WebSocket for network accessRunning multiple MCP servers concurrently with a single commandDeveloping or testing MCP workflows in a WebSocket-based environment

FAQ

What are the prerequisites to run ws-mcp?
You need to have uv installed. Run `curl -LsSf https://astral.sh/uv/install.sh | sh` to install it.
How do I run ws-mcp with a custom configuration?
Use the --config flag with a path to your JSON config file, e.g., `uvx --refresh ws-mcp@latest --config path/to/config.json --port 10125`.
Can I run multiple MCP servers at once?
Yes, you can supply the --command flag multiple times or use a config file specifying multiple servers. Example: `uvx --refresh ws-mcp --command 'uvx mcp-server-fetch' --command 'npx -y @modelcontextprotocol/server-brave-search' --port 3004`.
How do I pass environment variables to MCP servers?
You can use --env KEY=VALUE directly or use --env-file path/to/.env to load from a file.