Skip to content
ATG.H2OHelp
Try the demo

Connecting with an API key

Manual — AI agents · chapter 3 of 7

Use this path for agents built by your team, automations and command-line tools.

  1. Under System › API Keys, click New key.
  2. Give it a name that identifies the agent, for example “On-call agent”.
  3. Under Scopes, tick mcp and read. Also tick write only if the agent will open tickets or record follow-ups.
  4. Set the Limit/hour and, if you wish, the Expires.
  5. Click Create key and copy the key: it is shown only once.

The key acts as the user who created it. For a read-only agent, the best practice is to create the key with a user that has only the read rights it needs.

The agent sends the key in the Authorization header, as Bearer followed by the key. In Claude Code, for example:

Janela do terminal
claude mcp add --transport http h2o https://SERVER-ADDRESS/api/v1/mcp --header "Authorization: Bearer YOUR_KEY"

In tools that ask for the authentication type, choose API key in a header, with the Authorization header and the value Bearer followed by the key. A direct call to the server looks like this:

POST /api/v1/mcp
Authorization: Bearer YOUR_KEY
Accept: application/json, text/event-stream
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}

Was this page helpful?