Skip to content

Hex Plugin

The Hex plugin uses Hex’s hosted MCP server so Slack users can run analytical queries against the data warehouse from Junior.

Junior exposes only Hex’s read tools: Threads (create_thread, get_thread, continue_thread), search_projects, get_me, get_project, list_cells, get_cell, get_cell_image, get_cell_output, get_run, and list_data_connections. Hex’s tools that create, edit, or run projects are not exposed, because their edits change live project drafts.

Hex checks each user’s workspace role and project permissions on every call. Threads and project search need the Explorer role or higher. The project tools need the Editor role or higher. See Hex MCP Server.

Requires a Hex Team or Enterprise plan.

Install the plugin package alongside @sentry/junior:

Terminal window
pnpm add @sentry/junior @sentry/junior-hex

Add the package name to the plugin set exported from plugins.ts:

plugins.ts
import { defineJuniorPlugins } from "@sentry/junior";
export const plugins = defineJuniorPlugins(["@sentry/junior-hex"]);
  • No HEX_API_TOKEN or shared secret is required.
  • Each user completes OAuth the first time Junior calls a Hex MCP tool on their behalf.
  • Junior sends the authorization link privately, then resumes the same thread automatically after the user authorizes.
HEX_MCP_URL

MCP endpoint for the Hex deployment this Junior instance uses.

  • Define: Set HEX_MCP_URL in the deployment environment, then redeploy
  • Default: https://app.hex.tech/mcp
  • Required: No
  • Environment override: HEX_MCP_URL

Common values are https://eu.hex.tech/mcp for EU, https://hc.hex.tech/mcp for HIPAA, and https://your-company.hex.tech/mcp for single-tenant deployments.

The plugin ships one skill:

  • hex — Creates a Hex thread, polls for completion, and extracts results against a caller-provided pattern.
  • Query data from the Hex data warehouse using natural language or raw SQL.
  • Find Hex projects and read their cells and charts.
  • Get structured output suitable for downstream processing or display.

Confirm a real user can connect and query successfully:

  1. Ask Junior to check usage data for a known Sentry customer.
  2. Complete the private OAuth flow when Junior prompts for it.
  3. Confirm the thread resumes automatically and includes Hex query results.
  4. Open Junior App Home and confirm Hex appears under Connected accounts.
  • No auth prompt or no resume: the user still needs to complete the OAuth flow. Retry the request and finish the private authorization flow when prompted.
  • Query timeout: Hex threads can take time to process. The hex skill polls up to 10 times with 20-second intervals. Complex queries may need to be simplified.
  • No data returned: verify the entity identifier in the prompt matches what’s in the warehouse. Narrow the query and try again.
  • Wrong Hex workspace: verify HEX_MCP_URL points to the correct deployment if your org uses a custom Hex domain.

Review Credentials & OAuth and Security Hardening.