Agent Integration
KleePay gives agents a local interface for payment tasks without handing them an unrestricted card. Agents can inspect card metadata, request card and wallet actions, and create signed authorizations for specific payment intents.
Each authorization can be bounded by:
- card
- amount and currency
- merchant domain or merchant identifier
- TTL
Raw PAN and CVV stay out of the agent context.
Option A: let the agent set it up
First create a setup token from Devices.
Paste an instruction like this into Claude Code, Codex, OpenClaw, or another MCP-compatible agent:
Read https://klw.kleepay.ai/skill.md and set up KleePay on this device - setup token: <YOUR_TOKEN>
The agent should fetch the KleePay skill, install klw, bind the device, and expose the local MCP tools. Do not paste setup tokens into public or shared chats.
Option B: configure MCP manually
After klw is installed and the device is connected, configure the MCP client to run klw mcp.
For Claude Desktop:
{
"mcpServers": {
"kleepay": {
"command": "klw",
"args": ["mcp"]
}
}
}
For a generic MCP client:
{
"command": "klw",
"args": ["mcp"],
"env": {}
}
HTTP fallback
Agents without MCP support can use the local REST API:
http://127.0.0.1:7723
Authentication uses the bearer token stored at:
~/.kleepay/daemon_token
Example flows
Authorize a purchase
- Call
kleepay_list_cardsto choose an eligible card. - Call
kleepay_authorizewith card, amount, currency, merchant scope, and TTL. - Call
kleepay_check_txto confirm whether the authorization was used and how the charge settled.
The corresponding frontdesk surface is Activity (the real-time feed), not the settled-only statement export.
Check spending
- Call
kleepay_wallet_balancefor wallet balance. - Call
kleepay_wallet_historyfor recent wallet movement. - Call
kleepay_list_authorizationsfor active and upcoming authorizations.
Create a subscription card
- Call
kleepay_create_cardwith a label such assubscriptions. - Call
kleepay_wallet_allocateto fund the card. - Call
kleepay_recurringfor the merchant, amount, cadence, and card.