Connect Hex to Claude Code

Find Hex projects, run them and read run status, read cells and their output, and ask the Hex agent questions in threads. Add Toolspoke to Claude Code once and it can use 16 Hex actions. Your Hex credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Hex and connect it

    Add Hex to a project in your Toolspoke workspace.

    API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API token
    Hex → user settings → Account → API keys → New Token. A personal token (hxtp_, Editor role or higher) acts as you and must expire. An admin can instead create a workspace token (hxtw_) on the workspace settings page and pick its scopes: Read projects for reads only, Run projects to also allow run_project. Rate limit: 60 requests a minute.
  3. Choose what Claude Code may do

    All 16 actions start on. Switch off any of the 4 actions that change something in Hex, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Hex actions that only read, so they are safe to try first.

  • Return the user this token belongs to
  • List the projects this token can see, newest first by default
  • Read one project's metadata, title, owner, status, schedules and when it was last published
  • Read the status of one project run

What Claude Code can do in Hex

12 actions read, 3 write and one deletes or permanently changes something.

Reads

  • Get me

    Return the user this token belongs to. A workspace token returns no user details.

  • List projects

    List the projects this token can see, newest first by default. Start here, the project id is what running a project and reading its cells take. It is also the install's connection test, because it needs a token that can read projects.

  • Get project

    Read one project's metadata, title, owner, status, schedules and when it was last published.

  • Get run status

    Read the status of one project run. PENDING, RUNNING, COMPLETED, ERRORED or KILLED, with its timings.

  • List runs

    List the recent API-triggered and scheduled runs of one project, newest first.

  • List cells

    List the cells in one project's draft, their type, label and source (SQL, Python, Markdown). Not written to the audit log, because the source is other people's work and can embed data.

  • Get cell

    Read one cell's type, label and source.

  • Get cell output

    Read the latest output of one cell, the rows a SQL cell returned, or a code cell's result. Hex marks this endpoint unstable. Not written to the audit log, because the output is the workspace's data.

  • List data connections

    List the workspace's data connections, the warehouses and databases projects query, by name, type and id. Credentials are not returned.

  • List collections

    List the workspace's collections, the folders projects are grouped into. A collection id narrows list_projects.

  • List users

    List the workspace's users by name and email, optionally only the members of one group.

  • Get thread messages

    Read the messages in one thread, the questions asked and the Hex agent's answers. Not written to the audit log, because the answers carry the workspace's data.

Writes

  • Run project

    Run a published project, optionally with input parameter values. Returns a runId and a status URL; poll get_run_status until it finishes. It runs the project's queries against its data connections and counts toward the 25 concurrent kernels per user. update_published_results replaces what viewers of the published app see.

  • Create thread

    Ask the Hex agent a data question in a new thread. It answers asynchronously; read the reply with get_thread_messages until the thread is IDLE. The question and the answer are stored in Hex as a thread under the token's user.

  • Continue thread

    Ask a follow-up question in an existing thread. The thread must be idle. Hex does not queue a second question behind a running one.

Deletes or permanently changes

  • Cancel run

    Cancel a project run that is still going. Destructive because the run's work is lost and cannot be resumed, it has to be started again from the beginning.

Hex in Claude Code: questions

Does Claude Code see my Hex credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Hex?

Yes. Each of the 16 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.

Will 16 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Hex action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Hex call does not run in a sandbox, so it bills nothing.

Try Hex in Claude Code

Free to start, and tool calls cost nothing on any plan.