Open-source EIP-2612 Permit-based wallet sessions for AI agents using MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Open-source EIP-2612 Permit-based wallet sessions for AI agents. The reference implementation for paid MCP servers β verify signatures, manage sessions, settle on-chain. No API keys. No recurring charges.
A human connects their crypto wallet, signs a one-time EIP-2612 Permit (gasless β no transaction fee), and receives a session token. AI agents use this token in MCP requests to pay for tool calls with USDC on Base. The server settles each call on-chain via transferFrom.
No API keys. No recurring charges. No per-call wallet signatures. The permit is the policy.
This is the reference implementation used by mcpvot.xyz β an x402 payment facilitator for MCP servers. The open-source core (@mcp-agentic-wallet/core) is framework-agnostic and works with any MCP server or Next.js app.
Visit http://localhost:3000/wallet to connect a wallet and authorize a session.
@mcp-agentic-wallet/core)| Class/Function | Description |
|---|---|
InMemoryStore | Session store (in-memory, pluggable for KV/Redis) |
verifyPermit() | Verifies EIP-712 Permit signature on-chain via viem |
settleCall() | Executes transferFrom(human, treasury, amount) on Base |
submitPermit() | Submits the permit() transaction to USDC contract |
checkAllowance() | Reads on-chain USDC allowance for an ownerβspender pair |
checkRateLimit() | Simple rate limiter (per-wallet) |
toSessionInfo() | Converts session to safe client-facing info (no permit signature) |
See SECURITY.md for the full threat model.
Key features:
spender === treasuryMCPVOT uses this wallet to power on-chain sim-racing events:
transferFrom settles the entry to the escrow contractThe iRacing MCP tools (get_race_results, lookup_driver, search_hosted_races) are available at mcpvot.xyz and use the same session-token flow for payment.
| Env Var | Required | Default | Description |
|---|---|---|---|
TREASURY_ADDRESS | Yes | β | Address that receives USDC payments |
HOT_WALLET_PRIVATE_KEY | Yes | β | EOA private key for gas (never commit to git!) |
BASE_RPC_URL | No | https://mainnet.base.org | Base Mainnet RPC |
NEXT_PUBLIC_TREASURY_ADDRESS | Yes | β | Treasury shown in wallet UI |
MIT β see LICENSE
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-agentic-wallet-open-source-session-management-for-x402)<a href="https://allmcps.com/mcp/mcp-agentic-wallet-open-source-session-management-for-x402"><img src="https://allmcps.com/api/badge/mcp-agentic-wallet-open-source-session-management-for-x402?style=directory" alt="MCP Agentic Wallet β open Source session management for x402 on AllMCPs" /></a>