QuantGuard MCP
QuantGuard MCP is a Model Context Protocol server for institutional trading desks to continuously monitor market microstructure and assess trading safety via multiple specialist agents, generating deterministic risk decisions explained in natural language.
README
QuantGuard MCP
QuantGuard MCP is a Model Context Protocol (MCP) server built on the NitroStack framework (TypeScript, NestJS-style dependency injection, @Tool / @Resource / @Prompt decorators, Zod validation, and React visual widgets).
It is designed for institutional trading desks to continuously monitor market microstructure and assess trading safety across multiple specialist agents, generating deterministic risk decisions explained in natural language.
📐 Low-Level Design Document (LLD) →
Complete architecture diagrams, database ERD, agent orchestration flow, tool/resource API contracts, prompt templates, and UI widget specifications.
🚀 Key Features
- Continuous Microstructure Monitoring: Feeds on orderbook depth and price streams (with live Binance WebSocket integrations for crypto).
- Deterministic Risk & Execution Rules:
- Toxicity (VPIN): Calculates signed-volume imbalances over volume buckets.
- Spoofing Detection: Heuristics to detect large resting orders that cancel quickly to manipulate price direction.
- Liquidity Profile: Estimates slippage under square-root market-impact models.
- Institutional Risk Engine: Computes Value at Risk (VaR 95%), Expected Shortfall (CVaR), exposure limits, and leverage thresholds.
- Keyword Sentiment Lexicon: Evaluates breaking headlines and macroeconomic calendars without LLM latency.
- Multi-Agent Orchestration: Coordinate reports across 7 specialist agents:
- Toxicity Agent, Spoofing Agent, Liquidity Agent, Volatility Agent, Risk Agent, News Agent, and Strategy Agent.
- Polished Interactive Widgets: Sleek dark-mode React dashboards loaded natively in NitroStudio.
🛠️ Installation & Setup
-
Clone & Install Dependencies:
npm install -
Configure Environment Variables: Create a
.envfile in the root directory:# Server Config NODE_ENV=development PORT=3000 # Demo Mode Toggle DEMO_MODE=true # Optional LLM keys (will use high-quality local templates if omitted) GEMINI_API_KEY=your_gemini_api_key_here OPENAI_API_KEY=your_openai_api_key_here -
Build the Server & Widgets:
npm run build
🏁 Live Demo Simulation
QuantGuard comes with a built-in terminal dashboard simulator. It launches the MCP server in DEMO_MODE=true, subscribes to a live Binance feed, and schedules a synthetic spoofing attack timeline to demonstrate the server's protection logic:
- 0s - 120s: Normal market conditions. Recommended Strategy:
VWAPorMARKET. - 120s - 180s: Spoofing wall injected. Recommended Strategy: switches instantly to
WAIT. - 180s+: Spoofing wall cancelled. Recommended Strategy: recovers back to
VWAP.
To launch the interactive demo:
node demo.js
🔌 Connecting to Client / NitroStudio
- STDIO Connection: Add to your MCP client config (e.g., Claude Desktop):
{ "mcpServers": { "quantguard": { "command": "node", "args": ["C:/Users/Siddharth/.gemini/antigravity/scratch/quantguard-mcp/dist/index.js"], "env": { "DEMO_MODE": "true" } } } } - Streamable HTTP Endpoint: Connect via
http://localhost:3000/mcp - Visual Studio: Launch NitroStudio locally and point it to the project directory to inspect the
quantguard-dashboardwidget.
☁️ Cloud Deployment (NitroCloud)
Deploy your MCP server to NitroCloud using the official NitroStack CLI utility:
npx nitrostack-cli deploy --cloud
This bundles production assets, optimizes SQLite migrations, registers tool metadata, and deploys it to a serverless edge endpoint.
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.