delusional
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
delusional
make the implicit explicit, then try to break it.

A zero-dependency 5-mode engineering auditor, Agent Skill, MCP server, x402-monetized API (Base Mainnet USDC), and light-mode Web Playground for Solidity & TypeScript — inspired by @poteto and @dannypostma (Tobi Lütke).
The 5 Modes
invariants— Find implicit invariants (balance accounting underflows, tick/range clamping, period truncation, one-sided deltas, unbounded ETH pushes, division-before-multiplication,tx.origin, zero slippage, float money, unchecked[0]) and hunt for runnable counterexamples.bugs-to-props— Extract historical bug-fix commits fromgit logand turn them into generalized property/fuzz tests.state-machines— Detect implicit state machines (boolean soup, zero-vs-nonzero guards) and emit explicit MermaidstateDiagram-v2graphs + illegal-transition checks.halve— Flag oversized modules, staleTODO/FIXME/DEPRECATEDmarkers, and commented-out code blocks removable without breaking tests.100x— Flag serial I/O inside loops, nested quadratic loops, O(n) lookups inside loops, and uncached Solidity array.lengthreads.
Related MCP server: bug-bounty-intelligence-mcp
Install
# run instantly (no install)
npx delusional scan . --mode all
# or install globally
npm i -g delusional
delusional --helpQuick Start
# 1. Scan any Solidity or TypeScript repo (text, json, or markdown)
node ./bin/delusional.mjs scan /path/to/repo --mode all
node ./bin/delusional.mjs scan /path/to/repo --format md
node ./bin/delusional.mjs scan /path/to/repo --fail-on high
# 2. Scan a single file
node ./bin/delusional.mjs analyze ./contracts/Backstop.sol --mode invariants
# 3. Compile a proof-enforced engineering prompt
node ./bin/delusional.mjs prompt invariants "Backstop.sol tick clamping" --context "Foundry 0.8.26, Base Mainnet"
# 4. Start Web Playground + API (free local demo mode)
npm run serve:demo
# open http://127.0.0.1:4020
# 5. Start Production x402 Paid Server (Base Mainnet USDC)
PAY_TO=0xD5C1dFc036F9911348EA8065F73c8123f4013FAB npm run serve
# 6. Run as MCP Server
npm run mcp
# 7. Run test suite
npm testx402 API (Base Mainnet USDC)
Discovery:
GET /catalogandGET /.well-known/x402.jsonHealth:
GET /healthPaid Analysis (
$0.05USDC):POST /api/analyze— enforces HTTP402 Payment RequiredwithPAYMENT-REQUIREDheader, verifies via${X402_FACILITATOR_URL}/verify, settles via/settle, and returns base64X-PAYMENT-RESPONSE.Prompt Compiler (
$0.01USDC whenGATE_COMPILE=true, free otherwise):POST /api/compile
See .env.example for all environment variables (PORT, HOST, FREE_MODE, PAY_TO, GATE_COMPILE, X402_FACILITATOR_URL, X402_SETTLE, X402_TEST_BYPASS).
MCP Server
Exposes 3 tools (delusional_scan_repo, delusional_analyze_code, delusional_compile_prompt) and 5 native prompts (delusional-invariants, delusional-bugs-to-props, delusional-state-machines, delusional-halve, delusional-100x):
{
"mcpServers": {
"delusional": {
"command": "npx",
"args": ["-y", "delusional", "mcp"]
}
}
}Agent Skill
Copy or point your agent (Antigravity, Claude Code, Codex, Cursor) to:
skills/delusional/SKILL.md
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI smart contract security audits by Nethermind. Run scans and pull findings into your agent.
Read-only smart-contract security intelligence for autonomous agents.
Token rug-risk scans, Know Your Agent wallet checks and deployer reputation for AI agents.
AI security scanner for Solidity + free CC0 dataset of Sherlock audit-competition acceptance rates.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI coding agents to scan smart contracts and code for vulnerabilities, check against 12 famous-hack patterns, and return public security receipts directly in the IDE.421 npmMIT
- AlicenseAqualityBmaintenanceAI-powered smart contract security analysis for AI agents and developers, enabling scanning of Solidity repos for vulnerabilities.3334 npm11MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to audit Solidity smart contracts for security vulnerabilities, fetch verified source code from block explorers, decode calldata, and estimate gas costs across major EVM networks.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables static analysis, vulnerability scanning, gas optimization, formal specification verification, and audit report generation for smart contracts across Ethereum, Polygon, Arbitrum, Optimism, and Base. It also retrieves deployed contract information and audit history, persisting findings between sessions.MIT