ingravity-security
Provides an IngravitySecurityActionProvider for Coinbase AgentKit, enabling programmatic security actions with an EVM wallet provider, optional USDC spend cap, and receipt caching.
Supports pre-flight EVM security checks, calldata decoding, token honeypot scanning, DeFi slippage/liquidation math, and Solidity contract auditing on Ethereum mainnet (chain ID 1).
Supports pre-flight EVM security checks, calldata decoding, token honeypot scanning, DeFi slippage/liquidation math, and Solidity contract auditing on Optimism (chain ID 10).
Supports pre-flight EVM security checks, calldata decoding, token honeypot scanning, DeFi slippage/liquidation math, and Solidity contract auditing on Polygon (chain ID 137).
Ingravity Security MCP Server (ingravity-security)
Self-contained, zero-dependency Model Context Protocol (MCP 2025-06-18) STDIO Server implemented in Node.js (mcp.js) for 5-EVM Web3 pre-flight security, EVM calldata structural decoding, ERC-8021 Base Builder attribution, live RPC token honeypot scanning, BigInt DeFi MEV slippage math, and 24-vector Solidity auditing across Base (8453), Arbitrum (42161), Optimism (10), Polygon (137), and Ethereum (1).
Architecture & Implementation
This repository contains the complete, runnable STDIO MCP Server (mcp.js) packaged with a minimal Node 22 Alpine Dockerfile:
Local MCP
2025-06-18Protocol Engine (mcp.js): Natively implementsinitialize,ping,tools/list,tools/call,resources/list,resources/read,prompts/list, andprompts/getover JSON-RPC 2.0 STDIO with zero external runtime dependencies.Local Deterministic Web3 Tools (Zero Network Required):
ingravity_encodeErc8021Calldata— Validates hexadecimal EVM calldata locally and idempotently appends the Base ERC-8021 attribution suffix (bc_i26d7owr).ingravity_decodeEvmCalldataSelector— Structurally decodes standard 4-byte EVM selectors (approve,transfer,transferFrom,setApprovalForAll,permit,Permit2,multicall) and raw 32-byte ABI words locally.
Local Input Validation & Session Receipt Caching: Strictly validates EVM addresses, chain IDs, and required schemas locally (
-32602JSON-RPC errors) and caches HMAC session receipts (X-Ingravity-Receipt-Token) to prevent duplicate spend.Ingravity x402 v2 REST API Integrations (
/api/v1/*): Dispatches paid security analysis calls to the Ingravity verification backend settling per-call in Native Base USDC (eip155:8453) with zero API keys or subscriptions.
Related MCP server: x402-bazaar-mcp
Quickstart (Run Locally via Docker or NPX)
Option 1: Docker
docker build -t ingravity-security-mcp .
docker run -i --rm ingravity-security-mcpOption 2: Claude Desktop / Cursor / Windsurf (npx)
Add this entry to your MCP client configuration (claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"ingravity-security": {
"command": "npx",
"args": ["-y", "-p", "ingravity-security@1.3.0", "ingravity-mcp"],
"env": {
"INGRAVITY_AGENT_BUDGET": "0.10"
}
}
}
}Optional Environment Variables
Variable | Description |
| Override the default Ingravity REST API v1 base URL. |
| Optional maximum USDC spend cap per call ( |
| Base64 EIP-3009 x402 v2 |
| Optional settled Base USDC transfer hash ( |
| Optional reusable session receipt token ( |
MCP Tools Catalog (9 Tools)
Local Deterministic Utilities (No Network Required)
Tool Name | Execution | Description |
| Local | Validates EVM hex calldata and idempotently appends Base ERC-8021 suffix ( |
| Local | Structurally decodes 4-byte EVM selectors and 32-byte ABI arguments (no risk verdict). |
x402 v2 Security Verification Tools (Base Mainnet USDC)
Tool Name | API Route | Full Tier | Essential Tier | Capabilities |
|
|
|
| Binary |
|
|
|
| Pre-sign calldata simulation, EIP-1967/1167 proxy check & revocation bundle. |
|
|
|
| Live 5-EVM RPC ERC-20 bytecode disassembly & honeypot detection. |
|
|
|
| 48-step exact BigInt AMM slippage, MEV sandwich & perp liquidation math. |
|
|
|
| Deterministic 24-vector Solidity static audit with 4-gate anti-noise filter. |
|
|
|
| Multi-contract (1–20 files) cross-reentrancy & ERC-4626/oracle invariants. |
|
|
|
| Flash-loan exploit simulation, live TVL check & unsigned Safe-Harbor plan. |
MCP Resources & Prompts
Resources:
ingravity://docs/supported-chains— Canonical 5-EVM chain IDs and Base USDC settlement contract.ingravity://docs/x402-settlement— Zero-custody EIP-3009 x402 v2 settlement guide.
Prompts:
pre_sign_transaction_check— Structured workflow to decode and inspect EVM calldata before signing.pre_swap_token_check— Two-step honeypot and AMM slippage checklist before swapping ERC-20 tokens.
Programmatic Library Usage (Coinbase AgentKit & ElizaOS)
In addition to the standalone MCP server (mcp.js), the package exports IngravitySecurityActionProvider, ingravityElizaPlugin, and encodeErc8021Calldata from index.js:
npm install ingravity-securityimport { IngravitySecurityActionProvider } from "ingravity-security";
const provider = new IngravitySecurityActionProvider({
walletProvider: evmWalletProvider,
maxSpendUsdc: 0.10,
enableReceiptCache: true
});Security & Verification
npm testZero Custody: Never holds private keys or requests ERC-20
approve().Base Builder Code:
bc_i26d7owr(ERC-8021).License: MIT
Available Tools
9 toolsingravity_auditSolidityContract24-Vector Solidity Contract AuditorBRead-onlyIdempotent
Calls /api/v1/audit-solidity ($0.85 Full / $0.35 Essential USDC via x402 v2) for a deterministic 24-vector Solidity static audit with 4-gate anti-noise filtering.
Inputs: code (required), tier, chainId, contractName, +2 more.
ingravity_computeDefiSlippageAndLiquidationDeFi Slippage, MEV & Liquidation Math GuardBRead-onlyIdempotent
Calls /api/v1/defi-math-guard ($0.10 Full / $0.04 Essential USDC via x402 v2) for exact 18-decimal BigInt AMM swap math, 48-step MEV sandwich bounds, and perpetual liquidation thresholds.
Inputs: amm, tier, leverage.
ingravity_decodeEvmCalldataSelectorStructural EVM Calldata Selector Decoder (Local)ARead-onlyIdempotent
Structurally parses EVM hexadecimal calldata locally to identify standard 4-byte selectors (ERC-20 approve/transfer/transferFrom, ERC-721 setApprovalForAll, EIP-2612 permit, Permit2, multicall) and extract raw 32-byte ABI words. Pure structural decoding — use ingravity_inspectEvmTransactionFirewall for live risk verdicts and proxy forensics.
Inputs: data (required).
ingravity_encodeErc8021CalldataERC-8021 Base Builder Calldata Encoder (Local)ARead-onlyIdempotent
Validates hexadecimal EVM calldata locally and idempotently appends the ERC-8021 Base Builder attribution suffix (bc_i26d7owr). Pure local deterministic execution with zero network calls.
Inputs: calldata (required).
ingravity_fastPingAddressSafetyFast EVM Address Safety PingARead-onlyIdempotent
Queries the Ingravity x402 v2 API (/api/v1/fast-ping) for a binary SAFE/DANGER address gate across 5 EVM chains ($0.01 USDC flat on Base Mainnet). Strictly read-only.
Inputs: address (required), chainId.
ingravity_generateMultiContractProtocolDossierMulti-Contract DeFi Protocol AuditorBRead-onlyIdempotent
Calls /api/v1/protocol-dossier ($12.00 Full / $3.50 Essential USDC via x402 v2) to audit 1-20 interdependent Solidity contracts for cross-contract reentrancy and ERC-4626/oracle invariants.
Inputs: contracts (required), tier, chainId, protocolName, +3 more.
ingravity_inspectEvmTransactionFirewallPre-Flight EVM Transaction FirewallARead-onlyIdempotent
Submits transaction calldata to /api/v1/tx-firewall ($0.10 USDC on Base via x402 v2) for live 5-EVM RPC bytecode & EIP-1967/1167 proxy inspection, drainer interception, and unsigned EIP-5792 revocation bundles.
Inputs: to (required), data, from, value, +3 more.
ingravity_scanTokenRugpullAndHoneypotERC-20 Token Rugpull & Honeypot ScannerARead-onlyIdempotent
Calls /api/v1/token-rug-scanner ($0.12 Full / $0.04 Essential USDC via x402 v2) to audit ERC-20 tokens via live 5-EVM RPC bytecode disassembly & proxy inspection (no Solidity source required).
Inputs: code, tier, chainId, tokenName, +1 more.
ingravity_simulateDeepExploitAndWhitehatBountyFlash-Loan Exploit Simulator & Safe-Harbor PlannerBRead-onlyIdempotent
Calls /api/v1/deep-exploit-bounty ($45.00 Full / $9.50 Essential USDC via x402 v2) for flash-loan exploit vector simulation, live TVL inspection, and unsigned EIP-5792 Safe-Harbor rescue plans.
Inputs: protocolName (required), code, tier, tvlUsd, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools target clearly distinct artifacts: local calldata encode, local calldata decode, address gate, tx firewall, token scan, DeFi math, single-contract audit, multi-contract dossier, and exploit simulation. The only real overlap is among the three audit-style tools (auditSolidityContract vs generateMultiContractProtocolDossier vs simulateDeepExploitAndWhitehatBounty), which descriptions do disambiguate via scope (single vs 1-20 contracts vs exploit simulation) and payload type. Descriptions also include explicit cross-references (decode says 'use inspectEvmTransactionFirewall for live risk verdicts'), which further reduces misselection.
All nine tools use the same ingravity_ prefix and verb-first camelCase, with descriptive multi-word object names. Minor deviations exist: internal word order varies (encodeErc8021Calldata vs fastPingAddressSafety, which starts with an adjective rather than a verb) and some names append a risk-domain qualifier. Overall still highly predictable.
Nine tools is well within a comfortable scope, and each appears to map to a distinct endpoint or local capability with a distinct job (no duplicate wrappers of the same API route). No padding or thin 1-2 tool surface.
The domain (EVM security triage, contract auditing, and transaction safety) is covered end to end: pre-trade address gating, calldata encode/decode, live tx firewall, token rug scanning, DeFi math, and static/dynamic audits. Gaps remain around approval/allowance enumeration and a standalone revocation builder (revocation bundles only appear embedded as unsigned output), EIP-712/permit phishing verification, and detailed per-address risk reporting beyond the binary SAFE/DANGER gate.
Maintenance
Related MCP Connectors
SqueezeOS MCP for x402-paid USDC APIs on Base. Flagship read settle-proven 2026-11-02 (SELF-PROOF).
23-in-1 MCP server: EVM tx simulator, funding rate arb, macro radar, swap calldata & security.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
37 paid x402 MCP tools for OSINT, prediction markets, web intel, and agent security on Base USDC.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceLocal stdio MCP server for x402-powered paid crypto intelligence, decision verification, and agent automation search over USDC micropayments on Base.707 npmMIT
- AlicenseBqualityBmaintenanceMCP server exposing x402 Bazaar's paid Base APIs (token risk/honeypot, prices, gas, wallet intel, tx decode + AI utilities) as agent tools. Your agent pays per call in USDC over x402 — no API keys, no signup.17166 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides AI agents with pay-per-call access to a suite of tools (honeypot check, token market, DeFi yields, etc.) via USDC on Base using the x402 protocol.MIT
- AlicenseNot gradedqualityCmaintenanceA stdio MCP server that exposes guard_token, guard_tx, and guard_address endpoints for pre-execution security and trust evaluation of tokens, transactions, and addresses on Base.MIT