Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Hex MCP server

Vendor MCP
Open markdown

The Hex MCP connector routes your AI agent's tool calls to Hex's own MCP server through Scalekit. Each user signs in to Hex once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 20 tools.

Tools
20
What they doRead · write · destructive
11 · 8 · 111 read8 write1 destructive
Users sign in with
OAuth app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Hex MCP connection

    In AgentKit > Connections, create a Hex MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Hex MCP server, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'hexmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Hex MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'hexmcp_get_me',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • hexmcp_get_cellGet a single cell by IDRead-only

    Get Cell

    Get a single cell by ID

    Inputs

    cellIdstringrequired
    No description.
  • hexmcp_get_cell_imageGet the rendered PNG image of a chart cell, returned as an image.Read-only

    Get Cell Image

    Get the rendered PNG image of a chart cell, returned as an image. The cell must live in its project's draft version, must have been executed, and must not be in an error state. Only chart-type cells are supported. `get_thread` reports the cellId of each chart in a thread that can be fetched this way. Omit width and height unless you need more detail: the default image is tens of kilobytes, while the maximum 2000x2000 can exceed 500KB for a dense chart. Request one chart at a time.

    Inputs

    cellIdstringrequired
    The id of the chart cell (scoped to a specific version); a staticCellId is also accepted and resolved within the draft version.
    heightinteger
    Output image height in pixels, between 100 and 2000. Both width and height must be provided to apply.
    includeTitleboolean
    Include the chart title in the image when true.
    widthinteger
    Output image width in pixels, between 100 and 2000. Both width and height must be provided to apply.
  • hexmcp_get_cell_outputGet the latest output preview for a SQL cell in the active draft notebook session.Read-only

    Get Cell Output

    Get the latest output preview for a SQL cell in the active draft notebook session.

    Inputs

    cellIdstringrequired
    The SQL cell ID or static cell ID to read output for.
  • hexmcp_get_dashboard_import_job_statusCheck the original reconstruction run for a Claude dashboard import.Read-only

    Get Dashboard Import Job Status

    Check the original reconstruction run for a Claude dashboard import. processing means the run is active; done means it finished without an agent error; failed means it ended unsuccessfully. Completion does not certify visual fidelity. A lookup failure is returned as an error and never reported as done.

    Inputs

    job_idstringrequired
    The import job ID returned when reconstruction started.
  • hexmcp_get_meReturn information about the currently authenticated user.Read-only

    Get Me

    Return information about the currently authenticated user.

    Inputs

    This tool takes no inputs.

  • hexmcp_get_projectGet metadata about a single project.Read-only

    Get Project

    Get metadata about a single project.

    Inputs

    projectIdstringrequired
    The project to fetch.
    includeSharingboolean
    Whether to include sharing metadata in the response.default false
    includeUnlistedboolean
    Whether to return unlisted projects. Defaults to false.default false
  • hexmcp_get_runGet the status of a project run.Read-only

    Get Run

    Get the status of a project run.

    Inputs

    projectIdstringrequired
    The project the run belongs to.
    runIdstringrequired
    The run to retrieve.
  • hexmcp_get_threadFetch a Hex Thread by its ID, including the latest response and status.Read-only

    Get Thread

    Fetch a Hex Thread by its ID, including the latest response and status.

    Inputs

    idstringrequired
    No description.