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
Section titled “Install”Install the plugin package alongside @sentry/junior:
pnpm add @sentry/junior @sentry/junior-hexRuntime setup
Section titled “Runtime setup”Add the package name to the plugin set exported from plugins.ts:
import { defineJuniorPlugins } from "@sentry/junior";
export const plugins = defineJuniorPlugins(["@sentry/junior-hex"]);Auth model
Section titled “Auth model”- No
HEX_API_TOKENor 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.
Config
Section titled “Config”Environment variables
Section titled “Environment variables”HEX_MCP_URL
MCP endpoint for the Hex deployment this Junior instance uses.
- Define: Set
HEX_MCP_URLin 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.
Skills
Section titled “Skills”The plugin ships one skill:
- hex — Creates a Hex thread, polls for completion, and extracts results against a caller-provided pattern.
What users can do
Section titled “What users can do”- 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.
Verify
Section titled “Verify”Confirm a real user can connect and query successfully:
- Ask Junior to check usage data for a known Sentry customer.
- Complete the private OAuth flow when Junior prompts for it.
- Confirm the thread resumes automatically and includes Hex query results.
- Open Junior App Home and confirm Hex appears under
Connected accounts.
Failure modes
Section titled “Failure modes”- 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
hexskill 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_URLpoints to the correct deployment if your org uses a custom Hex domain.
Next step
Section titled “Next step”Review Credentials & OAuth and Security Hardening.