# Helix Foundry and HelixDB Authentication for AI Agents

This site is Helix Foundry's home, and HelixDB's. Agents reach both through the Helix MCP, https://mcp.helix-db.com/mcp, which serves Helix Foundry's tools and HelixDB's. It takes a person's OAuth sign-in, and an agent without an account can register at https://mcp.helix-db.com/auth.md to sign its user up. HelixDB database queries use separate credentials: a Helix Cloud cluster API key, or none on a local server. This document describes the authentication surfaces that exist today.

## Discover

For Helix Foundry, and HelixDB's tools on Helix Cloud, start with the Helix MCP and its authoritative RFC 9728 protected-resource metadata:

- MCP server: https://mcp.helix-db.com/mcp
- Protected-resource metadata: https://mcp.helix-db.com/.well-known/oauth-protected-resource/mcp
- Agent registration: https://mcp.helix-db.com/auth.md
- Helix Foundry's setup prompt for an agent, which walks through sign-in or sign-up: https://foundry.new
- Helix Foundry MCP guide: https://docs.helix-db.com/foundry/agents/helix-mcp
- HelixDB MCP setup guide: https://docs.helix-db.com/database/helix-cloud/connect/mcp

The MCP metadata identifies the current authorization server. Fetch it at runtime instead of hard-coding the authorization-server origin.

For database queries, start with the HelixDB HTTP API documentation and OpenAPI specification:

- HelixDB HTTP API documentation: https://docs.helix-db.com/database/helix-db/query-guides/http-api
- HelixDB OpenAPI specification: https://www.helix-db.com/openapi.json
- Helix Cloud security: https://docs.helix-db.com/database/helix-cloud/operate/security

## Pick a method

- A person with a Helix account: an OAuth-capable MCP client connects to the Helix MCP, and the person signs in to Helix in the browser and allows it. The agent then acts with that person's role.
- An agent whose user has no Helix account: it registers as https://mcp.helix-db.com/auth.md says, and its user claims the registration with their email. Its registration can't use Helix Foundry's tools; the user's own sign-in can.
- Helix Cloud query gateways use a cluster API key and database ID supplied through the dashboard or `helix sync`.
- Local HelixDB servers do not require authentication by default. A local Helix Foundry install has no sign-in and listens on this computer only.

Agent registration is run by the issuer https://mcp.helix-db.com/auth.md names, with the methods that page lists. This site runs no registration endpoint of its own.

## Register

For the Helix MCP with a person's sign-in, use an OAuth-capable MCP client. The client connects to https://mcp.helix-db.com/mcp, follows the `WWW-Authenticate` protected-resource metadata link, and completes the browser authorization flow.

For an agent signing its user up, follow https://mcp.helix-db.com/auth.md step by step: register, keep the secrets it returns in the system keychain, and exchange the registration's assertion for a short-lived access token, with `resource` set to https://mcp.helix-db.com/mcp. https://foundry.new says what to do with it next: the `helix_get_started` tool makes a one-month Helix sandbox, and the user claims it.

For database queries, an authorized Helix Cloud user creates or rotates a cluster API key in the dashboard. HelixDB does not expose a `register_uri` or an `agent_auth` registration endpoint for creating one.

Do not send cluster keys, registration secrets or access tokens to discovery endpoints, or put them in source control, agent instructions, `llms.txt`, or catalog manifests.

## Claim

An agent's registration is claimed with the claim ceremony https://mcp.helix-db.com/auth.md describes: the agent gives its user a link, the user signs in or signs up there, and reads back the code the page shows. Once claimed, the user adds the Helix MCP and signs in with the same email to use Helix Foundry's tools.

Cluster API keys and the MCP's browser sign-in have no claim step.

## Use the credential

For the Helix MCP, let the client store and present the OAuth access token. A registered agent sends its access token as `Authorization: Bearer <access-token>` and exchanges its assertion again when the token expires. Do not copy a token into prompts or agent-readable documentation.

Send a Helix Cloud cluster API key and database ID with each query request:

```http
Authorization: Bearer <cluster-api-key>
X-Helix-Database-Id: <database-id>
```

## Errors

- An MCP `401 Unauthorized` includes `WWW-Authenticate: Bearer resource_metadata="https://mcp.helix-db.com/.well-known/oauth-protected-resource/mcp"`. Follow that metadata link and restart OAuth.
- Agent registration's errors, and what to do about each, are listed in https://mcp.helix-db.com/auth.md.
- A Helix Cloud query `400 Bad Request` means the authentication header is missing or malformed. A `401 Unauthorized` means the supplied cluster API key is invalid. Re-check the selected database and rotate the key if necessary.
- A Helix Cloud query `402 Payment Required` means query processing is disabled because credit is exhausted. A `403 Forbidden` means the key lacks permission for the requested operation.
- A Helix Cloud query `408 Request Timeout` means the query exceeded its wall-clock limit and can be retried according to the application's retry policy.

## Revocation

- For the Helix MCP, disconnect it in the client and remove the stored connection credential. The authorization server's metadata names its token revocation endpoint.
- Revoke an agent registration as https://mcp.helix-db.com/auth.md says, then delete its stored secrets.
- Revoke or rotate a cluster API key in the Helix Cloud dashboard, then update every authorized client that used it.

## Support

- Developer resources: https://www.helix-db.com/developers
- Terms: https://www.helix-db.com/terms
- Privacy: https://www.helix-db.com/privacy
- Support: https://discord.gg/2stgMPr5BD
