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.6.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.6-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ws_mcp-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 77c7dcee65d26f26420dcf58dd2b39d7a42a70824540cca8777783e34dc406ec
MD5 c937b21808a35ab3790c4d571cff2138
BLAKE2b-256 e9b5b25c3569a142acd8a64cddfeee4b5eaf8ce3069d8d561afa63a27941afba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ws_mcp-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 daac420672fecca15bd9991911750d3d82e1e5d26cbe6e454715da858bfa5bf9
MD5 b903a133bdad8cf9ca5e61b9e8a3f1a2
BLAKE2b-256 6841267c084def979e6c469770071973fe71068f69dad1b76b8752c13e5b8905

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