gpartin/WaveGuardClient

🧮 Data Science Tools
0 Views
0 Installs

šŸ ā˜ļø šŸŽ 🪟 🐧 - Physics-based anomaly detection via MCP. Uses Klein-Gordon wave equations on GPU to detect anomalies with high precision (avg 0.90). 9 tools: scan, fingerprint, compare, token risk, wallet profiling, volume check, price manipulation detection.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "gpartin-waveguardclient": {
      "command": "npx",
      "args": [
        "-y",
        "gpartin-waveguardclient"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

PyPI v3.3.0 GPU-powered API MCP Smithery

WaveGuard Python SDK

Anomaly detection powered by wave physics. Not machine learning.
One API call. Fully stateless. Works on any data type.

Benchmarks • Quickstart • Use Cases • Examples • MCP / Claude • API Reference


What is WaveGuard?

WaveGuard is a general-purpose anomaly detection API. Send it any data — server metrics, financial transactions, log files, sensor readings, time series — and get back anomaly scores, confidence levels, and explanations of which features triggered the alert.

No training pipelines. No model management. No state. One API call.

Your data  →  WaveGuard API (GPU)  →  Anomaly scores + explanations

Under the hood, it uses GPU-accelerated wave physics instead of machine learning. You don't need to know or care about the physics — it's all server-side.

Modal dashboard vs API endpoints

If you look at Modal, you will see deployed functions (for example fastapi_app, gpu_scan, gpu_fingerprint). Those are compute/runtime units, not the HTTP route list.

To see all live API endpoints, use:

  • OpenAPI docs: https://gpartin--waveguard-api-fastapi-app.modal.run/docs
  • OpenAPI JSON: https://gpartin--waveguard-api-fastapi-app.modal.run/openapi.json
How does it actually work?

Your data is encoded onto a 64³ lattice and run through coupled wave equation simulations on GPU. Normal data produces stable wave patterns; anomalies produce divergent ones. A 52-dimensional statistical fingerprint is compared between training and test data. Everything is torn down after each call — nothing is stored.

The key advantage over ML: no training data requirements (2+ samples is enough), no model drift, no retraining, no hyperparameter tuning. Same API call works on structured data, text, numbers, and time series.

Benchmarks (v2.2)

WaveGuard v2.2 vs scikit-learn across 6 real-world scenarios (10 training + 10 test samples each).

TL;DR: WaveGuard v2.2 wins 4 of 6 scenarios and averages 0.76 F1 — competitive with sklearn methods while requiring zero ML expertise.

F1 Score (balanced precision-recall)

ScenarioWaveGuardIsolationForestLOFOneClassSVM
Server Metrics (IT Ops)0.870.710.870.62
Financial Fraud0.830.740.770.77
IoT Sensors (Industrial)0.870.690.690.65
Network Traffic (Security)0.820.610.770.61
Time-Series (Monitoring)0.460.770.800.67
Sparse Features (Logs)0.720.900.820.78
Average0.760.740.790.68

What's new in v2.2

Multi-resolution scoring tracks each feature's local lattice energy in addition to global fingerprint distance. This catches subtle per-feature anomalies (like 3 of 10 IoT sensors drifting) that v2.1's global averaging missed. IoT F1 improved from 0.30 → 0.87.

When to choose WaveGuard over sklearn

Choose WaveGuard when...Choose sklearn when...
False alarms are expensive (alert fatigue, SRE pages)You need to catch every possible anomaly
You have no ML expertise on the teamYou have data scientists who can tune models
You need a zero-config API callYou can manage model lifecycle (train/save/load)
Data schema changes frequentlyFeature engineering is stable
Your AI agent needs anomaly detection (MCP)Everything runs locally, no API calls
Reproduce these benchmarks
pip install WaveGuardClient scikit-learn
python benchmarks/benchmark_vs_sklearn.py

Results saved to benchmarks/benchmark_results.json. Benchmarks use deterministic random seeds for reproducibility.

Expanded benchmarks: WaveGuard ranks #1 in F1 score on all 12 public benchmark datasets. See the full comparison on HuggingFace.

Real-World Validation: Crypto Crash Detection

WaveGuard powers CryptoGuard, a crypto risk scanner. Backtested against 7 historical crashes (LUNA, FTX, Celsius, 3AC, UST, SOL/FTX, TITAN):

MethodRecallAvg Lead TimeFalse Positive Rate
WaveGuard100% (7/7)27.4 days6.1%
Z-score baseline100% (7/7)28.4 days29.9%
Rolling volatility86% (6/7)15.5 days4.0%

WaveGuard flagged FTT (FTX token) at CAUTION on October 16, 2022 — 23 days before the 94% crash — while z-score analysis showed nothing unusual.

5Ɨ fewer false alarms than statistical baselines with the same recall. Full results: CryptoGuard backtest.

Install

pip install WaveGuardClient

That's it. The only dependency is requests. All physics runs server-side on GPU.

Get your free API key on RapidAPI →

Quickstart

The same scan() call works on any data type. Here are three different industries — same API:

Detect a compromised server

from waveguard import WaveGuard

wg = WaveGuard(api_key="YOUR_KEY")

result = wg.scan(
    training=[
        {"cpu": 45, "memory": 62, "disk_io": 120, "errors": 0},
        {"cpu": 48, "memory": 63, "disk_io": 115, "errors": 0},
        {"cpu": 42, "memory": 61, "disk_io": 125, "errors": 1},
    ],
    test=[
        {"cpu": 46, "memory": 62, "disk_io": 119, "errors": 0},    # āœ… normal
        {"cpu": 99, "memory": 95, "disk_io": 800, "errors": 150},   # 🚨 anomaly
    ],
)

for r in result.results:
    print(f"{'🚨' if r.is_anomaly else 'āœ…'}  score={r.score:.1f}  confidence={r.confidence:.0%}")

Flag a fraudulent transaction

result = wg.scan(
    training=[
        {"amount": 74.50, "items": 3, "session_sec": 340, "returning": 1},
        {"amount": 52.00, "items": 2, "session_sec": 280, "returning": 1},
        {"amount": 89.99, "items": 4, "session_sec": 410, "returning": 0},
    ],
    test=[
        {"amount": 68.00, "items": 2, "session_sec": 300, "returning": 1},     # āœ… normal
        {"amount": 4200.00, "items": 25, "session_sec": 8, "returning": 0},     # 🚨 fraud
    ],
)

Catch a security event in logs

result = wg.scan(
    training=[
        "2026-02-24 10:15:03 INFO  Request processed in 45ms [200 OK]",
        "2026-02-24 10:15:04 INFO  Request processed in 52ms [200 OK]",
        "2026-02-24 10:15:05 INFO  Cache hit ratio=0.94 ttl=300s",
    ],
    test=[
        "2026-02-24 10:20:03 INFO  Request processed in 48ms [200 OK]",                  # āœ… normal
        "2026-02-24 10:20:04 CRIT  xmrig consuming 98% CPU, port 45678 open",             # 🚨 crypto miner
        "2026-02-24 10:20:05 WARN  GET /api/users?id=1;DROP TABLE users-- from 185.x.x",  # 🚨 SQL injection
    ],
    encoder_type="text",
)

Same client. Same scan() call. Any data.

Use Cases

WaveGuard works on any structured, numeric, or text data. If you can describe "normal," it can detect deviations.

IndustryWhat You ScanWhat It Catches
DevOpsServer metrics (CPU, memory, latency)Memory leaks, DDoS attacks, runaway processes
FintechTransactions (amount, velocity, location)Fraud, money laundering, account takeover
SecurityLog files, access eventsSQL injection, crypto miners, privilege escalation
IoT / ManufacturingSensor readings (temp, pressure, vibration)Equipment failure, calibration drift
E-commerceUser behavior (session time, cart, clicks)Bot traffic, bulk purchase fraud, scraping
HealthcareLab results, vitals, biomarkersAbnormal readings, data entry errors
Time SeriesMetric windows (latency, throughput)Spikes, flatlines, seasonal breaks

The API doesn't know your domain. It just knows what "normal" looks like (your training data) and flags anything that deviates. This makes it general — you bring the context, it brings the detection.

Supported Data Types

All auto-detected from data shape. No configuration needed:

TypeExampleUse When
JSON objects{"cpu": 45, "memory": 62}Structured records with named fields
Numeric arrays[1.0, 1.2, 5.8, 1.1]Feature vectors, embeddings
Text strings"ERROR segfault at 0x0"Logs, messages, free text
Time series[100, 102, 98, 105, 99]Metric windows, sequential readings

Examples

Every example is a runnable Python script that hits the live API:

#ExampleIndustryWhat It Shows
šŸ­IoT Predictive MaintenanceManufacturingDetect bearing failure, leaks, overloads from sensor data
šŸ”’Network Intrusion DetectionCybersecurityCatch port scans, C2 beacons, DDoS, data exfiltration
šŸ¤–MCP Agent DemoAI/AgentsClaude calls WaveGuard via MCP — zero ML knowledge
01QuickstartGeneralMinimal scan in 10 lines
02Server MonitoringDevOpsMemory leak + DDoS detection
03Log AnalysisSecuritySQL injection, crypto miner detection
04Time SeriesMonitoringLatency spikes, flatline detection
06Batch ScanningE-commerce20 transactions, fraud flagging
07Error HandlingProductionRetry logic, exponential backoff
pip install WaveGuardClient
python examples/iot_predictive_maintenance.py

MCP Server (Claude Desktop)

The first physics-based anomaly detector available as an MCP tool. Give any AI agent the ability to detect anomalies — zero ML knowledge required.

Quick setup

{
  "mcpServers": {
    "waveguard": {
      "command": "uvx",
      "args": ["--from", "WaveGuardClient", "waveguard-mcp"]
    }
  }
}

Then ask Claude: "Are any of these sensor readings anomalous?" — it calls waveguard_scan automatically.

Available MCP tools

ToolDescription
waveguard_scanDetect anomalies in any structured data
waveguard_scan_timeseriesAuto-window time-series and detect anomalous segments
waveguard_healthCheck API status and GPU availability

See the MCP Agent Demo for a working example, or the MCP Integration Guide for full setup.

Azure Migration

Azure Anomaly Detector retires October 2026. WaveGuard is a drop-in replacement:

# Before (Azure) — 3+ API calls, stateful, time-series only
client = AnomalyDetectorClient(endpoint, credential)
model = client.train_multivariate_model(request)   # minutes
result = client.detect_multivariate_batch_anomaly(model_id, data)
client.delete_multivariate_model(model_id)

# After (WaveGuard) — 1 API call, stateless, any data type
wg = WaveGuard(api_key="YOUR_KEY")
result = wg.scan(training=normal_data, test=new_data)  # seconds

See Azure Migration Guide for details.

API Reference

wg.scan(training, test, encoder_type=None, sensitivity=None)

ParameterTypeDescription
traininglist2+ examples of normal data
testlist1+ samples to check
encoder_typestrForce: "json", "numeric", "text", "timeseries" (default: auto)
sensitivityfloat0.5–3.0, lower = more sensitive (default: 1.0)

Returns ScanResult with .results (per-sample) and .summary (aggregate).

wg.health() / wg.tier()

Health check (no auth) and subscription tier info.

Advanced intelligence methods (v3.3.0)

  • wg.counterfactual(...)
  • wg.trajectory_scan(...)
  • wg.instability(...)
  • wg.phase_coherence(...)
  • wg.interaction_matrix(...)
  • wg.cascade_risk(...)
  • wg.mechanism_probe(...)
  • wg.action_surface(...)
  • wg.multi_horizon_outlook(...)

These map directly to /v1/* intelligence endpoints and return the raw JSON payload for maximal compatibility with rapidly evolving server-side response schemas.

Error Handling

from waveguard import WaveGuard, AuthenticationError, RateLimitError

try:
    result = wg.scan(training=data, test=new_data)
except AuthenticationError:
    print("Bad API key")
except RateLimitError:
    print("Too many requests — back off and retry")

Full API reference: docs/api-reference.md

Project Structure

WaveGuardClient/
ā”œā”€ā”€ waveguard/              # Python SDK package
│   ā”œā”€ā”€ __init__.py         # Public API exports
│   ā”œā”€ā”€ client.py           # WaveGuard client class
│   └── exceptions.py       # Exception hierarchy
ā”œā”€ā”€ mcp_server/             # MCP server for Claude Desktop
│   └── server.py           # stdio + HTTP transport
ā”œā”€ā”€ benchmarks/             # Reproducible benchmarks vs sklearn
│   ā”œā”€ā”€ benchmark_vs_sklearn.py
│   └── benchmark_results.json
ā”œā”€ā”€ examples/               # 9 runnable examples
ā”œā”€ā”€ docs/                   # Documentation
│   ā”œā”€ā”€ getting-started.md
│   ā”œā”€ā”€ api-reference.md
│   ā”œā”€ā”€ mcp-integration.md
│   └── azure-migration.md
ā”œā”€ā”€ tests/                  # Test suite
ā”œā”€ā”€ pyproject.toml          # Package config (pip install -e .)
└── CHANGELOG.md

Development

git clone https://github.com/gpartin/WaveGuardClient.git
cd WaveGuardClient
pip install -e ".[dev]"
pytest

Links

License

MIT — see LICENSE.

Related MCP Servers

98lukehall/renoun-mcp

šŸ ā˜ļø - Structural observability for AI conversations. Detects loops, stuck states, breakthroughs, and convergence across 17 channels without analyzing content.

🧮 Data Science Tools0 views
abhiphile/fermat-mcp

šŸ šŸ  šŸŽ 🪟 🐧 - The ultimate math engine unifying SymPy, NumPy & Matplotlib in one powerful server. Perfect for developers & researchers needing symbolic algebra, numerical computing, and data visualization.

🧮 Data Science Tools0 views
Archerkattri/mathlas

šŸ šŸ  - Airtight math for agents: 3.7M-theorem search, PSLQ constant ID, OEIS, real Lean kernel checks, applicability checklists. No LLM inside, no API key.

🧮 Data Science Tools0 views
arrismo/kaggle-mcp

šŸ ā˜ļø - Connects to Kaggle, ability to download and analyze datasets.

🧮 Data Science Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
ā˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.