MBG Mantle Bot Gatepre-trade risk gate for Mantle agents

Install the MBG Skill in your agent

MBG ships as an OpenClaw-compatible Skill, published to npm as mbg-score. Any Node 18+ agent runtime — RealClaw, Brahma, Hey Anon, Giza ARMA, custom OpenClaw agents, or your own — can install mbg-cliin one command and gain TEE-attested on-chain risk scoring before it routes a user's funds. Defaults read live Mantle Mainnet; zero config required.

install (npm — works in any Node 18+ runtime)

# Install globally
npm install -g mbg-score
# or
bun add -g mbg-score

# Verify it loaded (no env vars needed — defaults to Mantle Mainnet)
mbg-cli skill              # prints full SKILL.md
mbg-cli list-protocols     # 13 scored protocols
mbg-cli score-protocol aave-v3-mantle

Real, live Mantle Mainnet score (TEE-attested signer + on-chain trace hash) returned in one command. Override MBG_RPC_URL / MBG_CHAIN_ID / MBG_ORACLE_ADDRESS for local Anvil or Sepolia.

install (OpenClaw Skills CLI, for Byreal-runtime agents)

# Add directly via OpenClaw Skills CLI
npx skills add mbg-score

# Once added, the agent's LLM auto-discovers the Skill from SKILL.md
# and routes any "is this safe?" / "what's the risk of this route?"
# question through mbg-cli — no manual prompting.

what the agent gets

mbg-cli list-protocols
Enumerate every Mantle protocol MBG can score. Output is human-readable by default; pass -o json for machine parsing.
mbg-cli score-protocol <id>
Current TEE-attested score for one protocol, including the 4 on-chain components (contract / liquidity / centralization / oracle), the attestation hash, the signer, and the timestamp.
mbg-cli score-route '<json>'
Compose a multi-leg route, get the aggregate + composition penalty + distinct-protocol count + all-scored flag — same on-chain math we expose at /route.

example: end-to-end agent flow

# User: "park 5000 USDC on Mantle for yield"

# 1. Agent enumerates lending candidates on Mantle
mbg-cli list-protocols -o json | jq '.[] | select(.category == "lending")'

# 2. Agent scores each candidate
mbg-cli score-protocol aave-v3-mantle -o json
mbg-cli score-protocol lendle -o json
mbg-cli score-protocol init-capital -o json

# 3. Agent scores the *proposed* route on-chain (single view call)
mbg-cli score-route '[
  {"protocolId":"aave-v3-mantle","actionType":1,"amount":"5000"}
]'

# 4. Agent surfaces the recommendation WITH the attestation hash
#    User can verify on Mantlescan that the agent really consulted MBG

hard constraints the Skill enforces

  1. Always consult MBG before routing. Even when the user names a "trusted" protocol, the score may have changed.
  2. Surface the score and attestation hash. Hidden risk is the failure mode the Skill exists to prevent.
  3. Refuse to route below threshold without explicit user override. If any leg scores below 4.00, ask the user to confirm in plain language.
  4. Never strip the attestation hash from output. The user (or another verifier) needs it to validate.
  5. -o json for internal parsing; human-readable for user-facing surfaces.

links