Skip to main content
Your agent runs in a harness like OpenClaw or Hermes, on a server or a Mac mini with no browser. Without a browser on that machine, the harness can’t complete the OAuth consent that connecting an MCP client normally uses, so it connects with an agent API key instead: you mint the key once, on any device with a browser, and the harness presents it on every request. If a person can approve the connection from another device, some harnesses can use OAuth consent instead; see API key or OAuth consent on another device.

Prerequisites

  • An agent created on the Agents page.
  • A device with a browser for the one-time setup. It doesn’t have to be the machine the harness runs on.
  • For the first paid call only: a funded balance, and an active budget for the agent. Creating the agent on the Agents page sets up its budget. The harness can connect and introspect before the balance is funded.

Mint a key

  1. On a device with a browser, open the agent’s page from Agents at agentic.anchorage.com.
  2. Under API keys, select New key, enter a label that names where the key will live, such as mac-mini, and select Create key.
  3. Copy the key while the page shows it. It starts with agentic_ak_, and the page never shows it again.
Give each machine its own key, so you can revoke one without touching the others. For how long a key lasts and how many an agent can hold, see Authorization model.

Put the key where the harness reads secrets

Store the key where the harness’s process reads secrets, for example an environment variable such as AGENT_API_KEY. Keep it out of source control and logs: anyone who holds the key can spend from the agent’s budgets.

Point the harness at the MCP endpoint

Add Anchorage Agentic Banking to the harness as an MCP server, using the endpoint URL shown on the Agents page, and have it send the key as a bearer token on every request:
No sign-in step follows. The key authenticates as the agent, acting for its user, with the same budgets and crypto payment tools an OAuth session gets. To also run paid inference through the harness, add the inference endpoint as a custom model provider with the same key; the Inference page’s Connect your harness card shows the block for OpenClaw, Hermes, and other OpenAI-compatible harnesses. See Call a text model.

Make the first calls

  1. Have the agent introspect its identity first, to learn which budgets it may pay from; see Authorization model.
  2. Have the agent pay a paid URL from one of those budgets. It can price the URL first without paying. To find the payment afterward, see Where agent activity appears.

If the key is refused

When the MCP endpoint refuses a key that starts with agentic_ak_, it answers 401 with a JSON body whose type is invalid_api_key and whose detail starts with “Invalid or revoked API key.” This happens when the rest of the key is mistyped, the key was revoked, or the agent can no longer use it, and the answer is the same in every case. Check the agent’s page: if the agent is still active, mint a new key there and replace the old one where the harness reads secrets. A key whose agentic_ak_ prefix is itself mistyped gets a sign-in challenge instead, so check the prefix first. Both can connect the harness as the same agent. Pick by whether a person can finish a sign-in:
  • Use an API key when no one can sign in for the agent, such as a harness that runs unattended or restarts on its own, or a service that must reconnect without anyone present.
  • Use OAuth consent on another device when a person can approve the connection from a phone or laptop. Some harnesses support this in one of two ways. OpenClaw, for example, shows a sign-in link to open on another device and then asks you to paste back the address your browser lands on; the link opens the browser consent screen, where you pick any of your agents or create one. Other harnesses show a pairing code instead; enter it on another device, and the approval page lists your agents, most recently used first, with when each was last used and a search box when you have more than five. Choose one, select Continue, check the agent and what the app can do as that agent, then select Authorize. To connect as a new agent, select New agent; if you have no agents yet, the page opens on that step. Pick the same agent as before to keep its budgets and payment history. The page labels the app an unverified client and shows the callback site the app registered, and Cancel refuses the connection. A person has to approve a new connection from time to time, because the session ends 90 days after it starts, or after 14 days without use. A session the harness never uses counts those 14 days from when the harness finishes connecting.

Stop the agent

To cut off one machine, revoke its key on the agent’s page. The key stops working on its next request. To stop the agent everywhere, select Deactivate on the agent’s page, which ends every key and session it has at once; see Pause or revoke an agent.