Skip to main content

MCP server for RugGuard — pre-trade rug-check API for AI agents. Wraps the x402 payment flow so Claude Desktop, Cursor, and other MCP-aware agents can call RugGuard without speaking x402 themselves.

Project description

rugguard-mcp

MCP server for RugGuard — pre-trade rug-check API for AI agents. Wraps the x402 payment flow so Claude Desktop, Cursor, and other MCP-aware agents can call RugGuard without speaking x402 themselves.

What it does

Two MCP tools:

  • scan_token(chain, address) — runs 14 heuristics on Base + 5 on Solana SPL, returns a weighted risk score 0–100, a verdict (safe | low_risk | medium_risk | high_risk | critical | uncertain), and structured red flags (owner renounced, LP locked, honeypot signatures, top10 concentration, mint authority, bytecode similarity to known rugs via MinHash, deployer rug history, etc.). Pays $0.01 USDC on Base behind the scenes.
  • explain_scan(scan_id) — replays a previously-cached scan's full per-heuristic audit trail. Pays $0.005 USDC.

The server holds a dedicated Base-mainnet wallet and signs each EIP-3009 USDC transferWithAuthorization transparently. The agent never sees the payment friction.

Install

pip install rugguard-mcp

First-time setup

Generate a dedicated wallet (never reuse your main one):

python -m rugguard_mcp init

This creates ~/.rugguard/wallet.json (mode 600 on POSIX) and prints the address to fund. Send 5–20 USDC on Base mainnet to that address — both Coinbase and Binance support "Network: Base" withdrawals.

Check status:

python -m rugguard_mcp status

Configure your MCP client

Claude Desktop

Edit claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "rugguard": {
      "command": "python",
      "args": ["-m", "rugguard_mcp"]
    }
  }
}

Restart Claude Desktop. The scan_token and explain_scan tools appear in the tool drawer.

Cursor / other MCP clients

Same mcpServers shape, point to python -m rugguard_mcp or the rugguard-mcp console script.

Safety

Spending caps (defense in depth against a runaway agent or a compromised remote server):

Cap Default Override
Per-session (resets on restart) $5 RUGGUARD_MCP_SESSION_SPEND_CAP_USD
Rolling 24 h $10 RUGGUARD_MCP_DAILY_SPEND_CAP_USD

The caps are enforced client-side, before the EIP-3009 signature — even a compromised 402 response can't trick the wallet into overspending.

Asset whitelist: the client refuses to sign for anything other than canonical USDC on Base (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) or Base Sepolia. A malicious 402 trying to redirect to a different EIP-3009-compatible token in your wallet is rejected before signing.

Replay window: EIP-3009 authorizations are bound to a 10-second validBefore window — short enough that a captured payment header can't be replayed against the USDC contract after the legitimate settlement.

Wallet at rest: ~/.rugguard/wallet.json is mode 600 on POSIX (best-effort on Windows — set ACLs manually for production-grade isolation). Treat the file like an SSH key: don't commit it, don't share it.

Configuration

Env var Default Purpose
RUGGUARD_API_URL https://rugguard.redfleet.fr Override for staging / self-hosted
RUGGUARD_X402_PRIVATE_KEY unset Legacy fallback for users who don't want init
RUGGUARD_MCP_WALLET_PATH ~/.rugguard/wallet.json Move the wallet file elsewhere
RUGGUARD_MCP_SPEND_LOG_PATH ~/.rugguard/spend_log.json Where the 24 h spend ledger lives
RUGGUARD_MCP_SESSION_SPEND_CAP_USD 5.0 Tighter cap for cautious operators
RUGGUARD_MCP_DAILY_SPEND_CAP_USD 10.0 Tighter cap for cautious operators

Source

This package is the public, slim distribution of the MCP server. The underlying RugGuard API + heuristic engine remain in a private repo. Code in this repo is MIT-licensed and auditable end-to-end — review it before pointing your funded wallet at it.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rugguard_mcp-0.1.0.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rugguard_mcp-0.1.0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file rugguard_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: rugguard_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rugguard_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6edc949973ce0c05e96305f6e146f03c3ffd4d55a1d54af99a17c0f2f753d133
MD5 0c5979653bf557c7454452ae78a07374
BLAKE2b-256 b6737cbbeccaad06db557a0fd617bf3940e4a43e501aee64a8fcfa8244023981

See more details on using hashes here.

Provenance

The following attestation bundles were made for rugguard_mcp-0.1.0.tar.gz:

Publisher: publish.yml on dbe006/rugguard-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rugguard_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rugguard_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rugguard_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73e0bb1581525d5764592e0f3df6b26cf557852f0ed4f3bc7634439509b30e1b
MD5 a8ae5edf1a2a17c24158f1a6e50d1d31
BLAKE2b-256 99bc5c67bcce4764c1c93a4a23fa54b7d0df2f550ab185d4cfa7276f1b2c39bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rugguard_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on dbe006/rugguard-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page