Skip to main content

Connect an assistant

Qry Nexus is also an MCP server. Connect an assistant such as Claude to it and you can ask questions about the data products granted to you, in the assistant you already use. The assistant acts as you: it sees only your products, with your row filters and masked columns, and every read is audited.

Everything on this page starts from Nexus → API Gateway → Connect an assistant, which also shows your instance's server URL. It is the address of your Qry followed by /api/v1/mcp, for example https://qry.your-company.com/api/v1/mcp.

What the assistant can do​

Four tools, all read-only:

ToolWhat it does
nexus_list_productsthe products you can read: name, title, domain, description, datasets, freshness
nexus_describe_producteach dataset's columns with their types and the owner's description of each, its row key, three sample rows of your view, and whether your view is row-filtered or has masked columns
nexus_queryreads a dataset with the columns, filters, groups, totals and order the assistant chooses. The database does the work and only a small result comes back: at most 1,000 rows
nexus_exportthe whole read as a Parquet or CSV download link, to analyse the file locally

The assistant never writes SQL: it says which columns, filters (eq, in, between, like, is_null and so on), groups and aggregates (count, count_distinct, sum, avg, min, max) it wants, and Qry builds the query for the dataset's engine.

  • Dates can be grouped by period: year, quarter, month, week (starting on Monday) or day, computed by the database. A group by month of admission_date comes back as admission_date_month, the first day of each month.
  • A request Qry does not understand is refused, not guessed. A misspelt option, for example "direction": "desc" instead of "desc": true to sort largest first, is an error the assistant sees and corrects. It is never silently ignored, which would give a plausible answer in the wrong order.
  • A read returns at most 1,000 rows. If the assistant asks for more, the answer says that the limit was lowered; for the whole result it should use an export.
  • There are no joins. Each dataset is read on its own, so a question that needs two datasets together needs a dataset prepared that way by the product's owner.

Export links work once, for 15 minutes, and the grant is checked again when the file is downloaded. An export of more than 100,000 rows is refused when downloaded (HTTP 413), never cut short, because a file silently missing rows gives wrong totals. The assistant should narrow the read (filters, fewer columns, a group by) and try again. Download with curl --fail, so that a refusal is not saved as if it were the file:

curl --fail -o sales.parquet '<the link the assistant was given>'

Claude Code​

If your Claude organization already has the Qry Nexus connector (see Claude Desktop, claude.ai and Cowork) and you are signed in to Claude Code with the same Claude account, it is already there: run /mcp to see it. It calls Qry from Anthropic's cloud, like claude.ai, and export links still download to your computer.

To connect Claude Code directly from your own computer instead, which works wherever your computer reaches Qry, VPN included, use a Nexus access token:

1. Create a Nexus access token​

In Connect an assistant, give the token a name (for example Claude Code, laptop), choose when it expires (7, 30, 90 or 180 days; 30 by default, 180 at most) and click Create token.

The token starts with qry_nx_ and is shown only once: copy it now. It is personal and only reads Nexus data products. It cannot chat, run queries or change anything else in Qry. One token per device or assistant makes revoking one easy.

2. Add Qry Nexus to Claude Code​

The page shows the command with your server URL and the new token already filled in:

claude mcp add --transport http qry-nexus https://qry.your-company.com/api/v1/mcp \
--header "Authorization: Bearer qry_nx_..."

Run it in a terminal, start Claude Code and ask about your data, for example "Which Nexus products can I read?".

3. Revoke the token​

Your active tokens are listed under the form, with when each was last used and when it expires. Click the bin icon to revoke one; any assistant using it stops reading data at once. Revoking a token also kills the export links it issued.

Claude Desktop, claude.ai and Cowork​

These connect with OAuth: there is no token to copy.

  1. In Claude, add a custom connector with the server URL from Connect an assistant.
  2. When you connect it, Claude opens a Qry page. Sign in as usual (password or single sign-on).
  3. The consent page names the app that asks, says it will read the Nexus data products granted to you, as you (only those products, with your row filters and masked columns, every read audited) and that it cannot do anything else in Qry. Click Allow.

