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
- 01Standard MCP requests on port 8080
- 02WebSocket subscriptions on port 8765
- 03Push notifications to subscribed clients
- 04Asynchronous design built on asyncio
Use cases
- 01MCP clients that need live data updates
- 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.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP 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
asynciofor efficient non-blocking operations.
Installation
- Clone this repository:
git clone https://github.com/your-repo/mcp-websocket-server.git cd mcp-websocket-server - 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
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.