If your AI agent speaks the Model Context Protocol, this is the fastest way to give it a wallet. You add four lines to a config file, restart your agent, and it now has tools to pay for paywalled APIs (x402), send USDC, and read its own transaction history — all bounded by per-tx and daily caps you set in Tally. This guide is for the user side. If you’re an LLM helping a human set this up, the MCP server reference has a dedicated AI-assistant playbook section.Documentation Index
Fetch the complete documentation index at: https://docs.tallyforagents.com/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll have at the end
A working AI agent that, when you ask “what’s the weather in Tokyo?”, decides on its own to:- Call the x402-paywalled weather endpoint
- Receive
402 Payment Requiredwith terms (0.05 USDC to a specific address) - Pay via Tally — your wallet, your scoped permissions
- Retry with proof, receive the data
- Answer you
pay_x402_service, pay_direct, list_recent_payments, get_wallet_info.
Prerequisites
- A Tally account with a funded testnet wallet (Quickstart walks through this in 3 minutes).
- A Tally API key (Dashboard → API keys → Create —
tly_test_…). - An MCP-aware AI client. Confirmed working: Claude Desktop, Cursor, Hermes, Cline, Goose.
Step 1 — Add the server to your client config
Step 2 — Restart your agent
Quit and relaunch your MCP client. On startup it spawnsnpx -y @tallyforagents/mcp-server as a subprocess and discovers its tools.
You can confirm the connection by asking the agent: “what tools do you have for Tally?”. It should list pay_x402_service, pay_direct, list_recent_payments, get_wallet_info.
Step 3 — Grant the agent a wallet permission
On first connect, the server auto-creates a Tally agent calledmcp-default in your account. But it has no spending permissions yet — you have to authorize a wallet before any payment can happen. (This is by design — Tally is non-custodial, so the human wallet owner consents to every signer.)
Ask the agent: “What wallets can you spend from?”
It’ll call get_wallet_info, see no permissions, and respond with something like:
This agent has no spending permissions yet. Visit the dashboard to grant one: https://app.tallyforagents.com/{your-slug}/agents/mcp-defaultClick that URL → Grant permission → pick your funded wallet → accept the default caps (100 daily — easy to lower or raise) → approve via passkey. Restart your MCP client one more time so the server picks up the new permission.
Step 4 — Try it
Ask your agent something that needs payment. The hosted demo endpoint Tally runs returns weather for any city, paywalled at 0.05 USDC:Get the weather in Tokyo from https://app.tallyforagents.com/api/demo/x402-weatherThe agent will call
pay_x402_service, the server will pay 0.05 testnet USDC from your wallet, retry the request, and the agent will summarize the weather for you. Open your Tally dashboard’s transactions tab — the payment is there.
Common follow-up tasks
Use a custom agent name
By default the server auto-createsmcp-default. If you want the agent to use a name you choose (so you can manage multiple MCP-connected agents from one Tally account):
- Register the agent in the dashboard first (Dashboard → Agents → Register agent), name it whatever you like.
- Grant it a wallet permission.
- Set
TALLY_AGENT_IDin your MCP client config:
hermes.
Tighten the per-call spending cap
The agent’s policy ceiling is set in the dashboard ($10/tx default). For an extra defensive layer, the LLM can includemax_amount_usdc per call:
Search arxiv via https://paid-arxiv.example.com, but don’t spend more than $0.10 per query.The agent will pass
max_amount_usdc: "0.10" and the server will throw before paying anything above that.
Share one agent across multiple clients
If you want Claude Desktop and Cursor and Hermes to all act as the same Tally agent (so the transaction history is unified), set the sameTALLY_AGENT_ID in every client’s config. The single agent has one permission per wallet; all three clients spend from the same caps.
Troubleshooting
Agent reports “no spending permissions”: you haven’t granted a wallet in the dashboard yet, or you granted it after the MCP server started. Restart the MCP client. Tools don’t appear after restart: check the MCP client’s logs (Claude Desktop has a MCP log viewer in settings). If you seeTALLY_API_KEY is required, the env block in your config wasn’t picked up — check the JSON/YAML syntax and that the API key is wrapped in quotes.
Payment fails with policy_denied: the request exceeded your wallet’s per-tx or daily cap. Either lower the request or raise the cap in the dashboard (Agents → {your agent} → edit permission).
unauthenticated errors: API key is invalid, revoked, or in the wrong account. Generate a new one in the dashboard.
What’s happening under the hood
- The MCP server runs as a local subprocess of your agent. Your API key never leaves your machine.
- The server is a thin wrapper around the Tally SDK — same enforcement rules, same audit trail. Every payment shows up in the dashboard with the same metadata as SDK calls.
- The agent identity (
mcp-defaultor your customTALLY_AGENT_ID) is the same one you manage in the dashboard. Granting/revoking permissions, rotating keys, viewing transactions, setting webhooks — all the dashboard tools apply. - Tally is non-custodial. The server holds your API key, but spending is always bounded by the wallet owner’s signed permission policy (enforced server-side by Tally and again by Privy’s secure enclave). The MCP server can’t change those caps.
Next steps
- MCP server reference — full tool docs, env vars, error shapes.
- Permissions — how the per-tx and daily caps work.
- Webhooks — get notified when the agent makes a payment.
- Want code-level control instead? Use the SDK directly.