> ## Documentation Index
> Fetch the complete documentation index at: https://docs.helix-db.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Foundry from your agent

> Connect Claude Code, Codex or another MCP client to the Helix MCP to read and ask Helix Foundry ontologies, and to set them up with a confirmation for most changes

Guide

Foundry's tools are on the Helix MCP, at `https://mcp.helix-db.com/mcp`. Connect your
agent to it, sign in once, and the agent works in Foundry as you: it reads your
ontologies, their versions, loads and graph, asks them questions, and makes the changes
you ask for, most after a confirmation. It can't add a connector's credentials, delete
connections, ontologies or documents, or change billing; those stay on the website.

## Connect your agent

The MCP signs you in with OAuth in your browser, with the account you use for Foundry.

> [tab] Claude Code
>
> ```bash theme={"languages":{"custom":["languages/helixql.json"]}}
> claude mcp add --transport http helix https://mcp.helix-db.com/mcp
> ```
>
> Then run `/mcp` in Claude Code and sign in.

> [tab] Codex
>
> ```bash theme={"languages":{"custom":["languages/helixql.json"]}}
> codex mcp add helix --url https://mcp.helix-db.com/mcp && codex mcp login helix
> ```

> [tab] Other clients
>
> Add `https://mcp.helix-db.com/mcp` as a remote (streamable HTTP) MCP server, and
> complete the browser sign-in when the client asks. Clients that discover OAuth
> find it at `https://mcp.helix-db.com/.well-known/oauth-protected-resource/mcp`.

Your agent acts with your role in each workspace and your rights on its Helix projects,
so it can do only what you could do on the website. The same endpoint serves Helix
Cloud's tools; see [Helix Cloud MCP](https://docs.helix-db.com/database/helix-cloud/connect/mcp.md).

For agents that should know Foundry's tools well, add Helix's agent skills:

```bash theme={"languages":{"custom":["languages/helixql.json"]}}
npx skills add HelixDB/skills
```

| Skill | Covers |
| - | - |
| `helix-foundry-onboarding` | Setting up a workspace's first ontology with you |
| `helix-foundry-mcp` | Reading and asking |
| `helix-foundry-actions-mcp` | Changes and their confirmations |

To add only the setup skill:

```bash theme={"languages":{"custom":["languages/helixql.json"]}}
npx skills add HelixDB/skills --skill helix-foundry-onboarding
```

### Set up a workspace with your agent

