Hugo ask

Chat with your data, without handing it over

How a canister on an OpenCloud cloud engine stays the source of truth while ChatGPT or Claude asks the questions.

Most “chat with your data” products start the same way: you give the AI your data. You upload a CSV, sync a folder into a vector index, or paste a database connection string into a third-party dashboard. From then on there are two copies of your data, yours and the one the model sees, and you have to trust that they stay in step and that the second copy is looked after as carefully as the first.

Hugo ask is a small, non-commercial demo for learning that does it the other way round. The data lives in exactly one place: a Motoko canister running on an OpenCloud cloud engine. ChatGPT and Claude never receive the dataset. Either one connects through the ICP MCP connector, signs in with the user’s Internet Identity, and calls a few read-only query methods. The canister answers from its own rows, and the assistant turns those answers into language.

The model does the talking. The canister does the counting, and decides who may ask.

What the demo contains

The app is two canisters on an OpenCloud engine subnet.

The backend is written in Motoko. It holds a 500-row snapshot of the Tobi-Bueck/customer-support-tickets dataset, published by Tobi Bück under CC BY-NC 4.0. The full dataset has 61,765 tickets, far too many to compile into a canister, so the snapshot is stratified: English and German tickets both appear, along with every priority from very_low to critical. Each ticket has a subject, body, reply, type, queue, priority, language and up to three tags. The rows are compiled directly into the canister, so answering a question never involves a call to Hugging Face or any other outside service.

The frontend is a static Astro site served from an asset canister. It explains how the system works, shows the frontend canister id, and walks a user through connecting the ICP MCP connector in ChatGPT or Claude. It also has an Access page where people sign in and request access and where the admin approves them. The frontend publishes one other important file: /.well-known/ic-architecture, a small JSON manifest that lists the canisters belonging to this app.

There is no chat box on the website. You ask in ChatGPT or Claude.

How a question travels

sequenceDiagram
    autonumber
    actor User
    participant Assistant as ChatGPT or Claude
    participant MCP as ICP MCP connector
    participant FE as Frontend canister
    participant BE as Backend canister

    User->>Assistant: frontend canister id, then a question
    Assistant->>MCP: tool call (signed in with Internet Identity)
    MCP->>FE: GET /.well-known/ic-architecture
    FE-->>MCP: declared canisters: frontend, backend
    MCP->>BE: read Candid interface
    MCP->>BE: getApiDoc(), schema()
    BE-->>MCP: API guide + column catalogue
    Assistant->>MCP: execute({ filters, groupBy, count })
    MCP->>BE: execute(json) as the user's principal
    BE->>BE: run the query
    BE-->>MCP: rows of named cells
    MCP-->>Assistant: result
    Assistant-->>User: answer in plain language

First, the user adds the Internet Computer (ICP) plugin by DFINITY in ChatGPT, or adds the same connector in Claude at https://mcp.internetcomputer.org/mcp, and signs in with Internet Identity. The “Questions only” permission level is enough, because every data method is a query that cannot change state.

Next, the user pastes the frontend canister id into the chat. The Connect page shows that id. The connector opens the app from it and fetches the manifest. This is the trust boundary on the app’s side: the connector only calls canisters that the manifest declares.

The connector then reads the backend’s Candid interface, which is embedded in the Wasm module, and the assistant calls getApiDoc() and schema(). The API guide explains how to write a query. The schema lists every column, its type and what it means. With those two documents, the assistant can translate a question such as “How many high-priority tickets are in each queue? Then show me five German ones, subject and queue only” into one or two execute calls.

Finally, the canister on the OpenCloud engine runs the query against its own data and returns a page of rows, each a list of named cells. The assistant reads them and writes the answer.

A small, honest query language

execute takes a single JSON document. It isn’t SQL, and that’s intentional. A small language is easy for a model to learn from one page of documentation, and easy for a canister to run safely.

It supports:

Results come back in pages with a hard cap. When the long text fields (body or answer) are selected, a page holds at most 20 rows; otherwise it holds 50. A ticket body averages around 420 characters, so even a full-text page stays far below the Internet Computer’s 2 MB limit on query responses. A response includes hasMore, so the model knows when to fetch the next page.

Mistakes don’t crash anything. An unknown column, an unknown operator or a limit above the cap returns an error message, which the model can read and correct.

The aggregates are the point of the design. When the assistant says “there are 23 high-priority tickets in Technical Support,” that number was computed by the canister over the real rows. It wasn’t estimated by a model reading a sample of text, and it can’t come from a stale copy, because there is no copy.

Identity is the access control

Every call that reaches the backend through the connector is signed with the user’s Internet Identity. The canister therefore knows the caller’s principal on every request, without passwords, API keys or tokens pasted into a prompt.

Access control is a short list of principals kept in the backend. requestAccess never grants admin.

The website signs users in with a fixed derivation origin. As a result, the principal a user sees on the Access page is the same principal the connector presents when it calls the backend on that user’s behalf. So when the admin approves someone on the website, that person’s ChatGPT or Claude session can read the data, and disabling or removing them cuts it off again. No secret is ever shared with the model.

Why a cloud engine

OpenCloud cloud engines run canisters with zero cycles. The engine operator pays at the engine level, so the app itself doesn’t manage a token balance or top-ups. The design respects that model:

This divides the work cleanly. The engine provides cheap, always-on, tamper-resistant compute and storage for the data. The assistant provides language understanding. The user’s Internet Identity links the two.

What this demonstrates

Limits, stated plainly

Try it

  1. In ChatGPT, add the Internet Computer (ICP) plugin. In Claude, add the connector at https://mcp.internetcomputer.org/mcp. Sign in with Internet Identity and choose Questions only.

  2. Open the Hugo ask site, sign in on the Access page with that same Internet Identity, and request access. Wait for the admin to enable your principal.

  3. On Connect, copy the frontend canister id (dud23-qyaaa-aaac3-qaaba-cai) and paste it into the chat with a question:

    Frontend canister id: dud23-qyaaa-aaac3-qaaba-cai

    How many high-priority tickets are in each queue? Then show me five German ones, subject and queue only.

The assistant will read the API guide, look up the schema, query the canister and answer. Every number in its reply comes from the canister on the OpenCloud engine.


Dataset: Tobi-Bueck/customer-support-tickets by Tobi Bück, CC BY-NC 4.0. A 500-row stratified sample is used here as a non-commercial demo for learning.

Hugo ask is a non-commercial demo for learning. The tickets stay on an Internet Computer canister. An admin enables who may query them. The ICP MCP connector, in ChatGPT or Claude, asks the questions.