agent-pay-mcp
Provides a createPaidFetchTool integration for LangChain, allowing LangChain agents to perform x402 paid API fetches under owner-signed policy.
Provides a createPaidFetchTool integration for LangGraph, allowing LangGraph agents to perform x402 paid API fetches under owner-signed policy.
Provides a paidFetchTool for the Vercel AI SDK, enabling agents to perform x402 paid API fetches under the owner's configured budget and policy.
Deep First Search: safe x402 payments for AI agents
Safe rails for the agent economy. Search deep. Reveal only what you choose.
AI agents now pay for things over x402. Every one of those payments is public, and any agent can be talked into paying the wrong party. Deep First Search makes the model propose payments while the owner's signed policy decides.
Try it in 10 seconds
No keys, no wallet, no chain: a local x402 merchant plays honest and hostile, and you watch the agent pay for data and refuse four attacks.
npx @deepfirstsearch/agent-pay demoRelated MCP server: Budget Governor
Pick your path
You use | Install | Guide |
Claude Desktop, Claude Code, Cursor, OpenClaw, any MCP client |
| |
Vercel AI SDK |
| |
LangChain.js / LangGraph |
| |
Coinbase AgentKit |
| |
Your own agent, any wallet |
| |
A Turnkey-held key |
| |
A Privy server wallet |
| |
A Coinbase CDP Server Wallet |
| |
Agents that place real orders (food, shopping) |
| |
On-chain budgets on Base |
|
The integrations take the SDK as a peer dependency, so your app always uses a single copy of it. Step-by-step guides for 34 x402 merchants, each tested with a real payment on Base mainnet, are in docs/integrations.
Full developer guide: deepfirstsearch.com/developers · building a wallet, framework or platform? Partners.
What's in this repository
Component | What it does | Status |
MCP server ( | Model Context Protocol server: Claude Desktop, Claude Code, Cursor and any MCP client get | ✅ |
Agent Safe ( | On-chain vault: owner-signed, timelocked, per-merchant budgets; the agent key can spend but never widen | ✅ 98 tests (fuzzing, invariants, properties, regressions, Base mainnet fork with real USDC), two internal reviews · live on Base mainnet (beta) |
agent-pay SDK ( | x402 v2 client (v1 opt-in per merchant) with a policy engine outside the model, prompt-injection guards, stable refusal and block codes, never a second signature while the first might have paid, per-merchant payers, owner CLI | ✅ 293 tests (283 run offline; 10 need a Base mainnet fork or RPC) incl. on-chain loops and the official x402 facilitator · |
Framework tools ( | Vercel AI SDK | ✅ on npm |
$DEPTH ( | 1B fixed supply, no mint function, no owner; fees burned through a fee jar + firepit | ✅ Implemented · not launched |
Website ( | Site, whitepaper, tokenomics, partner kit, legal pages; strict CSP, no cookies; only third party is cookieless Cloudflare Web Analytics | ✅ |
MCP server: let Claude or Cursor pay x402 APIs safely
@deepfirstsearch/agent-pay-mcp is a stdio MCP server. The model gets three tools and nothing that can move money on its own terms:
MCP tool | What it does |
| Fetches a URL; if it answers |
| Merchants the agent may pay, their prices and the remaining budget |
| Remaining budget per merchant, plan window, vault balance |
{ "mcpServers": { "agent-pay": {
"command": "npx", "args": ["-y", "@deepfirstsearch/agent-pay-mcp", "/path/config.json"],
"env": { "AGENT_PAY_AGENT_KEY": "0x…", "AGENT_PAY_BURNER_SEED": "0x…" } } } }Payees, prices and limits come from the config file and the owner-signed on-chain budget, never from the model or a 402 response, so a prompt-injected agent can't overspend or pay an attacker. Setup, config reference and a 5-minute Base Sepolia demo: integrations/mcp.
Status: pre-launch. Live on Base Sepolia, with a real x402 payment settled (see deployments); unaudited beta on Base mainnet since 2026-10-06 (small amounts, our own funds first, then invited design partners) while we arrange an independent audit; the public launch comes after the audit. No token exists.
Develop on this repository
# Contracts (needs Foundry: curl -L https://foundry.paradigm.xyz | bash && foundryup)
git submodule update --init --recursive
cd contracts && forge test
# SDK
cd ../sdk && npm ci && npm test && npm run demo
# Website
cd ../web && npm ci && npm run devDocuments
Formal design, privacy model, risks (EN; structured for MiCA Annex I) | |
Supply, allocation, Firepit burn, vesting (EN) | |
ADRs: ticker, chain, burn, vesting, stand… (ES) | |
Contract addresses on Base mainnet (unaudited beta) and Base Sepolia, plus the live demo vault | |
Scope, nSLOC, roles, known issues and questions for reviewers | |
Builds the airdrop Merkle tree and proofs; tested against the contract | |
Safes, rehearsal, deploy, checks, guarded launch, monitoring | |
Pentest findings, threat model, evidence (ES) | |
Market pain, successes, failures, token models, launch mechanics (ES) |
Key decisions
Ticker:
$DEPTH.Chain: Base.
Founder: 12%, nothing for 12 months, then 36 months linear, on-chain; the vesting contract cannot be transferred and the beneficiary is a public Safe.
Burn: burn-to-claim fee jar (no swaps, oracles or admins), fed only by Agent Safe, SDK and inference fees, never by privacy-pool fees.
No conference booth until there are users; hackathons instead.
No own privacy pool: integrate a third-party compliant one (ADR-011). Sales geo-blocked for the US and Argentina (ADR-012).
Using it? Tell us
There's no telemetry in the packages, so we only know who uses them if you say so. If your agent pays with Agent Safe, even once on testnet, tell us in this discussion: what it pays for, what got refused that shouldn't have, and what's missing. We'll test your sellers live and write a verified guide for any that's missing.
Security
See SECURITY.md to report vulnerabilities.
Contact
Built by Nicolas Tursi. General contact: hello@deepfirstsearch.com. Security reports: see SECURITY.md or write to security@deepfirstsearch.com.
License
MIT (contracts and SDK).
This server cannot be deployed
Maintenance
Related MCP Connectors
15 paid AI agent primitives via x402 (USDC on Base). Pay-per-call MCP server.
x402 pay-per-call APIs over MCP, settled in USDC on Base for autonomous agents and developers.
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceDrop-in x402 payment middleware for MCP servers. Charge AI agents per tool call using USDC on Base chain — Python and JavaScript SDKs, no payment processor, no KYC.MIT
- AlicenseNot gradedqualityCmaintenanceBudget & cost control for AI agents: hard per-agent spend caps, rate limits, idempotency, and human-in-the-loop approval — enforced before each LLM call, not after the invoice. One hosted MCP endpoint (no proxy or self-hosting), settled via x402 (USDC on Base).MIT
- AlicenseAqualityCmaintenanceAn MCP server that enables AI agents to access paid AI inference and web tools via HTTP 402 micropayments in USDC on Base, using the agent's wallet as identity.14419 npmMIT
- FlicenseAqualityBmaintenanceMCP server for a live x402 payment gateway on Base (USDC). Lets AI agents discover, preview for free, then pay per call — with prepaid gasless payments, signed receipts, and delta delivery.7-