Combines a standard server with WebSocket functionality to enable real-time data updates and efficient asynchronous oper...
Created byApr 23, 2025
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
Clone this repository:
Install dependencies:
Usage
Start the Server
Run the following command to start both the MCP and WebSocket servers:
Connecting via WebSockets
Clients can connect to the WebSocket server (ws://localhost:8765) and subscribe to updates by sending:
Sending MCP Requests
MCP clients can send requests to the MCP server at http://localhost:8080 with a payload like:
The server will respond with:
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.
This server implements an MCP (Model Context Protocol) server with WebSocket enhancements for real-time data updates.
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
Clone this repository:
Install dependencies:
Usage
Start the Server
Run the following command to start both the MCP and WebSocket servers:
Connecting via WebSockets
Clients can connect to the WebSocket server (ws://localhost:8765) and subscribe to updates by sending:
Sending MCP Requests
MCP clients can send requests to the MCP server at http://localhost:8080 with a payload like:
The server will respond with:
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.