Wrap MCP servers with a WebSocket.
Project description
ws-mcp
Wrap MCP stdio servers with a WebSocket. For use with kibitz.
Quickstart
Prerequisites
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Configuration
The config file specifies which MCP servers to run.
The default config (no --config or --command args provided) includes:
To make a configuration file:
- Create your configuration file:
cp sample.config.json config.json
- Modify
config.jsonto add or remove servers based on your needs. - Run with
--config path/to/config.jsonto use the new config file.
Running ws-mcp
Basic usage with default config file (no --config or --command provided) and port:
uvx --refresh ws-mcp@latest
This will start all configured servers on the default port (10125).
To use a config file and port:
uvx --refresh ws-mcp@latest --config path/to/config --port 10125
Detailed Usage
# Example using fetch
uvx --refresh ws-mcp --command "uvx mcp-server-fetch" --port 3002
# Example using wcgw
## On macOS
uvx --refresh ws-mcp --command "uvx --from wcgw@latest --python 3.12 wcgw_mcp" --port 3001
## On Linux (or if you have issues on macOS with wcgw)
cd /tmp
git clone https://github.com/nick1udwig/wcgw.git
cd wcgw
git submodule update --init --recursive
git checkout hf/fix-wcgw-on-ubuntu
cd ..
uvx --refresh ws-mcp --command "uvx --from /tmp/wcgw --with /tmp/wcgw/src/mcp_wcgw --python 3.12 wcgw_mcp" --port 3001
# Example using Brave search
export BRAVE_API_KEY=YOUR_API_KEY_HERE
uvx --refresh ws-mcp --env BRAVE_API_KEY=$BRAVE_API_KEY --command "npx -y @modelcontextprotocol/server-brave-search" --port 3003
# Or, with a .env file:
uvx --refresh ws-mcp --env-file path/to/.env --command "npx -y @modelcontextprotocol/server-brave-search" --port 3003
# `--command` can be supplied multiple times!
# Example serving multiple servers at once:
uvx --refresh ws-mcp --env-file path/to/.env --command "npx -y @modelcontextprotocol/server-brave-search" --command "uvx mcp-server-fetch" --port 3004
# Servers can also be specified in a `.json` file following [the standard MCP format](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server)
uvx --refresh ws-mcp --env-file path/to/.env --config path/to/config.json --port 3005
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ws_mcp-0.1.9.tar.gz.
File metadata
- Download URL: ws_mcp-0.1.9.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c1c88731e59b4c473aed1da65828fe186725515c361b35cc342322b02a41047
|
|
| MD5 |
8cdcf2cbb21d5ae7b480802e5c29f176
|
|
| BLAKE2b-256 |
188f5c939ebe60efa98188a68ec534ca695986fddb1ac48c60a35b7e1d870542
|
File details
Details for the file ws_mcp-0.1.9-py3-none-any.whl.
File metadata
- Download URL: ws_mcp-0.1.9-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9b8a80b18e69a2dfaf3ad3e6eccdc0d24dbcddefa0e4f61aeed70d6f62a6a0a
|
|
| MD5 |
83d104a3dc00d46d0337fd7201d9d0e5
|
|
| BLAKE2b-256 |
fe6b15b388f4abf9eb81801d10c21dc4cb91ca9c3f2d66ab2307a6813e655e43
|