Skip to main content

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:

  • wcgw: For general system operations and file management
  • fetch: For making HTTP requests

To make a configuration file:

  1. Create your configuration file:
    cp sample.config.json config.json
    
  2. Modify config.json to add or remove servers based on your needs.
  3. Run with --config path/to/config.json to use the new config file.

Running ws-mcp

Basic usage with default config file (no --config or --command provided):

uvx --refresh ws-mcp@latest --port 3001

This will start all configured servers on the specified port.

To use a config file:

uvx --refresh ws-mcp@latest --config path/to/config --port 3001

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ws_mcp-0.1.8.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ws_mcp-0.1.8-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file ws_mcp-0.1.8.tar.gz.

File metadata

  • Download URL: ws_mcp-0.1.8.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.13

File hashes

Hashes for ws_mcp-0.1.8.tar.gz
Algorithm Hash digest
SHA256 a1410fadae84e28345d074995d87dccdeb73c14d273f1939300ab5543e593f47
MD5 383c26eb04fad902a6e0a6c4f00a8377
BLAKE2b-256 224f0be816fbeb909f4ebad4eba3435c0a0da7eae017e8597245d094169b8cc3

See more details on using hashes here.

File details

Details for the file ws_mcp-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: ws_mcp-0.1.8-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

Hashes for ws_mcp-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cbff16c00c9683b81d74c0b82bd1ad38fed1cae110219a0bb20095c9ce2547ac
MD5 43cf29a7eb31f6b08bd3de8d043e636a
BLAKE2b-256 dc835ef561c6449f05efc1571bbed3bcb969b4e5d0a3daab65d91d225da9f848

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page