| Your agent… | Use | What it feels like |
|---|---|---|
| Chats + makes web requests (Hermes, OpenClaw, most LLM agents) | Device flow (this page) | Agent shows you a link → you approve in the browser → done. No localhost. |
| Controls its own browser (Claude Desktop, ChatGPT, Cursor via a bridge) | Native MCP OAuth | A browser popup opens automatically; you approve. |
| Runs a local subprocess | Stdio + API key | Paste a key into config. See Connect via stdio. |
pay_x402_service, pay_direct, list_recent_payments, get_wallet_info —
bounded by the per-tx and daily caps you set in Tally.
If you’re not sure, use the device flow — it works for any agent that can make
HTTP requests, including chat-only ones.
Fastest path: paste this into your agent
This drives the device flow, which works regardless of host (it doesn’t need your agent to open a browser or run a local listener).What you’ll experience
The agent shows you a single link likehttps://app.tallyforagents.com/device?code=WDJB-MJHT. You:
- Click it (it’s your own Tally domain).
- Sign in if needed, pick the workspace, mode (test/live), and agent.
- Click Authorize → you see “Connected — return to your agent.”
https://app.tallyforagents.com/device.
This is the same pattern as
gh auth login, the AWS CLI, and signing into apps
on a smart TV. For a chat-based agent it’s the simplest flow possible — the
“popup opens by itself” experience requires an agent that controls its own
browser (see below).Native browser popup (browser-driving hosts)
If your host drives its own browser and can catch an OAuth redirect (Claude Desktop, ChatGPT, or Cursor via themcp-remote
bridge), point it at the hosted endpoint and you get the automatic popup instead
of a code:
401 + WWW-Authenticate pointing at
/.well-known/oauth-protected-resource/mcp, which the host follows to open the
consent screen. On Hermes builds that support remote-MCP OAuth:
If your host only prints a link instead of opening the browser and catching
the response, it can’t complete this flow — use the device flow above
instead. That’s the common case for chat-based agents.
tly_test_… / tly_live_…) as a
bearer token, the same credential the stdio server takes.
The OAuth endpoints
Everything is advertised at the discovery document, so a host can wire itself up:| Endpoint | Purpose |
|---|---|
/oauth/register | Dynamic client registration (RFC 7591) → client_id. |
/oauth/device_authorization | Start the device flow (RFC 8628) → device_code + user_code. |
/oauth/authorize | Browser consent for the redirect/popup flow. |
/oauth/token | Exchange a code / device_code, or refresh. |
/oauth/revoke | Disconnect (revokes the whole session). |
wallet:read, wallet:transfer, x402:pay. Moving money requires
wallet:transfer. See OAuth 2.1 for the full protocol.
Grant a wallet permission
On first connect the agent has the tools but no spending power — Tally is non-custodial, so you authorize a wallet explicitly. Ask the agent “what’s my wallet?” (it callsget_wallet_info); it returns a dashboard URL. Open it,
Grant permission, pick a funded wallet, set the per-tx + daily caps, and
approve via passkey. Grants are mode-scoped — a test-mode grant won’t show in
live mode.
Switching workspaces
The token is bound to the workspace you picked, so switching is a re-auth: run the connect flow again and choose a different workspace, or revoke first via/oauth/revoke (on Hermes, hermes mcp logout tally).
Skill install (Hermes / OpenClaw)
For hosts that use a skill manifest instead of (or alongside) MCP, Tally publishes one:TALLY_API_KEY and teaches the agent
to call Tally’s REST API directly. Use the device flow above when you want OAuth
(no key); use the skill when you want “install + paste a key.”
What’s happening under the hood
- Every entry point runs the same enforcement: the Tally policy check (caps, allowlists, expiry) then Privy’s secure-enclave signature. The MCP/OAuth layer can’t widen those caps.
- The access token only ever sees the workspace + mode you chose on the consent screen, and it expires (the agent silently refreshes).
- Payments show up in the dashboard’s Transactions tab with the same metadata as SDK or stdio calls.
See also
- Connect via stdio — the API-key subprocess path.
- OAuth 2.1 — the full protocol, including the device grant.
- MCP server reference — tool inputs, outputs, and error shapes.