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.

Prerequisites

Usage

# Example using fetch
uvx ws-mcp --command "uvx mcp-server-fetch" --port 3002

# Example using wcgw
## On macOS
uvx 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 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 ws-mcp --env BRAVE_API_KEY=$BRAVE_API_KEY --command "npx -y @modelcontextprotocol/server-brave-search" --port 3003

# Or, with a .env file:
uvx 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 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 ws-mcp --env-file path/to/.env --config path/to/config.json --port 3005

Example MCP configuration file

{
  "mcpServers": {
    "wcgw": {
      "command": "uvx",
      "args": [
        "wcgw@latest",
        "--python",
        "3.12",
        "wcgw_mcp"
      ]
    },
    "fetch": {
      "command": "uvx",
      "args": [
        "mcp-server-fetch"
      ]
    },
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ]
    }
  }
}

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.7.tar.gz (14.9 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.7-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ws_mcp-0.1.7.tar.gz
Algorithm Hash digest
SHA256 708b64952acc6bf0701f1838ecd8d6a81ae2bb4c2e6580da612b4ff9bfb8b3fe
MD5 a9615bb003a250a7dc35fdfdaddb3cb0
BLAKE2b-256 a5f05eab9a7a4909b936c145d2e62ab462d3f9fea3ec06109a8a63dc0d4d5170

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ws_mcp-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.13

File hashes

Hashes for ws_mcp-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 07a09f39cd964f3d3b44ba63a1c3c06f87e72056804cf137b193657caa1c5b6c
MD5 bd0e993b4b181aa115afcad600b2498f
BLAKE2b-256 82ddd9732095fac573d67dc84c10217f646379d8f14a458e49858b0d9126875f

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