On a new workspace's **Get started** page, under **Or start with your own**, **Set up
with your agent** is chosen first: **Copy prompt** copies a prompt for Claude Code, Codex
or another agent with the Helix MCP. **Set up with your agent** on an unfinished
ontology's overview does the same from where that ontology stands. With no workspace or
account yet, tell your agent `setup https://foundry.new`, as the
[quickstart](https://docs.helix-db.com/foundry/start-here/quickstart.md) shows.

The prompt says how to connect the MCP, where setup stands and the steps left, and has
the agent follow the `helix-foundry-onboarding` skill if it has it. The agent asks you
before each change it makes.

![A new workspace's Get started page: the sample company card, then Or start with your own with Set up with your agent chosen and its Copy prompt](https://assets.helix-db.com/docs/foundry/start-here/onboarding.png)

## What your agent can read

| Tools | What they read |
| - | - |
| `helix_list_workspaces`, `helix_foundry_list_ontologies`, `helix_foundry_get_ontology` | Your workspaces, their ontologies, and an ontology's database, current version, current load and setup |
| `helix_foundry_get_context` | An ontology's schema and the example questions it answers, for the current load's version |
| `helix_foundry_get_version`, `helix_foundry_get_generation` | A version's definition, and a generation's goal, sources and outcome |
| `helix_foundry_get_load`, `helix_foundry_read_graph` | A load, and what it wrote: up to 20 graph reads per call |
| `helix_foundry_list_documents`, `helix_foundry_list_review_decisions` | The documents an ontology reads, and the review decisions people settled on it |
| `helix_foundry_list_reviews` | The current load's reviews, which `settle_review` settles |
| `helix_foundry_list_connectors`, `helix_foundry_list_connector_kinds`, `helix_foundry_get_sync` | The workspace's connections with their newest sync, one sync's status, and the kinds of source it can add, with which its plan includes |
| `helix_foundry_list_dashboards`, `helix_foundry_get_dashboard`, `helix_foundry_preview_dashboard_tile` | The workspace's dashboards, one dashboard's tiles, and what a tile would show before it is saved |
| `helix_foundry_get_ai_settings` | The provider and models the workspace's work runs on; only an owner changes them, in **Settings** → **AI models** |
| `helix_foundry_recall` | The notes sent to an API source, newest first or by keyword: see [Agent memory](https://docs.helix-db.com/foundry/agents/agent-memory.md) |
| `helix_foundry_read_guide` | Foundry's own guide to these tools |

Reading a load, through the graph or through questions, needs **Query read** on the
database's Helix project, as on the website.

## Ask questions

`helix_foundry_ask` asks an ontology's load a [question](https://docs.helix-db.com/foundry/ask/ask-questions.md) in
plain language, as [Founder](https://docs.helix-db.com/foundry/ask/founder.md) does, and waits up to 25 seconds for the answer. A
longer question carries on: the agent follows it with `helix_foundry_get_question`, which
waits up to 25 seconds each call, and stops it with `helix_foundry_cancel_question`. `helix_foundry_list_questions` lists the ontology's
questions. Questions asked through the MCP count against the same hourly limit and
monthly budget as those Founder asks.

In a client that draws MCP Apps, the answer shows as a card with its charts and tables,
and a link to the question in Foundry. Other clients get the answer as text.

## Changes, with a confirmation

Every change takes two calls. `helix_foundry_prepare_operation` checks the change and
returns a confirmation for it: one-time, valid for five minutes, and bound to that
operation, its target and its exact payload. `helix_foundry_execute_operation` uses the
confirmation and makes the change once. Agents with Helix's skills show you what they
are about to do and ask before they execute it.

| Operation | Does |
| - | - |
| `create_ontology` | Creates an ontology on an existing Helix database, or on a new one in a project the agent names or creates. The agent finds them with `helix_list_projects` and `helix_list_databases`. |
| `generate_ontology` | Asks Foundry's agent for a new draft, from the tables, API sources and document sets you choose |
| `revise_version` | Applies edits to a version as a new version, or previews them with `dry_run` |
| `set_current_version` | Makes a version current |
| `create_load`, `set_current_load` | Loads a version, or makes another load current |
| `sync_connector` | Syncs a connection now |
| `create_event_source` | Creates an [API source](https://docs.helix-db.com/foundry/data/api-sources.md), with an optional text field for extraction to read |
| `upload_document` | Starts a document upload; the agent sends the file, then completes it with `helix_foundry_complete_document_upload` |
| `create_document_set`, `update_document_set`, `move_document` | Makes, renames or describes a document set, or moves a document to another set |
| `settle_review` | Settles one of the current load's reviews, as on the website: see [Review](https://docs.helix-db.com/foundry/ontologies/review.md) |
| `add_sample_data` | Adds the Acme Corp sample company's connection and documents, for an ontology generated with the sample |
| `answer_generation_questions` | Answers the questions a generation waits on, which `helix_foundry_get_generation` lists; the agent asks you, never answers for you |
| `create_dashboard`, `update_dashboard`, `delete_dashboard` | Makes, changes or deletes a [dashboard](https://docs.helix-db.com/foundry/automate/dashboards.md). Any member except a [restricted member](https://docs.helix-db.com/foundry/workspace/access.md#restricted-members) can make one, change their own while it isn't pinned, and delete it while it is neither pinned nor published; owners and admins any. |
| `pin_dashboard`, `publish_dashboard`, `unpublish_dashboard` | Pins a dashboard in every member's sidebar, or publishes or removes its public snapshot link. Owners and admins only. |

A change is refused for the same reasons as on the website: your role, the database's
project rights, a sync or generation already running, the
[workspace's hourly generations](https://docs.helix-db.com/foundry/reference/limits.md#generations), or the month's
spending caps. Making a version current is refused if someone moved the current
version since the agent read it.

## Use cases

A use case is an agent's task over one ontology, such as answering support tickets.
Each run records the agent's request, every read, question, send and upload it makes
for it, and its answer, so you can see what the ontology gave the agent. Runs show on
the ontology's **Usage** page with an assessment of how much the ontology helped, which
uses AI models and counts toward the month's
[Run assessments](https://docs.helix-db.com/foundry/workspace/usage.md) cap.

| Tool | Does |
| - | - |
| `helix_foundry_create_use_case` | Creates a use case. Owners and admins only, signed in; they can also select **New use case** on the Usage page. |
| `helix_foundry_list_use_cases` | Lists an ontology's use cases. |
| `helix_foundry_start_use_case_run` | Starts a run when the agent takes on a request. The agent passes its id as `use_case_run_id` to the read, ask, send and upload tools while it works. |
| `helix_foundry_finish_use_case_run` | Finishes a run with the agent's answer. |
| `helix_foundry_get_use_case_run` | Reads a run and the calls it recorded. |

## Workflows

A [workflow](https://docs.helix-db.com/foundry/automate/workflows.md) runs steps for you on a trigger, as the person
who made it. Your agent reads
them with `helix_foundry_list_workflows`, `helix_foundry_get_workflow`,
`helix_foundry_list_workflow_runs` and `helix_foundry_get_workflow_run`. It can create,
update, pause, resume, run or delete one through the prepare and execute calls
(`create_workflow`, `update_workflow`, `pause_workflow`, `resume_workflow`,
`run_workflow`, `delete_workflow`). Any member can do this for their own workflows, except members limited to
[source grants](https://docs.helix-db.com/foundry/workspace/access.md), and owners and admins can also
pause or delete anyone's. A
workflow the agent creates, or whose steps it changes, runs only after its owner
approves it in Foundry.

## Connectors stay on the website

An agent never handles a connector's credentials. When you ask it to connect a source,
`helix_foundry_connect` gives it a link to open in your browser. For GitHub and Linear
you sign in at the provider, and the agent follows the sign-in with
`helix_foundry_get_sign_in`. For other kinds the link opens Foundry's **Add data** form
for that kind, in your workspace, such as
`https://foundry.helix-db.com/data?add=stripe&workspace=<id>`, where you enter the
credentials. The same tool signs a connection in again when it needs it.

[API sources](https://docs.helix-db.com/foundry/data/api-sources.md) hold no credentials, so an agent can create one,
send it pieces with `helix_foundry_send_pieces`, and read them back with
`helix_foundry_recall`, which makes a source the agent's
[memory](https://docs.helix-db.com/foundry/agents/agent-memory.md).

## Service credentials

For an agent that runs without a person, such as in CI, use a Helix
[service credential](https://docs.helix-db.com/cli/command-reference/service-credential.md) (`hlxs_…`) as the MCP's
bearer token instead of signing in: `--header "Authorization: Bearer hlxs_…"` for Claude
Code, or `bearer_token_env_var` in Codex's MCP config. Keep it in a secret store, never
in a prompt or a repository.

A service credential reaches only the ontologies whose database is in a project it is
granted, or that its sources cover, and only an ontology a person has set up.

| A service credential with | Can |
| - | - |
| **query-read** | Read those ontologies, their versions, loads, documents and graph, and ask them questions |
| **query-write** as well | Also make a version or load current, load, revise a version, and upload, move and organise documents |
| Sources, given under [Access](https://docs.helix-db.com/foundry/workspace/access.md) | Read and ask only what those sources hold of each ontology's current load, and change nothing |

To limit an agent to some of your data, make its key in Foundry under **Settings** →
**Access** → **Agents** and give it sources, rather than granting it a project.

It can't list or sync connections, generate drafts, create ontologies or API sources,
or settle reviews: those need a person.

An [API source's send token](https://docs.helix-db.com/foundry/data/api-sources.md#send-tokens) (`hx_ev_…`) works as a
bearer token too, and sees only `helix_foundry_send_pieces`, for its own source.

## Report a problem

`helix_feedback` sends Helix a bug, a missing capability or a confusing result, one
call per problem, without your data. Helix's skills have agents use it when something
goes wrong. Each caller can send 20 an hour, of up to 4,096 bytes each.

## Next steps

> [card] [API sources](https://docs.helix-db.com/foundry/data/api-sources.md)
>
> Send your app's or agent's data to Foundry.

> [card] [Agent memory](https://docs.helix-db.com/foundry/agents/agent-memory.md)
>
> Have your agent remember in an API source and recall it later.

> [card] [Ask questions](https://docs.helix-db.com/foundry/ask/ask-questions.md)
>
> How questions are answered, and their limits.

> [card] [Workflows](https://docs.helix-db.com/foundry/automate/workflows.md)
>
> Run steps on a schedule or when something happens, as you.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.