Agentic Finance Graph — MCP server and CLI
Ask the independent ledger of machine money directly from Claude, Cursor, an agent framework or your terminal: which AI agents on Base actually pay, how much of their money was really spent, any agent's record, detections, metric histories and the price of an evidence pack.
Read-only and free. Nothing here can move funds, and nothing here needs a key.
Website: agenticfinancegraph.com · Setup guide: MCP server, step by step · Definitions: every figure, defined
Listed in: the official MCP Registry as com.agenticfinancegraph/agentic-finance-graph (publisher verified by domain) · Smithery · Glama (health-checked) · the paid evidence packs in the Coinbase x402 Bazaar and on x402scan
The same data on the website (30 seconds)
https://github.com/user-attachments/assets/ee95c1e9-54c2-49fc-b756-5ab58203861d
The Desk at agenticfinancegraph.com/desk: connect a wallet, watch any agent, see its history, request the data for 1 cent. The MCP tools below read the same ledger.
Connect as a remote MCP server (recommended)
Endpoint: https://agenticfinancegraph.com/mcp (Streamable HTTP, stateless, no key).
- Claude Code:
claude mcp add --transport http afg https://agenticfinancegraph.com/mcp - Cursor, Windsurf, VS Code and other clients: add a remote MCP server with that URL.
Clients that only speak stdio (Claude Desktop and others)
{
"mcpServers": {
"afg": { "command": "npx", "args": ["-y", "github:AgenticFinanceGraph/agentic-finance-graph-mcp", "mcp"] }
}
}
The mcp command forwards each JSON-RPC message to the remote endpoint. It has no dependencies; Node 18 or newer is enough.
Or run the same bridge in a container (the image holds only the bridge; every answer still comes from the remote endpoint):
docker build -t afg-mcp https://github.com/AgenticFinanceGraph/agentic-finance-graph-mcp.git
docker run -i --rm afg-mcp
Tools
market_state, ranked_agents and agent_record also return typed results (structuredContent, described by an outputSchema). market_state carries a composition block (what counted spending consists of, ten parts that add up to the cent) and our data-quality checks; every figure that our own coverage changes touched carries comparable_since, and the dated register of those changes is at /api/changepoints. The server speaks MCP 2025-11-25 and the earlier versions. The same read-only checks also answer over A2A (JSON-RPC message/send) at https://agenticfinancegraph.com/api/a2a; the agent card is at /.well-known/agent-card.json.
Just connected? Tell your AI, in your own words: "I connected Agentic Finance Graph. Look through what it offers and show me what we can do with it." The server's instructions tell it how to give the tour with today's figures. Three resources are also served: afg://guide, afg://changepoints, afg://definitions.
Prompts
Ready-made workflows. Clients such as Claude show them in the prompt menu once the server is connected.
CLI
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp state
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp find 57657
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp ranked 10 9
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp history actors_l7_plus 30d
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp since actors_l7_plus 24h
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp payers 0x4cd00e387622c35bddb9b4c962c136462338bc31
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp statement 53008
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp quote precheck 53008 0x0e84ddedaae6a779c462c22a59f301ec31b6b808
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp verify 45978
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp pattern 57657
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp facts 0x424b266c22509a9eb47bcb5b908f40c1157cc2a1 45978 100
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp gate 45978 0x424b266c22509a9eb47bcb5b908f40c1157cc2a1 100 recommended-v3
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp pass 57657
npx -y github:AgenticFinanceGraph/agentic-finance-graph-mcp blast 57657
The security layer (shadow since 16 Oct 2026)
A check before an agent pays (gate_check, payee_facts), a watch after it (agent_pattern), a three-hour signed statement of what was measured (agent_pass), what a stolen key would move (blast_radius) and planted decoys (canary_register, canary_status). Everything is measured from the chain and the ledger, never from what an agent says; every answer carries its measurement time and definition id; nothing is a verdict, and in shadow mode nothing is blocked or alerted. How it works, with live figures: agenticfinancegraph.com/security.
Gate hook for x402 clients
bin/x402-gate-hook.mjs is an onBeforePaymentCreation hook for @x402/core 2.x clients. Before the scheme signs, it asks gate_check with your agent, the payee, the USD value of what will be signed and your policy, and aborts on the decisions you choose. The default aborts on block only and, when AFG cannot be reached, allows and logs a warning (onUnavailable: "warn"); "abort" fails closed, "allow" fails open. No dependencies; tested against a stand-in server (npm test).
import { makeGateHook } from "agentic-finance-graph-mcp/bin/x402-gate-hook.mjs";
client.onBeforePaymentCreation(makeGateHook({ agent: "45978", policy_name: "recommended-v3", abortOn: ["block"], log: console.log }));
The hook prices USDC, USDT and DAI on Base; other assets and networks are allowed and logged as not checked. A payment the Gate blocks is a block in your client, never ours: AFG records the decision and moves nothing.
afg verify <agent-id> trusts nothing it did not recompute: it fetches the signed head of the Merkle-sum log (sumlog.v1) and the agent's proof, rebuilds the leaf and the path to head.agent_root, checks that the summed amount equals the whole counted total, and verifies the Ed25519 signature on the head. One line per check; exit code 1 on any failure. Set AFG_SUMLOG_PUBKEY to the 32-byte hex key you were given out of band to stop trusting the key printed in the answer.
Or install it once: npm install -g github:AgenticFinanceGraph/agentic-finance-graph-mcp, then run afg state.
How the numbers are counted
Every figure carries its definition id and the time it was measured. Call definition before quoting one, or read them all at agenticfinancegraph.com/def. A figure that turns out wrong is corrected publicly, with a date, in the changelog.
Security
Every push and pull request is scanned by the HOL AI Plugin Scanner, pinned to an exact commit and run with read-only permissions. Dependabot watches the workflow's actions. The package has no dependencies, and the server it talks to is read-only: nothing here can move funds. Found a problem? See SECURITY.md. What changed and when: CHANGELOG.md.
Work with us
- Builders: see where we need help — MCP clients, framework adapters, a Python client, recipes. We are open to people who want to join the founding team.
- Platforms, institutions and investors: agenticfinancegraph.com/contact
- Agents:
POST https://agenticfinancegraph.com/api/contactwith{kind, message, reply_to}.
X @AgenticGraph · Telegram · [email protected] · ERC-8004 agent #95875 on Base
Agent skill: check an agent before paying it
A skill file for assistants and agent frameworks that already speak Agent Skills (Claude Code, Cursor, Codex, OpenClaw and the rest): skills/afg-check-agent/SKILL.md. It tells the assistant how to use this MCP server before money moves: find the agent, read its record and its signed three-hour statement, read the detections on it and the counterparty it is about to pay, and report evidence with definitions and measurement times, never a verdict.
npx skills add AgenticFinanceGraph/agentic-finance-graph-mcp --skill afg-check-agent
Licence
Apache-2.0 for the code in this repository. The data served by the endpoint is Agentic Finance Graph's; quote it with the definition id and the measurement time.