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.

  1. 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.
  2. Set its per-trade and daily limits and the actions it may run on its Policy page.
  3. 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:

{
  "mcpServers": {
    "thirdfy": {
      "url": "https://mcp.thirdfy.com/mcp",
      "headers": {
        "Authorization": "Bearer ${THIRDFY_AGENT_API_KEY}"
      }
    }
  }
}

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:

curl -s https://mcp.thirdfy.com/health
curl -s -X POST https://mcp.thirdfy.com/tool/getProviderActions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $THIRDFY_AGENT_API_KEY" \
  -d '{"provider":"hyperliquid","view":"concise"}'

4. Make a first read

Ask your agent to call a read. Nothing is signed or sent.

walletExecute { action: "get_openmarket_btc_funding" }

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:

getProviderActions → agentWalletBootstrap (requireFundingCheck: true) → getVenueReadiness
  → previewOrder → agentRun / walletExecute
  1. Check the wallet. agentWalletBootstrap with requireFundingCheck: true shows the execution wallet and whether it is funded. Fund that wallet, not your login wallet.
  2. Check the venue. Call getVenueReadiness for the venue, for example Hyperliquid. Go on only when ready is true and blockingReasons is empty.
  3. Preview. Call previewOrder with the same arguments as the trade. It shows whether Thirdfy would run it. Nothing moves.
  4. Run. Call agentRun or walletExecute with 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) on walletExecute, executeIntent and agentRun. This ties credits and duplicate-order protection to the right runtime. Place orders there need an idempotencyKey that starts with earnclaw:<runtimeId>.
{
  "runtimeId": "<runtime-uuid>",
  "orgId": "<org-uuid>"
}

If something goes wrong

What you seeWhat to do
401 Authentication requiredSend Authorization: Bearer <agent key> on the connector, and check the secret is set in the runtime
AGENT_IDENTITY_MISMATCHA different key was passed in the tool arguments. Remove it
LIVE_GATE_OFFThirdfy's checks returned executeAllowed: false. Fund the wallet or fix the venue credentials
Venue readiness shows blockingReasonsFund or set up the venue first. Run the venue onboarding tools
403 ... is not allowedThe action is not on the agent's allowlist. Allow it on the agent's Policy page in Agents, or pick another action
POLICY_DAILY_LIMITThe agent's daily limit is used up
DAILY_FREE_LIMIT_EXCEEDEDThe 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 rejectedOn a hosted runtime, use an idempotencyKey that starts with earnclaw:<runtimeId>

For developers

MCP URLhttps://mcp.thirdfy.com/mcp (streamable HTTP, agent key header)
HeaderAuthorization: Bearer agent-... (X-API-KEY: agent-... works too)
No accounthttps://mcp.thirdfy.com/mcp/public: catalog, signals, help, and email or wallet onboarding
Tool RESTPOST https://mcp.thirdfy.com/tool/<toolName>
Scoped identitybootstrapSelfIdentity sets up a limited identity without email

Check the connection from the runtime's machine:

curl -s https://mcp.thirdfy.com/health
curl -s -X POST https://mcp.thirdfy.com/tool/getProviderActions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $THIRDFY_AGENT_API_KEY" \
  -d '{"provider":"hyperliquid","view":"concise"}'

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:

npm install -g @thirdfy/agent-cli@0.6.8
thirdfy-agent actions --provider hyperliquid --json
thirdfy-agent venue readiness hyperliquid --json

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:

https://github.com/thirdfy/thirdfy-skills

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.