Guide
Once an ontology is loaded, your agents can ask it what your people ask
Founder, through the Helix MCP. The answer cites each
entity, fact, row and document quote it read, so the agent can show where it came from.
This page covers connecting an agent and the read tools it uses. To have an agent set up
an ontology, see Use Foundry from your agent.
Connect your agent
The MCP is athttps://mcp.helix-db.com/mcp for Foundry at foundry.helix-db.com, and
at http://localhost:8081/mcp for Foundry
on your own computer. Hosted, it signs you in with OAuth in your
browser, with the account you use for Foundry, and acts with your role and rights.
- Claude Code
- Your own agent
/mcp in Claude Code and sign in.Ask a question
A typical agent works in four steps.1
Find the ontology
helix_list_workspaces lists your workspaces. helix_foundry_list_ontologies lists
a workspace’s ontologies with their current version and load.2
Learn what it holds
helix_foundry_get_context returns the ontology’s schema (each type’s properties,
key and names, and its links, rules and constraints) and the questions Foundry
suggests for it. It describes the version of the current load.3
Ask
helix_foundry_ask takes workspace_id, ontology_id, the question in plain
language and a client_token: a new UUID per question, which the agent keeps. The
same token returns the same question instead of asking again, so a retry is safe.thread_id to follow up in a thread,
focus for the entity the question is about, load_id to ask a load other than the
current one, and valid_at (YYYY-MM-DD) to answer as of a past day.4
Follow it to the end
A question’s
status is queued, running, answered, cannot_answer, failed or
cancelled. Until done is true, call helix_foundry_get_question with its
question_id; each call waits up to 25 seconds. result holds the answer and its
citations. helix_foundry_cancel_question stops one that no longer matters.helix_foundry_list_questions lists an ontology’s questions, newest first, with the
workspace’s question budget. Questions asked through the MCP count against the same
hourly limit and monthly budget as questions asked in Foundry; see
Limits and spending.
An answer is built from your data, and your data can hold anything. The tools mark
what they return as untrusted content. Have your agent treat it as data, never as
instructions.
Read exact records
For exact lookups, rather than a question in plain language, the agent reads the graph itself.helix_foundry_read_guide returns the reads it can make and their JSON Schema.
helix_foundry_read_graph makes 1 to 20 of them per call: typed queries over entities
and facts, the evidence and source behind a fact, why a derived fact holds, and rule
breaks. An entity is named by its id, its key’s values, such as
{"type": "Account", "key": "ACC-1023"}, or a name.
An answer’s queries come without their rows. To see the rows behind one of its charts or
tables, the agent reads that query again with helix_foundry_read_graph, on the
question’s load_id.
Who can query
The agent can read only what you can read. Reading a load, through the graph or through questions, needs Query read on the database’s Helix project, or sources shared with you under Access. A service credential needs query-read on the project, or sources given to its key. See Members and roles.On your own computer
Foundry’s open-source install serves the same query tools athttp://localhost:8081/mcp, on this computer’s loopback only. It has no sign-in: the agent sends the install’s
owner token as a bearer. Load it into your environment without printing it, from the
repository’s root:
.mcp.json; Claude Code expands
${FOUNDRY_LOCAL_TOKEN} as it starts the server, so the file holds no secret:
FOUNDRY_MCP_PORT, use that port.
Ask over HTTP
An app without an MCP client can ask the local install over HTTP:POST http://localhost:8081/v1/ontologies/<ontology-id>/ask with the same bearer,
Content-Type: application/json, an Idempotency-Key of at most 64 bytes, and
{"question": "…"}. It waits up to 25 seconds, then answers 200 with the question
done, or 202 with a Location to GET until done is true. Reuse the idempotency key
after a lost response. The repository’s
Python example
wraps this as one agent tool.
Hosted Foundry doesn’t serve these HTTP routes yet. Use the MCP.
Next steps
Use cases on the sample company
Four questions worth money or time, and how an agent asks them.
Security and data handling
What Foundry stores, and what reaches AI models.