LeoPulse Studio MCP
README.md
<div align="center">
# š¦ LeoPulse Studio MCP
**Next-Generation High-Throughput Desktop Load Testing & Real-User Traffic Simulation Platform powered by the Model Context Protocol (MCP)**
[](https://www.electronjs.org/)
[](https://react.dev/)
[](https://www.typescriptlang.org/)
[](https://vitejs.dev/)
[](https://tailwindcss.com/)
[](https://modelcontextprotocol.io/)
[](https://opensource.org/licenses/MIT)
<p align="center">
An open-source, high-performance desktop platform engineered for software architects, DevOps engineers, and autonomous AI agents to simulate massive real-user web traffic, evaluate server breaking points, and conduct executive capacity audits.
</p>
[Architecture](#-system-architecture) ⢠[Key Features](#-comprehensive-feature-deep-dive) ⢠[Model Context Protocol](#-model-context-protocol-mcp--alexa-integration) ⢠[Quick Start](#-quick-start--cli-reference) ⢠[Safety Notice](#-ethical-use--safety-disclaimer)
</div>
---
## šļø System Architecture
LeoPulse Studio enforces an isolated multi-process architecture that decouples user interface rendering from high-concurrency network operations. Real load generation executes inside a dedicated Node.js Worker Thread utilizing `undici.Pool` with zero-storage stream draining to count and discard payload bytes at wire speed without memory bloat.
In parallel, an official **Model Context Protocol (MCP)** server runs over standard I/O (stdio) to allow **Amazon Alexa+** skills, Claude Desktop, and autonomous AI agents to orchestrate load testing workflows hands-free.
```
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā RENDERER PROCESS (Chromium) ā
ā React 18 ⢠TypeScript ⢠Tailwind CSS Bento Grid ⢠Dual-Axis Recharts ā
ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā ā
ā ā New Campaign Setup ā ā Live Dashboard & Logs ā ā Executive Audit ā ā
ā ā (Raycast Hero + Preset) ā ā (80px Telemetry Strip) ā ā (EN / AR BiDi) ā ā
ā āāāāāāāāāāāāāāā¬āāāāāāāāāāāāāā āāāāāāāāāāāāāā¬āāāāāāāāāāāāāā āāāāāāāāāā¬āāāāāāāāā ā
ā ā ā ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā ā
ā āāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāā ā
ā ā Floating Alexa+ Copilot Drawer ā ā
ā ā (Ctrl+K Slide-Over / MCP Card) ā ā
ā āāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
typed IPC via contextBridge
(src/main/preload.ts: secure bridge)
ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MAIN PROCESS (Node.js) ā
ā BrowserWindow Manager ⢠Zero-Bloat Window Framing ⢠Worker Thread Host ā
āāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāā
ā parentPort.postMessage() ā child_process / stdio
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāā
ā ENGINE WORKER THREAD (Node.js) ā ā MODEL CONTEXT PROTOCOL (MCP) ā
ā (src/main/engine/engine.worker.ts) ā ā (src/mcp/server.ts) ā
ā ā ā ā
ā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāā ā ā Official @modelcontextprotocol/sdk ā
ā ā Undici Pool & ā ā Multi-Tier Smart ā ā ā StdioServerTransport (JSON-RPC) ā
ā ā ProxyAgent āāāāŗā Circuit Breaker ā ā ā ā
ā āāāāāāāāāā¬āāāāāāāāāā āāāāāāāāāāā¬āāāāāāāāāā ā ā [start_load_test] ā
ā ā ā ā ā [get_live_telemetry] ā
ā ā¼ ā¼ ā ā [stop_load_test] ā
ā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāā ā ā [get_executive_audit] ā
ā ā Null-Sink Zero- ā ā Reservoir Sampler ā ā ā ā
ā ā Stream Draining ā ā P50/P95/P99 Tails ā ā ā āāā Amazon Alexa+ & AI Agents ā
ā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāā ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāā
ā HTTP/1.1 Egress (0ms Gap)
ā¼
Target Web Application / API Gateway
```
---
## ā” Comprehensive Feature Deep-Dive
### 1. š High-Throughput Multi-Path Engine
- **Closed-Loop Concurrency**: Virtual users continuously fire requests in tight zero-gap loops. As soon as a response finishes draining, the virtual user triggers the next request, driving target servers to authentic peak throughput.
- **Step-Up Ramp-Up Scheduling**: Incremental ramp-up mode introduces virtual users in controlled stages (e.g., +20 VUs every 10 seconds), pinpointing the exact inflection threshold where latency begins degrading.
- **Internal Link Crawler**: Discovers and distributes requests across up to 50 internal same-origin URLs to simulate realistic user browsing paths rather than flooding a single static endpoint.
- **2026 User-Agent Pool**: Dynamically rotates randomized, realistic desktop (70%) and mobile (30%) user-agent signatures.
### 2. š§ Zero-Storage Stream Draining (0 Byte Memory Bloat)
- Standard HTTP clients store response chunks in memory buffers, leading to memory exhaustion and Garbage Collector (GC) latency spikes when handling gigabytes of response data.
- LeoPulse Studio pipes all incoming HTTP response streams into custom Node.js `Writable` null sinks. Chunks increment cumulative byte counters and are immediately freed from RAM, preserving flat <80 MB host memory usage even across millions of completed requests.
### 3. š”ļø Multi-Tier Smart Circuit Breaker
Automated real-time safety watchdog protecting infrastructure from cascading outages:
- **Tier 1 (Critical Origin Outage)**: Trips if connection refusal (`ECONNREFUSED`), origin downtime (Cloudflare `521`/`523`), or DNS/SSL failures exceed 80% over 5 seconds.
- **Tier 2 (Stress Collapse)**: Trips if 5xx server errors (`500`, `502`, `503`, `504`) or socket timeouts exceed 50% over 10 seconds. Records and logs the exact **Breaking Point Capacity** (in VUs and RPS).
- **Tier 3 (Rate-Limit / WAF)**: Detects Cloudflare, AWS WAF, or gateway throttling (`429`, `403` exceeding 60% over 10s) and ceases probing.
- **Safe Route Errors**: Client-side 404/400 errors are logged for diagnostic inspection but never trip the safety circuit breaker.
### 4. š Official Model Context Protocol (MCP) Server
- Self-hosted stdio server runtime implementing the open Model Context Protocol standard (`@modelcontextprotocol/sdk`).
- Exposes 4 fully-typed, Zod-validated tools for **Amazon Alexa+** skills and autonomous AI orchestrators:
- `start_load_test`: Starts closed-loop or ramp-up load tests with target URL, concurrency, duration, and proxy parameters.
- `get_live_telemetry`: Fetches real-time snapshots including RPS throughput, active VUs, P50/P95/P99 latencies, and data transfer.
- `stop_load_test`: Gracefully halts active campaigns and destroys connection pools.
- `get_executive_audit`: Queries capacity status verdicts, SLA compliance, and remediation guidance in English or Arabic.
### 5. ⨠Integrated Alexa+ Copilot Drawer
- Slide-over floating assistant drawer anchored to the bottom right (`Ctrl+K` or floating FAB trigger).
- Formulates and executes natural language commands (e.g., *"Run 50-VU Load Test on https://example.com for 60s"*, *"What is our live telemetry?"*, *"Generate executive audit"*).
- Visual MCP Tool Invocation Cards display tool names, structured JSON input parameters, and engine return payloads in real time.
### 6. š Enterprise Bento Hairline UI
- Modern developer tool standard inspired by Linear, Raycast, and Datadog.
- Strict 1px hairline borders (`border-zinc-200 dark:border-zinc-800`), refined corner radius (`rounded-md` / `rounded-lg`), and high-density numeric readouts with monospace tabular figures (`font-mono tabular-nums`).
- Fully verified **WCAG AAA** contrast across both Light Mode and Dark Mode.
- Native Electron framing: eliminated Windows legacy menu bar bloat (`autoHideMenuBar: true`, `Menu.setApplicationMenu(null)`).
### 7. š Bilingual Executive Audits & Corporate PDF Export
- Generates publication-ready executive capacity audits evaluating throughput resilience against a 200ms SLA target.
- **Dual-Engine PDF Export**:
- **English Mode**: High-resolution vector tables generated via `jspdf-autotable` with embedded Recharts telemetry graphs.
- **Arabic Mode**: Authentic right-to-left (BiDi) typography powered by high-DPI canvas capturing (`html2canvas`) and native `Tajawal`/`Cairo` font ligatures, eliminating character disconnection or text reversal.
- Instant CSV export for downstream analysis in Grafana, Excel, or Datadog.
---
## š Model Context Protocol (MCP) & Alexa+ Integration
LeoPulse Studio turns local capacity testing into an autonomous service that any MCP-compatible AI agent or voice assistant can execute.
### š ļø Exposed MCP Tools
| Tool Name | Parameters | Description |
|:---|:---|:---|
| `start_load_test` | `targetUrl` (string, req), `concurrency` (10-1000), `durationSec` (number), `mode` (`closed-loop` / `ramp-up`), `crawlInternal` (boolean), `proxy` (optional) | Programmatically launches a load test campaign with zero-storage stream draining and armed multi-tier circuit breaker. |
| `get_live_telemetry` | *None* | Fetches a real-time telemetry snapshot (current RPS throughput, active VUs, P50/P95/P99 latency, success rate, and data transfer). |
| `stop_load_test` | *None* | Gracefully terminates active load test campaigns and destroys underlying connection pools. |
| `get_executive_audit` | `language` (`en` / `ar`, default `en`) | Retrieves the executive capacity verdict (Resilient / Degraded / Critical), SLA compliance analysis, and actionable engineering recommendations in English or Arabic. |
### šļø Alexa+ Voice Interaction Example
> **DevOps Engineer**: *"Alexa, tell LeoPulse Studio to run a closed-loop stress test on our checkout API with 200 virtual users."*
> **Alexa+ (via MCP)**: *"Load test started against https://api.store.internal with 200 concurrent virtual users. Zero-storage stream draining and multi-tier circuit breakers are armed."*
>
> **DevOps Engineer**: *"Alexa, ask LeoPulse Studio for the executive capacity audit in Arabic."*
> **Alexa+ (via MCP)**: *"Ų§ŁŁŲŖŁŲ¬Ų© Ų§ŁŲŖŁŁŁŲ°ŁŲ©: Ų§ŁŲ®Ų§ŲÆŁ
Ł
Ų³ŲŖŁŲ± ŁŲ¹Ų§ŁŁ Ų§ŁŁ
Ų±ŁŁŲ© ŲØŁŲ³ŲØŲ© ŁŲ¬Ų§Ų 99.4% ŁŲŖŲ£Ų®ŁŲ± P95 ŁŲØŁŲŗ 42 Ł
ŁŁŁ Ų«Ų§ŁŁŲ©. Ł
Ų¹Ų§ŁŁŲ± Ų§ŲŖŁŲ§ŁŁŲ© Ł
Ų³ŲŖŁŁ Ų§ŁŲ®ŲÆŁ
Ų© Ł
Ų³ŲŖŁŁŲ§Ų© ŲØŲ§ŁŁŲ§Ł
Ł."*
---
## š Quick Start & CLI Reference
### š Prerequisites
- **Node.js**: `v18.0.0` or higher (Node.js 20+ LTS recommended)
- **npm**: `v9.0.0` or higher
- **OS**: Windows 10/11, macOS 12+, or modern Linux distributions
### š¦ Installation
```bash
# Clone the repository
git clone https://github.com/leopulse-studio/leopulse-studio.git
cd leopulse-studio
# Install dependencies
npm install
```
### š» Running the Application
```bash
# 1. Run in development mode (with Vite HMR + Electron)
npm run dev
# 2. Run the headless Model Context Protocol (MCP) server for Alexa+ & AI Agents
npm run mcp
# 3. Type-check TypeScript codebase (0 compiler errors)
npm run typecheck
# 4. Compile production bundles (Main, Renderer, Preload, Engine Worker)
npm run build
# 5. Launch the compiled desktop application
npm start
```
---
## š Project Directory Structure
```
leopulse-studio/
āāā .gitignore # Git ignore rules for build artifacts & logs
āāā LICENSE # MIT License terms
āāā README.md # Comprehensive project documentation
āāā DEVPOST_SUBMISSION.md # Official Devpost submission deliverables
āāā package.json # Dependencies, scripts, and build metadata
āāā tsconfig.json # TypeScript config (Renderer & MCP)
āāā tsconfig.main.json # TypeScript config (Main process & Engine Worker)
āāā vite.config.ts # Vite bundler configuration
āāā tailwind.config.js # Tailwind CSS tokens (Bento hairline styling)
āāā postcss.config.js # PostCSS configuration
āāā build/ # Production application icons (.ico, .png)
āāā src/
ā āāā main/
ā ā āāā index.ts # Electron Main process lifecycle & IPC bridges
ā ā āāā preload.ts # Secure contextBridge API definition
ā ā āāā engine/
ā ā āāā engine.worker.ts # Core worker thread: Undici pool, stream draining
ā ā āāā circuitBreaker.ts # Multi-tier automated circuit breaker logic
ā ā āāā metricsAggregator.ts# Rolling window RPS & reservoir quantile sampling
ā ā āāā crawler.ts # Internal link crawler for authentic multi-page load
ā āāā mcp/
ā ā āāā server.ts # Model Context Protocol (MCP) server for Alexa+ & AI Agents
ā āāā shared/
ā ā āāā types.ts # Shared TypeScript interfaces (IPC, Metrics, Config)
ā ā āāā errorCatalog.ts # Comprehensive HTTP & transport error definitions
ā ā āāā i18n.ts # Bilingual translation dictionary (English & Arabic)
ā ā āāā userAgents.ts # Realistic 2026 desktop and mobile User-Agent pool
ā āāā renderer/
ā āāā index.html # HTML entry point with web fonts & theme bootstrap
ā āāā main.tsx # React DOM bootstrap
ā āāā App.tsx # App routing & provider wrapping
ā āāā hooks/
ā ā āāā useTheme.ts # Dark / Light theme manager with localStorage sync
ā ā āāā useI18n.ts # Active language and BiDi direction manager
ā ā āāā useEngineMetrics.ts# Real-time IPC telemetry subscriber hook
ā āāā components/
ā ā āāā copilot/
ā ā ā āāā FloatingCopilotDrawer.tsx # Floating Alexa+ Copilot (MCP) slide-over
ā ā āāā layout/ # Sidebar, Header, and AppLayout shell
ā ā āāā error/ # ErrorHoverCard interactive tooltips
ā ā āāā ui/ # Tailwind merge and utility primitives
ā āāā pages/
ā āāā NewCampaign.tsx # Raycast hero bar, 65% config grid, 35% receipt sheet
ā āāā LiveDashboard.tsx # 80px metric strip, dual Y-axis chart, log workstation
ā āāā Reports.tsx # Executive audit reports and PDF export engine
ā āāā LegalDisclaimer.tsx# Authorized use notice & compliance terms
```
---
## š Security & Isolation Standard
LeoPulse Studio is built upon strict security constraints:
| Security Property | Value | Rationale |
|:---|:---|:---|
| `contextIsolation` | `true` | Prevents renderer scripts from accessing Electron/Node internals. |
| `nodeIntegration` | `false` | Disables Node.js runtime primitives inside the Chromium DOM window. |
| `sandbox` | `false` | Permits typed `preload.ts` context bridge without permission restrictions. |
| `webSecurity` | `true` | Enforces standard browser security policies and origin isolation. |
| Navigation Guard | `Denied` | Intercepts `window.open` and routes external links to system browser. |
| Zero Telemetry | `100% Local` | Operates completely offline with zero data collection or tracking. |
---
## āļø Ethical Use & Safety Disclaimer
> [!IMPORTANT]
> **LeoPulse Studio is intended exclusively for authorized capacity planning, performance benchmarking, and reliability testing on servers, applications, and networks that you own, operate, or have explicit written authorization to test.**
- **Strictly Authorized Testing**: Running load tests, denial of service (DoS/DDoS) tests, or stressing third-party infrastructures without explicit consent is illegal under international cybercrime legislation, including the **Computer Fraud and Abuse Act (CFAA)** in the United States, the **Computer Misuse Act** in the United Kingdom, the **EU NIS2 Directive**, and equivalent global statutes.
- **Automatic Watchdog Protection**: The load engine includes a hardware-level and network-level multi-tier circuit breaker designed to halt traffic immediately if origin instability or rate-limiting thresholds are reached.
- **Privacy Assurance**: LeoPulse Studio does not collect, record, or transmit test targets, credentials, or benchmarking telemetry to any external service. All computations and connection pools execute locally on your device.
---
## š License
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
Copyright (c) 2026 **LeoPulse Studio Contributors**.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues