Realtime Sales Dashboard
Streams simulated sales data via WebSocket and renders live KPIs, state rankings, sparkline charts, and an activity feed within an MCP App iframe.
README
Realtime Sales Dashboard — MCP Apps + WebSocket
A live, auto-refreshing sales dashboard built as an MCP (Model Context Protocol) server with an embedded rich UI. The dashboard streams simulated sales data for Indian states via WebSocket, rendering KPI cards, state-level rankings, sparkline charts, and a live activity feed — all inside an MCP App iframe.
Key Features
- Live KPI Cards — Revenue, Orders, Conversion Rate, AOV, and New Customers with delta indicators and sparkline micro-charts
- State Rankings Chart — Horizontal bar chart (Chart.js) ranking all states by the selected metric, with toggleable state chips
- Activity Feed — Real-time stream of simulated order, conversion, and customer events across Indian cities
- WebSocket Push — Sub-2-second data refresh via a Python WebSocket server
Article
Read the full article for more details on the project -
How I Added WebSocket-Powered Realtime Streaming to MCP Apps
Demo
<img width="800" height="557" alt="realtime-dashboard" src="https://github.com/user-attachments/assets/af098aee-bf4e-4fd0-ac92-fdefd3bf1d4f" />
Prerequisites
- Node.js ≥ 18
- Python ≥ 3.10
- npm (comes with Node.js)
Quick Start
1. Install dependencies
# Node.js dependencies
npm install
# Python dependencies
pip install -r requirements.txt
2. Start the WebSocket server
python ws_server.py
You should see:
🚀 WebSocket server starting on ws://localhost:8765
📡 Dashboard clients connect to: ws://localhost:8765
⏱️ Push interval: 1.8s
✅ Server listening on ws://localhost:8765
3. Start the MCP server
In a separate terminal:
# Development (with hot-reload via tsx)
npm run dev
# — or — Production
npm run build
npm start
You should see:
🚀 MCP Apps Realtime Sales Dashboard server running at http://localhost:3000
📡 MCP endpoint: http://localhost:3000/mcp
License
This project is licensed under the Apache License 2.0.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.