mcpField
M
MCP WebSocket Server

MCP WebSocket Server

Local
github.com/virajsharma2000Developer Tools31Updated 83w ago

About MCP WebSocket Server

MCP WebSocket Server is an MCP server extended with WebSocket support for real-time data updates. Clients can send standard MCP requests and also subscribe over WebSocket to receive push notifications. It is built on asyncio, and the README describes its functionality in limited detail.

Key features

  1. 01Standard MCP requests on port 8080
  2. 02WebSocket subscriptions on port 8765
  3. 03Push notifications to subscribed clients
  4. 04Asynchronous design built on asyncio

Use cases

  1. 01MCP clients that need live data updates
  2. 02Adding subscription-based push alongside MCP requests

MCP support

The server accepts standard MCP requests on port 8080, and provides subscription and push delivery to clients through a separate WebSocket port.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP WebSocket Server

This project implements an MCP (Model Context Protocol) server with WebSocket enhancements for real-time data updates. It allows clients to make standard MCP requests while also enabling WebSocket-based subscriptions to receive push notifications when new data becomes available.

Features

  • MCP Server (Port 8080): Handles standard MCP requests from clients.
  • WebSocket Server (Port 8765): Allows clients to subscribe for real-time updates.
  • Push Notifications: Sends updates to all subscribed clients when new data is available.
  • Async Architecture: Uses asyncio for efficient non-blocking operations.

Installation

  1. Clone this repository:
    git clone https://github.com/your-repo/mcp-websocket-server.git
    cd mcp-websocket-server
    
  2. Install dependencies:
    pip install websockets mcp-sdk  # Replace with actual MCP SDK package name
    

Usage

Start the Server

Run the following command to start both the MCP and WebSocket servers:

python server.py
Connecting via WebSockets

Clients can connect to the WebSocket server (ws://localhost:8765) and subscribe to updates by sending:

{"action": "subscribe"}
Sending MCP Requests

MCP clients can send requests to the MCP server at http://localhost:8080 with a payload like:

{"method": "get_data"}

The server will respond with:

{"result": "Here is your data!"}

License

This project is licensed under the MIT License.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.

Contact

For questions or suggestions, reach out via [[email protected]].

mcp-websocket

This server implements an MCP (Model Context Protocol) server with WebSocket enhancements for real-time data updates.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.