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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ws_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5f29a71f6b17ead01afd4d377e73a642d4fb0d9854f870309e0030be7044ec98
MD5 0d0287cd8fec2fb5e6bd832238166ee5
BLAKE2b-256 cd2d86fd897483c5c0f03fe8065f282989efd9afa3ca3e671c968d5fc19ae3e2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ws_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4c86e730eca809db596263cbe4ae06e2518ca6f1594da344a237fab48ae98a45
MD5 8ee8d3332e6d087f3d7fcdf441bffde4
BLAKE2b-256 b5bd3114cadeebf4dbac341b079ee07a456e3c506cc93caff9d70b6f4872d7e1

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