zpl-engine-mcp
ZPL Engine MCP Server
Model Context Protocol (MCP) server for the Zero Point Logic Engine — a post-binary stability and neutrality analysis system.
Connects any MCP-compatible AI client (Claude Desktop, Claude Code, Cursor, Windsurf, etc.) to the ZPL Engine API for real-time bias detection, stability scoring, and neutrality analysis across multiple domains.
68 tools (64 unique + 4 backwards-compat aliases) across 11 categories: Core, Finance, Gaming, AI/ML, Security, Crypto, Certification, Advanced, Universal, Meta, and AI Eval.
What's new in v4.0.0 (MAJOR RELEASE)
Two months of incremental work consolidated. 21 bugs fixed, 146 tests (98 unit + 48 live MCP integration), Windows + Linux verified. Backwards compatible — legacy zpl_u_<48hex> keys still work, all 68 tools keep the same input shape.
New commands
npx zpl-engine-mcp setup— now memory-aware. Detects existing config and offers keep / re-setup / patch-only instead of forcing a fresh login.--forcebypasses.npx zpl-engine-mcp whoami— shows which account this install is logged into.npx zpl-engine-mcp repair— wipes local config + removes the entry from each MCP client config (Claude Desktop, Cursor, Windsurf). Preserves unrelated entries.--yesskips confirmation.npx zpl-engine-mcp --help/--version— POSIX-standard usage and version flags.zpl_diagnoseMCP tool — full health report (config + key + engine + auth) for issue reports.
Critical fixes
API key regex now accepts wizard-issued keys with type prefixes (
zpl_u_mcp_,zpl_u_cli_,zpl_u_default_). Pre-4.0 the wizard install always failed silently.Cloudflare HTML responses explained — actionable error messages with cf-ray ID instead of generic 403.
Smoke test at end of setup — catches replication lag between wizard approval and engine acceptance.
Secret sanitizer in history — no longer leaks wizard-prefixed ZPL keys or full Anthropic
sk-ant-*tokens (regex was truncating at first hyphen).Safety bounds on numeric env vars —
ZPL_RATE_LIMITclamped to [1, 600],ZPL_MAX_RETRIESto [0, 5].
Tool fixes
zpl_simulate0/0 result on positive inputs (switched to distributionBias + identical-input short-circuit).zpl_liquiditytable/verdict misalignment (verdict now cites per-pool counts).zpl_quotaplan auto-detection from config.toml (env > config > "free").zpl_quota+zpl_alerttoken estimate accuracy — 22 tools now persist realtokens_usedinstead of hardcoded heuristic.zpl_teachsnippet referenced never-published@zeropointlogic/engine-mcppackage name.Duplicate Claude Desktop entries auto-deduplicated on
setup.LANGUAGEdead-code env var removed.
See CHANGELOG for the complete list with rationales.
Related MCP server: aipaygen-mcp
What's new in v3.7.0
Setup wizard auto-configures Cursor and Windsurf, not just Claude Desktop. Each run patches
claude_desktop_config.json,~/.cursor/mcp.json, and~/.codeium/windsurf/mcp_config.jsonin a single pass. Clients that aren't installed are skipped silently; each patch is isolated so one missing client never blocks the others. Empty pre-existing config files (common for Cursor's stub{"mcpServers":{}}) are now handled correctly.
What's new in v3.6.1
Free plan quota corrected — all docs/copy now show 5,000 tokens/month (was erroneously "500 tokens / ~14 days" in early migration draft). Engine-side was already 5,000; this release just syncs the MCP. See CHANGELOG.
What's new in v3.6.0
npx zpl-engine-mcp setup— one-command device-flow wizard: opens browser, authenticates with your ZPL account, creates a per-machine API key, and auto-patchesclaude_desktop_config.json. No more copy-paste.User-key only —
ZPL_SERVICE_KEYfallback removed. MCP requires azpl_u_...user key so plan limits apply per account.
What's new in v3.4.3
Local dev fix — with
ZPL_ENGINE_ALLOW_INSECURE_LOCAL=1,localhost/127.0.0.1/::1are accepted as engine hostnames (not only production). Use withhttp://127.0.0.1:PORTfor a local engine.Version from
package.json— MCPversionfield, update check, and report footers no longer hardcode semver strings.npm test— regression tests for engine URL validation (npm run build && node --test test/engine-url.test.mjs).
What's new in v3.4.2
Engine URL hardening — default allowlist is
engine.zeropointlogic.ioonly. Self-hosted engines: setZPL_ENGINE_HOST_ALLOWLIST=your.hostname. Local HTTP:ZPL_ENGINE_ALLOW_INSECURE_LOCAL=1withhttp://127.0.0.1only. OptionalZPL_ENGINE_DISABLE_URL_GUARD=1disables hostname checks (not recommended). All enginefetchcalls useredirect: "error"so redirects cannot carry your Bearer token to a new origin.
What's new in v3.4.1
v3.4.1 — Bug fixes: fixed
zpl_consistency_testbias inversion (inconsistent responses now correctly lower AIN), session-budget double-counting on Claude eval tools (upfront reservation instead of post-increment),zpl_alertbudget calc that silently always said "OK" (now uses the same estimate aszpl_quota),zpl_validate_inputstack overflow on very large arrays (reduce loop instead ofMath.min(...values)), version-check cache ignoring its own 24h window (fixed filename instead of PID-suffixed), stale version strings inzpl_account/zpl_reportoutput. Store now honoursZPL_STORE_PATH(documented) in addition to legacyZPL_STORE_DIR. CSV export now escapes embedded commas/quotes. API key format is validated client-side (fail-fast on obvious mis-paste, prevents accidentally leaking unrelated secrets in the Authorization header). Removed an internal engine-method reference fromzpl_check_responseoutput. Corezpl_sweepandzpl_analyzenow honour the per-minute rate limiter.v3.4.0 — 8 new AI Eval tools (
zpl_consistency_test,zpl_sycophancy_score,zpl_refusal_balance,zpl_language_equity,zpl_persona_drift,zpl_safety_boundary,zpl_hallucination_consistency,zpl_emotional_stability) that run prompts through Claude and score response distributions with the ZPL engine. Requires a separateANTHROPIC_API_KEYenv var. Session budget cap of 100 Claude calls per process to prevent accidental spend. Multilingual propaganda-detection update forzpl_news_bias/zpl_review_bias: EN + RO + FR + DE + ES + IT keyword lists with a symmetric uniformity penalty (100% positive-only OR 100% negative-only texts trigger the same bonus).v3.3.0 — Added 4 clearer "balance"-prefixed aliases:
zpl_balance_check(=zpl_decide),zpl_balance_compare(=zpl_versus),zpl_balance_pair(=zpl_compare),zpl_balance_rank(=zpl_rank). Both old and new names work; old names get a DEPRECATED note in their description. Existing users keep working without changes.v3.2.0 — 4 new tools:
zpl_about(project info, no auth),zpl_quota(remaining tokens),zpl_score_only(minimal JSON for CI/CD),zpl_validate_input(free validation). Auto-update check, friendlier signup message, hard disclaimers on hypothetical/bias tools, RNG sample-size warnings, and bias tools re-framed as "language balance" instead of "fake/biased".v3.1.0 — Added
ZPL_MODEenv var (pure|coach). Pure mode hides AIN scores from the AI on text-evaluation tools (zpl_check_response,zpl_news_bias,zpl_review_bias) to prevent reactivity bias / observer effect.v3.0.0 (BREAKING) — Removed 5 tools that created false-authority risk:
zpl_ask,zpl_certify,zpl_certificate,zpl_predict,zpl_auto_certify. AIN is a STABILITY measurement only — never a prediction or recommendation.
Setup (free, 15 seconds)
Run this in your terminal — it authenticates you, creates an API key, and writes your Claude Desktop config for you:
npx zpl-engine-mcp@latest setupThe wizard will:
Open your browser to approve the CLI (sign up if you don't have an account — free, 5,000 tokens/month, no credit card)
Save the key to
~/.zpl/config.toml(chmod 600)Patch the MCP config of every supported client that's installed:
Claude Desktop —
claude_desktop_config.jsonCursor —
~/.cursor/mcp.jsonWindsurf —
~/.codeium/windsurf/mcp_config.json
Print which clients were configured and which to restart.
That's it. Clients that aren't installed are skipped silently. If you're using a client we don't auto-detect (Claude Code, VS Code, Zed, ...), the wizard prints the exact JSON snippet to paste into that client's MCP config.
If you can't run the wizard (air-gapped install, policy restriction, etc.):
Sign up at zeropointlogic.io/auth/register — free, 5,000 tokens/month, no credit card.
Copy your
zpl_u_...key from /dashboard.Add to your Claude Desktop config:
{
"mcpServers": {
"zpl-engine": {
"command": "npx",
"args": ["-y", "zpl-engine-mcp@latest"],
"env": {
"ZPL_API_KEY": "zpl_u_YOUR_KEY_HERE",
"ZPL_MODE": "pure"
}
}
}
}Restart Claude Desktop.
What is ZPL Engine?
The ZPL Engine computes the AIN (AI Neutrality Index) — a mathematical measure of how stable or biased a system is. It works across:
Finance — market stability, portfolio bias, risk concentration, forex pairs, fear & greed
Gaming — economy balance, loot fairness, matchmaking, gacha audit, PvP balance
AI/ML — model fairness, prediction bias, dataset balance, prompt testing, benchmarks
Security — vulnerability distribution, risk matrix, compliance scoring
Crypto — whale concentration, DeFi risk, liquidity analysis, tokenomics
Certification — language-balance check on text, debate balance, news balance, review authenticity
Universal — quick decisions, structured comparison, AIN ranking, response balance check
One engine, multiple domains. The engine doesn't know what your data represents — domain "lenses" translate your specific data into the universal mathematical framework.
Modes (ZPL_MODE)
ZPL Engine MCP supports two modes for how text-evaluation results are returned:
Mode | Behavior | When to use |
| AIN score is hidden from the AI on | Default for most users. Prevents the observer effect — once the AI knows the numeric score, its subsequent output can drift toward it, contaminating downstream analysis. |
| AIN score is exposed to the AI on all tools. | When you explicitly want the AI to reason about the score (e.g. teaching mode, debugging, writing articles about balance scores). |
Why this matters: stability scoring only works if the measurement doesn't change the thing it measures. If an AI sees "AIN = 42" and then writes the next paragraph, its language naturally drifts to justify the score. Pure mode breaks that feedback loop.
Set via env: "ZPL_MODE": "pure" or "ZPL_MODE": "coach".
Installation
Via npm (recommended):
npm install zpl-engine-mcpOr clone and build:
git clone https://github.com/cicicalex/zpl-engine-mcp.git
cd zpl-engine-mcp
npm install
npm run buildAlternative client configs
Claude Code CLI (.claude/settings.json)
{
"mcpServers": {
"zpl-engine": {
"command": "npx",
"args": ["-y", "zpl-engine-mcp@latest"],
"env": {
"ZPL_API_KEY": "zpl_u_YOUR_KEY_HERE",
"ZPL_MODE": "pure"
}
}
}
}Local build
{
"mcpServers": {
"zpl-engine": {
"command": "node",
"args": ["/path/to/engine-mcp/dist/index.js"],
"env": {
"ZPL_API_KEY": "zpl_u_YOUR_KEY_HERE"
}
}
}
}Cursor / Windsurf
Add to your MCP configuration following the respective IDE's documentation, with the same command/args/env structure.
Tool Categories (67 tools)
Unique tool names: 63. With 4 backwards-compat aliases (zpl_balance_* pairs) the registered total is 67.
Category | Tools | Examples |
Core | 9 |
|
Finance | 7 |
|
Gaming | 6 |
|
AI/ML | 4 |
|
Security | 3 |
|
Crypto | 4 |
|
Certification | 3 |
|
Advanced | 7 |
|
Universal | 8 |
|
Meta | 8 |
|
AI Eval | 8 |
|
New in v3.2: Meta tools
Tool | Auth | Purpose |
| No | Project info + doc links — works before signup |
| Yes | Remaining tokens this month, reset date |
| Yes | Minimal JSON |
| No | Input validation with no token cost — sanity check before paying |
v3.0.0 Removed Tools (and why)
Removed | Why | Replacement |
| Accepted user-provided scores → returned "official AIN" → false authority risk |
|
| Generated "ZPL Certified" badge on arbitrary text → scam-tool risk |
|
| Generated "Certificate ID" + grades A+/F → enabled fake ZPL endorsements | None — manual review only |
| Name implies prediction; users misused for stock/lottery "predictions" |
|
| Forced AIN badge on every Claude response → spam + false authority at scale | None — explicit user requests only |
Quick Examples
> Analyze my crypto portfolio for balance: BTC 40%, ETH 25%, SOL 15%, AVAX 10%, DOT 10%
> Check if this loot table is fair: Common 60%, Uncommon 25%, Rare 10%, Legendary 5%
> Is my ML model output balanced? Class A: 1200 predictions, Class B: 300 predictions
> Check this AI response for language balance
> Compare React vs Vue across 5 criteriaPricing Plans
All paid plans offer 20% discount with annual billing.
Plan | Monthly | Annual | Max D | Tokens/mo | Keys |
Free | $0 | — | d=9 | 5,000 | 1 |
Basic | $10/mo | $8/mo | d=16 | 10,000 | 1 |
Pro | $29/mo | $23/mo | d=25 | 50,000 | 3 |
GamePro | $69/mo | $55/mo | d=32 | 150,000 | 5 |
Studio | $149/mo | $119/mo | d=48 | 500,000 | 10 |
Agent | $199/mo | $159/mo | d=48 | 2,000,000 | 15 |
Enterprise | $499/mo | $399/mo | d=64 | 10,000,000 | 25 |
Enterprise XL | $999/mo | $799/mo | d=100 | 50,000,000 | 50 |
Token Cost
Token cost depends on the dimension tier:
Dimension | Tokens/call | Sweep (19x) | Free plan (5,000, d<=9) |
D3–D5 | 1 | 19 | 5,000 calls |
D6–D9 | 2 | 38 | 2,500 calls |
D10–D16 | 5 | 95 | — (needs Basic+) |
D17–D25 | 15 | 285 | — (needs Pro+) |
D26–D32 | 40 | 760 | — (needs GamePro+) |
D33–D48 | 150 | 2,850 | — (needs Studio+) |
D49–D64 | 500 | 9,500 | — (needs Enterprise) |
D65+ | 2,000 | 38,000 | — (needs Enterprise XL) |
API Key Management
Keys are generated at zeropointlogic.io/dashboard/api-keys
Format:
zpl_u_+ 48 hex characters (user keys). v3.5.0+: the MCP only accepts user keys. Service keys (zpl_s_...) are engine-to-engine only — server-side, IP-restricted, not MCP-usable.Keys are SHA-256 hashed server-side — the plaintext is shown once at creation
To rotate a key: create a new key, update your MCP config, restart Claude, then delete the old key
If a key is compromised, delete it immediately from the dashboard — it's invalidated instantly
Environment Variables
Variable | Required | Default | Description |
| Yes* | — | Your user API key ( |
| No |
|
|
| No |
| Engine base URL (must match host allowlist; see Security) |
| No | — | Extra allowed hostnames (comma-separated), e.g. |
| No | unset | Set to |
| No | unset | Set to |
| No |
| Max requests per minute (applies to |
| No |
| Token budget warning threshold |
| No |
| Retry count for transient engine failures (5xx only) |
| No |
| Local history storage path (legacy alias: |
| Only for AI Eval tools | — | Required for the 8 AI Eval tools ( |
Architecture
Your AI Client (Claude, Cursor, etc.)
|
v (MCP Protocol — stdio)
ZPL Engine MCP Server (this package)
|
+-- Tool modules (data -> engine params)
| +-- finance, gaming, ai-ml, security, crypto
| +-- certification, advanced, universal, meta
|
v (HTTPS — Bearer auth)
ZPL Engine API (engine.zeropointlogic.io)
|
v (Post-binary computation)
AIN Result (0.1-99.9)The MCP server never sees or contains the engine formula. It sends (d, bias, samples) and receives (ain, deviation, status). All computation happens server-side.
Security
All inputs validated via Zod schemas with strict maxLength limits
API keys never logged or stored in plaintext locally
Engine URL allowlist — requests only go to
engine.zeropointlogic.iounless you add hosts withZPL_ENGINE_HOST_ALLOWLIST. Rejects userinfo embedded inZPL_ENGINE_URL(use env vars for keys).fetch(..., { redirect: "error" })prevents following HTTP redirects that could send your Bearer token elsewhere.In-memory rate limiting (configurable)
Exponential backoff retry for transient engine failures (5xx only, not 4xx)
Fail-fast startup if
ZPL_API_KEYis not set (except for no-auth tools)Local history sanitizes API key prefixes before writing
IP Protection (v3.0.0+)
The ZPL Engine computation method is a trade secret of Zero Point Logic. This MCP has been hardened to never expose it:
Tool outputs return AIN score + status + tokens used only. No bias, deviation, p-output, dimension, or timing values are exposed.
The MCP never receives or processes the engine formula — it sends
(d, bias, samples)to the server and receives(ain, status)back.All computation happens server-side on the proprietary engine. The client-side code contains no algorithmic secrets.
v3.0 removed tools that allowed user-provided scores to be presented as official AIN measurements (false authority risk).
License
MIT (covers the MCP client code only). The ZPL Engine computation algorithm, AIN formula, and server-side processing are proprietary trade secrets of Zero Point Logic and are NOT covered by this license.
Publisher
Links
ZPL Engine — Main site
Finance Monitor — Live financial analysis
API Documentation — Full API reference
Pricing — Plans & API keys
Smithery Registry — MCP discovery
See CHANGELOG.md for full version history.
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cicicalex/zpl-engine-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server