Guides
MCP server
Let any MCP client, such as a desktop assistant or an IDE agent, pay x402 requests within policy.
@unslept/mcp is a small stdio MCP server. It needs no install step: MCP clients start it with npx.
Tools
| Tool | What it does |
|---|---|
pay_x402_request | Fetch a URL and pay its 402 challenge, optionally with a maximum amount. |
get_balances | Liquid, parked, debt and net balance of the agent account. |
get_payment_history | Recent payments with amounts, fees, payees and transaction hashes. |
get_policy | Caps, what is left today, and whether the agent is paused or revoked. |
Configuration
{
"mcpServers": {
"unslept": {
"command": "npx",
"args": ["-y", "@unslept/mcp"],
"env": {
"UNSLEPT_AGENT_ACCOUNT": "<your agent account address>",
"UNSLEPT_SIGNER_KEY": "<agent signer key, from your secret store>",
"UNSLEPT_NETWORK": "robinhood-chain",
"UNSLEPT_CHAIN_ID": "4663",
"UNSLEPT_RPC_URL": "https://rpc.mainnet.chain.robinhood.com",
"UNSLEPT_USDG": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
"UNSLEPT_ROUTER": "0x1FeAB3B8f88FB0667B686fDCB0206194e88c984b",
"UNSLEPT_BUFFERS": "0xcD853fb30eCe3134Cf21e2f47B9e23eaf965F40D"
}
}
}
}