Overview
What is ws-mcp?
ws-mcp wraps MCP stdio servers with a WebSocket connection, designed for use with kibitz. It allows you to expose one or more MCP servers over a WebSocket port.
How to use ws-mcp?
Install uv, then run uvx --refresh ws-mcp@latest with optional flags. Configure servers via a JSON config file (--config) or command-line arguments (--command). Set the port with --port (default 10125), and pass environment variables via --env or --env-file.
Key features of ws-mcp
- Wraps MCP stdio servers with WebSocket.
- Supports configuration via file or
--commandflags. - Run multiple MCP servers simultaneously.
- Pass environment variables inline or from a
.envfile. - Default port 10125, configurable with
--port.
Use cases of ws-mcp
- Run MCP servers locally for integration with kibitz.
- Expose a fetch server over WebSocket for HTTP requests.
- Expose wcgw for system operations and file management.
- Expose Brave search with an API key via WebSocket.
FAQ from ws-mcp
What prerequisites are needed?
Install uv, a Python project manager, via curl -LsSf https://astral.sh/uv/install.sh | sh.
How do I configure which MCP servers to run?
Use a JSON config file (--config path/to/config.json) or supply one or more --command flags.
Does ws-mcp support multiple servers at once?
Yes, you can provide multiple --command flags or use a config file listing several servers.
How do I pass environment variables to a server?
Use --env KEY=VALUE or --env-file path/to/.env to set variables for a server.
What is the default port?
The default port is 10125, but you can override it with the --port flag.