Each person who uses the connector signs in and allows it for themselves, so each reads only their own grants.

Requirements​

Claude Desktop, Cowork and claude.ai reach the connector from Anthropic's cloud, not from your computer. So:

  • Qry must be reachable from Anthropic's addresses, 160.79.104.0/21, over HTTPS. There is no private-network option: a Qry reachable only through a VPN cannot be used this way, so use Claude Code connected directly instead.
  • On Team and Enterprise plans, an organization owner adds the custom connector once for the organization; each person then connects it for themselves. On Pro and Max you add it yourself.
  • An admin must have set the instance's Public URL (Admin → System Configuration → Application) to its public HTTPS address. Qry uses it to tell Claude where to sign in.

The setup for administrators is in Claude connector for Nexus.

Disconnecting​

Assistants connected this way are listed in Connect an assistant under Connected assistants, with when each was last used. Click the bin icon to disconnect one; it stops reading data at once and has to be allowed again to reconnect.

Antigravity CLI (Google)​

Google's Antigravity CLI (agy, which replaced Gemini CLI for personal Google accounts) connects with OAuth, like Claude: there is no token to copy.

agy mcp add qry-nexus https://qry.your-company.com/api/v1/mcp

Start agy and ask about your data, for example "Which Nexus products can I read?". The first time, it opens a Qry page in your browser: sign in as usual, check that the page says answers go to antigravity.google, and click Allow. Run /mcp in agy to see the connection; it should read Authed with the four Nexus tools.

agy signs in through Google's own callback page, so the sign-in works from the computer where you run it, but Qry must be reachable from that computer.

Other MCP clients​

Any client that speaks MCP over streamable HTTP and can send a header works with a Nexus access token, created as for Claude Code. The page shows a configuration of this shape:

{
"mcpServers": {
"qry-nexus": {
"type": "http",
"url": "https://qry.your-company.com/api/v1/mcp",
"headers": { "Authorization": "Bearer qry_nx_..." }
}
}
}

The server accepts only a Nexus access token, an OAuth connection or an API key. Your Qry session and CLI tokens are refused, on purpose: either would let an assistant's configuration file act as you across the whole of Qry.

Security, in plain words​

  • The assistant is you. It reads with your grants, nothing more. A product that is not granted to you does not exist for it.
  • Your restrictions follow you. Row filters and masked columns apply exactly as they do anywhere else. The assistant cannot filter, group or total a masked column, because the answer would reveal what the mask hides.
  • Every read is audited. The product's owner sees each call in the product's Activity, under your name.
  • The access is narrow and short-lived. A Nexus token reads data products and nothing else, and expires within 180 days at most. An OAuth connection gets a one-hour access token that Claude renews. Revoke either from Connect an assistant whenever you want.
  • Database errors stay in Qry. An engine's error text can quote values a mask hides, so it is kept in the server log and never sent to the assistant.

Common issues​

The assistant lists no products. Nothing published is granted to you. Ask the product's owner for a grant; see Granting access.

Claude Desktop or claude.ai cannot connect. Check the requirements above: Qry reachable from Anthropic's addresses, and the Public URL set to the address Claude uses.

The consent page says the request has expired. Start again from Claude. Open the connection in the same browser that started it.

The download returns HTTP 413. The read is over 100,000 rows. Ask the assistant to filter it, choose fewer columns or group it first.

An export link does not work. Each link works once and for 15 minutes. Ask the assistant for a new one.

Claude (web or Desktop) creates the export but cannot download it. When Claude runs code in its own cloud environment, it can only reach the domains allowed for code execution. Add your Qry's address under Settings → Capabilities (on Team and Enterprise plans an organization owner does it in the organization settings), or download the file on your own computer, for example with Claude Code.

See also​