Run an OpenClaw agent on Thirdfy
Give an OpenClaw agent its own Thirdfy agent key, store it as a runtime secret, connect it over MCP, and let it read markets and trade from its own wallet within its limits.
Your OpenClaw agent runs on its own, so it can't sign in through a browser. It uses an agent key instead. You get the key once, store it in OpenClaw's runtime secrets, and point OpenClaw's MCP connector at Thirdfy. Then the agent reads markets, checks venues and trades from its own wallet, within the limits you set.
What you need
- An OpenClaw runtime that can add a remote MCP server with a custom header.
- A Thirdfy agent and its agent key (
agent-...). Step 1 shows how to get one. - Funds in the agent's execution wallet, if you want it to trade. It can read without them.
1. Get an agent and its key
You do this once, in the Thirdfy dashboard.
- Sign in at thirdfy.com and open Agents. Create an agent for OpenClaw, or pick one. Use a separate agent with only the funds you want it to use.
- Set its per-trade and daily limits and the actions it may run on its Policy page.
- Open Connect, go to Agent key and create the key. It is shown only once, so save it in your password manager.
Create a new key rotates the key. Revoke and pause stops it and pauses the agent.
Without the dashboard
If you can't use the dashboard, sign up by email instead. Over MCP, connect to https://mcp.thirdfy.com/mcp/public and call startEmailOnboarding, then completeEmailOnboarding with the code and acceptTerms: true. The key is in data.bootstrap.agentApiKey. The CLI does the same with thirdfy-agent login email. See Agent CLI authentication.
2. Store the key as a runtime secret
Save the key in OpenClaw's runtime secrets as THIRDFY_AGENT_API_KEY.
Never put the key in prompts, skill files, logs or tool arguments.
3. Connect OpenClaw to Thirdfy
Point OpenClaw's MCP connector at https://mcp.thirdfy.com/mcp (streamable HTTP), and send the key as a header:
The exact file and variable syntax depend on your OpenClaw pack. Thirdfy reads the key from the header on every call, so your agent can act only for itself.
Check the connection from a shell:
4. Make a first read
Ask your agent to call a read. Nothing is signed or sent.
Have the agent call getProviderActions before it plans. Then it uses only actions it is allowed to call, with the names discovery returns.
5. Preview, then run a trade
The agent trades from its own execution wallet (agent_wallet). Before a write, it follows these steps:
- Check the wallet.
agentWalletBootstrapwithrequireFundingCheck: trueshows the execution wallet and whether it is funded. Fund that wallet, not your login wallet. - Check the venue. Call
getVenueReadinessfor the venue, for example Hyperliquid. Go on only whenreadyistrueandblockingReasonsis empty. - Preview. Call
previewOrderwith the same arguments as the trade. It shows whether Thirdfy would run it. Nothing moves. - Run. Call
agentRunorwalletExecutewith the same arguments.
If a write answers CONFIRMATION_REQUIRED, repeat the call with the confirmationToken only after you agree to the summary.
What happens before every trade
- Your agent's limits apply. Thirdfy checks the action allowlist, the daily limit, any delegation and credits on every write. If one check fails, nothing runs.
- Venues are checked. Thirdfy refuses a venue order when the venue isn't ready, and says why. Run the venue onboarding tools before the first Polymarket, Hyperliquid or Lighter write.
- The key stays yours. If a call names a different key in its arguments, it fails with
AGENT_IDENTITY_MISMATCH. - No double orders on hosted runtimes. Runtimes hosted on EarnOrg pass
executionContext(runtimeId,orgId) onwalletExecute,executeIntentandagentRun. This ties credits and duplicate-order protection to the right runtime. Place orders there need anidempotencyKeythat starts withearnclaw:<runtimeId>.
If something goes wrong
| What you see | What to do |
|---|---|
401 Authentication required | Send Authorization: Bearer <agent key> on the connector, and check the secret is set in the runtime |
AGENT_IDENTITY_MISMATCH | A different key was passed in the tool arguments. Remove it |
LIVE_GATE_OFF | Thirdfy's checks returned executeAllowed: false. Fund the wallet or fix the venue credentials |
Venue readiness shows blockingReasons | Fund or set up the venue first. Run the venue onboarding tools |
403 ... is not allowed | The action is not on the agent's allowlist. Allow it on the agent's Policy page in Agents, or pick another action |
POLICY_DAILY_LIMIT | The agent's daily limit is used up |
DAILY_FREE_LIMIT_EXCEEDED | The free daily requests (data reads only) are used up and the Credits balance is empty. Writes are always paid in Credits. Top up at thirdfy.com/credits |
| Idempotency rejected | On a hosted runtime, use an idempotencyKey that starts with earnclaw:<runtimeId> |
For developers
| MCP URL | https://mcp.thirdfy.com/mcp (streamable HTTP, agent key header) |
| Header | Authorization: Bearer agent-... (X-API-KEY: agent-... works too) |
| No account | https://mcp.thirdfy.com/mcp/public: catalog, signals, help, and email or wallet onboarding |
| Tool REST | POST https://mcp.thirdfy.com/tool/<toolName> |
| Scoped identity | bootstrapSelfIdentity sets up a limited identity without email |
Check the connection from the runtime's machine:
Hermes can connect over MCP the same way: point its connector at https://mcp.thirdfy.com/mcp with the same header.
OpenClaw can use the Agent CLI instead of MCP. Keep THIRDFY_AGENT_API_KEY and THIRDFY_AGENT_KEY (the agent's 0x address) in the runtime secrets, and have the agent run thirdfy-agent actions --provider <id> before it plans:
The agent runs on its own wallet (agent_wallet, the default). Add --signer user only when your own wallet signs locally, and use agent run --signer-method fanout_intent for fan-out after delegation is ready. The old run modes thirdfy and hybrid still parse and run as agent_wallet. The full CLI setup (secrets, startup checks, each cycle) is in Run a Hermes agent; it works the same for OpenClaw.
Add the Thirdfy skills
Skills teach your agent how to use Thirdfy: when to check a venue, how to preview a trade, and when to ask you first. In OpenClaw, add this repository as a skill source and install the thirdfy skill:
Add thirdfy-market-data or thirdfy-hyperliquid-perps-read for market reads. The skills never hold keys. The agent still uses the secrets from step 2.