Getting Started
For AI Agents
Give an AI agent a wallet in five minutes — and the guardrails to trust it with one. Furlpay is agent-native end to end: an MCP server for Claude and Cursor, LangChain / LlamaIndex tools, x402 pay-per-call rails, and TAP-style user mandates so an agent can only ever spend what its human signed off.
The mental model
Path 1 — MCP (Claude, Cursor, any MCP client)
Two servers, one config block. @furlpay/mcp-server exposes the full API (balances, checkouts, transfers, investing); @furlpay/travel-mcp adds autonomous travel booking with live flight inventory:
{
"mcpServers": {
"furlpay": {
"command": "npx", "args": ["-y", "@furlpay/mcp-server"],
"env": { "FURLPAY_API_KEY": "fp_live_sk_..." }
},
"furlpay-travels": {
"command": "npx", "args": ["-y", "@furlpay/travel-mcp"],
"env": { "DUFFEL_API_KEY": "duffel_test_..." } // omit everything for offline demo mode
}
}
}Restart your client and ask: "find me a hotel in Mexico City under $200/night and hold it with a single-use card." The agent searches, budget-checks, and authorizes — you approve the mandate.
Path 2 — LangChain / LlamaIndex
# pip install furlpay-langchain (or furlpay-llamaindex)
from furlpay_langchain import get_furlpay_tools
tools = get_furlpay_tools() # 12 tools: pay, invest, transfer, swap + x402 pay_for_resource
agent = create_tool_calling_agent(llm, tools, prompt)
# set_agent_budget caps autonomous spend before the first tool callPath 3 — x402: the agent pays for what it uses
No account, no API key, no card on file. The agent hits a metered endpoint, receives 402 Payment Required with a signed quote, pays in USDC and retries. Full protocol on the x402 page; selling your own API this way is one wrapper:
import { withX402 } from "@furlpay/x402";
export const GET = withX402(
async () => Response.json({ signal: "premium market data" }),
{ payTo: "0xYourAddress", network: "base", amount: "10000" }
);The 5-minute mandate
Budgets cap how much; mandates prove who allowed what. The user signs once, the agent signs each intent, and the rail verifies the chain before issuing any credential:
import { AgentTrust, generateKeypair, issueMandate, createBookingToken } from "@furlpay/agent-trust";
const user = generateKeypair("user"), agent = generateKeypair("agent");
// 1 · User consents: $500 trip, lodging+airlines, 7 days
const mandate = issueMandate({
userPrivateKeyPem: user.privateKeyPem, userPublicKeyPem: user.publicKeyPem,
agentKeyId: agent.keyId,
constraints: { maxTotalUsd: 500, mccAllowlist: ["7011", "4511"],
expiresAt: new Date(Date.now() + 7 * 864e5).toISOString() },
});
// 2 · Agent signs ONE exact intent per booking
const mandateToken = createBookingToken({
mandate, agentPrivateKeyPem: agent.privateKeyPem, agentPublicKeyPem: agent.publicKeyPem,
intent: { amountUsd: 320, source: "legacy", mcc: "7011" },
});
// 3 · The rail verifies the full chain — wrong amount, wrong MCC,
// replayed token, exhausted budget: all fail closed.Deep dive: Agent Trust & Mandates (TAP) · applied to bookings: FurlPay Travels.
Why builders pick Furlpay for agents
furlpay-examples on GitHub — every stack, clone-and-run.