io.github.naur9n/arbitrum-transaction-preflight
Paid Arbitrum transaction simulation and risk scoring for wallets and AI agents.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
arbitrum-mpp-transaction-preflightclaude mcp add arbitrum-transaction-preflight -e 'CLIENT_PRIVATE_KEY=<your client_private_key>' -e 'SERVER_URL=<SERVER_URL>' -e 'CHAIN_ID=<CHAIN_ID>' -- npx -y arbitrum-mpp-transaction-preflight@4.0.0
{
"mcpServers": {
"arbitrum-transaction-preflight": {
"command": "npx",
"args": [
"-y",
"arbitrum-mpp-transaction-preflight@4.0.0"
],
"env": {
"CLIENT_PRIVATE_KEY": "<your client_private_key>",
"SERVER_URL": "<SERVER_URL>",
"CHAIN_ID": "<CHAIN_ID>"
}
}
}
}
Variables d'environnement
CLIENT_PRIVATE_KEYobligatoire secret Dedicated low-value payer key.SERVER_URLHosted paid API base URL.CHAIN_ID42161 for Arbitrum One.
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
Arbitrum Transaction Preflight
Paid transaction simulation and risk reports for wallets, bots, and AI agents. Before a transaction is signed, the API checks whether it simulates successfully, estimates gas, detects token/NFT approvals, inspects the target, and returns a machine-readable risk score.
Production API: https://arbitrum-mpp-transaction-preflight-production.up.railway.app
Product and pricing
- Network: Arbitrum One (
42161) - Asset: native USDC (
0xaf88d065e77c8cC2239327C5EDb3A432268e5831) - Launch price:
0.10 USDCper report (100000raw USDC units) - Primary payment channel: MPP with EIP-3009
- Optional distribution channel: x402 with Coinbase CDP/Bazaar
- Agent interface: MCP stdio server that pays the MPP endpoint with the caller's wallet
The service never asks for a transaction-signing wallet. The example MPP/MCP clients use a separate low-value payer key only to authorize the API payment.
Discovery endpoints
The hosted service exposes free discovery metadata:
GET /— product, network, price, and endpoint summaryGET /health— health checkGET /openapi.json— MPP-aware OpenAPI 3.1 discovery documentGET /llms.txt— concise instructions for AI agentsGET /.well-known/agent.json— agent/service metadata
MPP clients call:
POST /v1/preflight
When x402 is enabled, x402 clients call:
POST /x402/v1/preflight
Request and report
{
"from": "0x0000000000000000000000000000000000000001",
"to": "0x0000000000000000000000000000000000000002",
"data": "0x",
"valueEth": "0"
}
from and to are required. data defaults to 0x. Use either valueEth
or valueWei for native value. A successful paid response contains:
- call simulation success/revert details;
- gas estimate, gas price, and estimated ETH cost;
- EOA/contract target inspection;
- ERC-20
approveand NFTsetApprovalForAlldetection; - weighted risk score and warnings;
- block number and check timestamp.
Automated simulation and heuristics reduce risk but are not a guarantee of safety.
Run locally
Requirements: Node.js 22+ and a dedicated server wallet. On mainnet, the server wallet needs a small Arbitrum One ETH balance for MPP settlement gas.
npm install
cp .env.example .env
npm run server
Minimum production configuration:
SERVER_PRIVATE_KEY=0x...
CHAIN_ID=42161
ARBITRUM_RPC=https://arb1.arbitrum.io/rpc
PRICE_RAW_USDC=100000
ENABLE_FREE_DEMO=false
SERVER_URL=https://arbitrum-mpp-transaction-preflight-production.up.railway.app
Never commit .env or expose SERVER_PRIVATE_KEY.
MPP client
The included client performs the complete 402 -> authorization -> retry ->
receipt flow:
CLIENT_PRIVATE_KEY=0x...
TARGET_ADDRESS=0x...
SERVER_URL=https://arbitrum-mpp-transaction-preflight-production.up.railway.app
CHAIN_ID=42161
npm run client
The payer needs native USDC on Arbitrum One. It does not need ETH for the MPP payment; the merchant settles the signed EIP-3009 authorization.
MCP integration
The MCP server exposes check_arbitrum_transaction. It uses the caller's
dedicated CLIENT_PRIVATE_KEY to pay the hosted MPP API, so each tool call
produces API revenue instead of bypassing payment.
npm run mcp
After the npm package is published, MCP hosts can run:
{
"mcpServers": {
"arbitrum-preflight": {
"command": "npx",
"args": ["-y", "arbitrum-mpp-transaction-preflight"],
"env": {
"CLIENT_PRIVATE_KEY": "0x...",
"SERVER_URL": "https://arbitrum-mpp-transaction-preflight-production.up.railway.app",
"CHAIN_ID": "42161"
}
}
}
}
Use a dedicated low-value payer wallet. Never reuse a valuable wallet key.
Enable x402 and Bazaar
Production x402 settlement on Arbitrum uses Coinbase's CDP facilitator. Create a CDP project and add these Railway variables:
ENABLE_X402=true
CDP_API_KEY_ID=...
CDP_API_KEY_SECRET=...
The server then exposes POST /x402/v1/preflight with Bazaar discovery metadata.
MPP remains available at POST /v1/preflight; the two payment channels share the
same analysis engine and merchant address.
Development checks
npm run typecheck
npm run build
npm pack --dry-run
Set ENABLE_FREE_DEMO=true only for local development to expose
POST /demo/preflight without payment. Never enable it in production.
Publishing surfaces
The repository includes server.json and npm metadata for the official MCP
Registry. Release order:
- deploy this version to Railway;
- publish
arbitrum-mpp-transaction-preflightto npm; - publish
server.jsonwithmcp-publisher; - enable CDP x402 to become eligible for Bazaar indexing;
- submit the live MPP endpoint to the MPP services catalog.
Official Arbitrum MPP guide: https://docs.arbitrum.io/build-decentralized-apps/machine-payments-protocol
Questions fréquentes
Qu'est-ce que io.github.naur9n/arbitrum-transaction-preflight ?
Paid Arbitrum transaction simulation and risk scoring for wallets and AI agents.
Comment installer io.github.naur9n/arbitrum-transaction-preflight ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add arbitrum-transaction-preflight -e 'CLIENT_PRIVATE_KEY=<your client_private_key>' -e 'SERVER_URL=<SERVER_URL>' -e 'CHAIN_ID=<CHAIN_ID>' -- npx -y arbitrum-mpp-transaction-preflight@4.0.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour io.github.naur9n/arbitrum-transaction-preflight ?
Oui. Il attend CLIENT_PRIVATE_KEY, à renseigner dans sa configuration.
io.github.naur9n/arbitrum-transaction-preflight est-il open source ?
Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.
Qui maintient io.github.naur9n/arbitrum-transaction-preflight ?
Il est publié par naur9n. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.