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 5 tools.

Tools
5
What they doRead · write · destructive
3 · 2 · 03 read2 write0 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_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_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.
  • hexmcp_search_projectsSearch for Hex projects by keyword.Read-only

    Search Projects

    Search for Hex projects by keyword.

    Inputs

    querystringrequired
    The search query to find relevant projects. This should be a non-empty string without wildcards.
  • hexmcp_continue_threadContinue an existing Hex Thread by adding a new message and triggering the agent to process it.Write

    Continue Thread

    Continue an existing Hex Thread by adding a new message and triggering the agent to process it.

    Inputs

    idstringrequired
    The ID of the thread to continue
    promptstringrequired
    The message to add to continue the thread
  • hexmcp_create_threadCreate a new Hex Thread to ask a question about your data using natural language.Write

    Create Thread

    Create a new Hex Thread to ask a question about your data using natural language.

    Inputs

    promptstringrequired
    No description.