websocat-mcp

websocat-mcp

MCP server for WebSocket operations, enabling connect, send, receive, and manage WebSocket connections and servers.

Category
Visit Server

README

websocat-mcp

An MCP (Model Context Protocol) server for WebSocket operations, providing tools to connect, send, receive, and manage WebSocket connections.

Installation

From GitHub

git clone https://github.com/shivam-jainn/websocat-mcp.git
cd websocat-mcp
bun install
bun run build

From npm (when published)

npm install -g websocat-mcp

Or locally:

npm install websocat-mcp

Build

bun run build

Usage

This MCP server provides the following tools:

websocket_connect

Connect to a WebSocket server.

Parameters:

  • url (required): WebSocket URL (e.g., ws://localhost:8080 or wss://example.com)
  • connectionId (optional): Unique identifier for this connection (auto-generated if not provided)

Example:

{
  "url": "ws://localhost:8080",
  "connectionId": "my-connection"
}

websocket_send

Send a message through a WebSocket connection.

Parameters:

  • connectionId (required): Connection ID to send the message through
  • message (required): Message to send

Example:

{
  "connectionId": "my-connection",
  "message": "Hello, WebSocket!"
}

websocket_receive

Receive messages from a WebSocket connection (waits for messages).

Parameters:

  • connectionId (required): Connection ID to receive messages from
  • timeout (optional): Timeout in milliseconds (default: 5000)
  • maxMessages (optional): Maximum number of messages to receive (default: 1)

Example:

{
  "connectionId": "my-connection",
  "timeout": 10000,
  "maxMessages": 5
}

websocket_close

Close a WebSocket connection.

Parameters:

  • connectionId (required): Connection ID to close
  • code (optional): Close code (default: 1000)
  • reason (optional): Close reason

Example:

{
  "connectionId": "my-connection",
  "code": 1000,
  "reason": "Done"
}

websocket_list

List all active WebSocket connections.

Parameters: None

websocket_create_server

Create a WebSocket server.

Parameters:

  • port (optional): Port to listen on (default: 8080)
  • hostname (optional): Hostname to bind to (default: localhost)

Example:

{
  "port": 8080,
  "hostname": "localhost"
}

MCP Configuration

To use this MCP server with Cursor or other MCP clients, add it to your MCP configuration:

Local Installation

{
  "mcpServers": {
    "websocat-mcp": {
      "command": "bun",
      "args": ["/path/to/websocat-mcp/build/index.js"]
    }
  }
}

Global Installation (npm)

{
  "mcpServers": {
    "websocat-mcp": {
      "command": "websocat-mcp"
    }
  }
}

Using bunx (no installation needed)

{
  "mcpServers": {
    "websocat-mcp": {
      "command": "bunx",
      "args": ["--bun", "websocat-mcp"]
    }
  }
}

Features

  • ✅ Connect to WebSocket servers
  • ✅ Send messages through WebSocket connections
  • ✅ Receive messages with timeout support
  • ✅ Close connections gracefully
  • ✅ List all active connections
  • ✅ Create WebSocket servers
  • ✅ Connection state management
  • ✅ Error handling

Development

This project uses:

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured