Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-websocket

MCP.Pizza Chef: virajsharma2000

The mcp-websocket server implements the Model Context Protocol with WebSocket enhancements, enabling real-time data updates and push notifications. It supports standard MCP requests on port 8080 and WebSocket subscriptions on port 8765, allowing clients to receive asynchronous updates efficiently using an asyncio-based architecture.

Use This MCP server To

Enable real-time data updates via WebSocket subscriptions Push notifications to subscribed MCP clients on data changes Serve standard MCP requests alongside WebSocket connections Build interactive AI applications with live context updates Integrate asynchronous data streams into MCP workflows Support multi-client real-time collaboration with MCP context Reduce polling overhead by using push-based data delivery

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 [virajsharma@sharmaviraj.com].

mcp-websocket

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

mcp-websocket FAQ

How do I start the mcp-websocket server?
Clone the repository, install dependencies, and run the server script to start MCP and WebSocket services.
What ports does the mcp-websocket server use?
It uses port 8080 for standard MCP requests and port 8765 for WebSocket connections.
Can clients subscribe to real-time updates?
Yes, clients can subscribe via WebSocket to receive push notifications when new data is available.
What programming language and framework does the server use?
The server is implemented in Python using asyncio for asynchronous, non-blocking operations.
Is the mcp-websocket server compatible with multiple LLM providers?
Yes, it supports MCP protocol which is provider-agnostic, compatible with OpenAI, Claude, Gemini, and others.
How does the server handle multiple clients?
It uses an asynchronous architecture to efficiently manage multiple concurrent WebSocket connections.
Can I extend the server to support custom MCP data sources?
Yes, the server architecture allows integration of additional data sources and custom MCP handlers.
Does the server support secure WebSocket connections?
The current implementation focuses on basic WebSocket support; secure WebSocket (wss) can be added with additional configuration.