Skip to content

Commit d149272

Browse files
authored
feat(search): add Hex project search and notebook reads (#9757)
* feat(search): add Hex project search and notebook reads * fix(search): preserve readable Hex search candidates * docs(search): keep Hex setup requirements concise
1 parent 349b076 commit d149272

17 files changed

Lines changed: 573 additions & 1 deletion
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Hex
3+
description: Find Hex projects and read their available draft notebook source
4+
---
5+
6+
Hex Search uses **Member accounts** through Hex's official MCP service. It searches published and unpublished projects available to your connected account, then reads supported draft notebook cells on demand.
7+
8+
## Connect
9+
10+
You need a Hex Team or Enterprise plan, the Editor workspace role or above, and view access to the projects you want to search. Sim uses read-only tools; project edit permission is not required.
11+
12+
1. An admin adds **Hex → Member accounts** in **Settings → Sources**.
13+
2. Open **Integrations → Hex → ⋯ → Connect** and authorize your Hex account.
14+
3. Ask a focused question such as `Find the deployment analysis project`, then read a result.
15+
16+
Sim connects to `https://app.hex.tech/mcp`. Hex deployments on other hosts, including EU and HIPAA environments, are not supported by this connection. [Hex MCP requirements](https://learn.hex.tech/docs/api-integrations/mcp-server).
17+
18+
## Search projects
19+
20+
Use plain terms of up to 400 characters, without wildcards or provider-specific query operators. Search retrieves and verifies metadata for at most ten projects. It has no continuation cursor or complete workspace listing, so narrow the query if you need more coverage.
21+
22+
Previews contain the current project title and description. They do not contain notebook evidence. Date filters use the project's last edit time and apply only to the retrieved candidates; date sorting does not search the entire workspace.
23+
24+
## Read notebook source
25+
26+
Reading a result retrieves its current draft cells in notebook order. Sim includes Markdown, SQL, and Python source. Other cell types show their labels and types, with an explicit notice that their content is unavailable.
27+
28+
This does not retrieve published app snapshots, rendered charts, query results, attachments, or warehouse data. It does not execute code or queries. Notebook section nesting is not preserved, and citations open the draft editor in Hex.
29+
30+
Each read is limited to eight pages of 100 cells and 512 KiB of text. If those limits are exceeded, the response is malformed, or the project changes during the read, Sim returns an error instead of incomplete notebook source. Search again after a project changes, or open large projects directly in Hex.
31+
32+
Sim uses only four read operations: `get_me`, `search_projects`, `get_project`, and `list_cells`. Each request uses the member's current grant. Switching the connected Hex workspace invalidates earlier results; search again in the intended workspace.
33+
34+
## Related docs
35+
36+
- [Connect your account](/search/connect-your-account)
37+
- [Hex MCP guide](https://learn.hex.tech/docs/api-integrations/mcp-server)

‎apps/docs/content/docs/search/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"google-drive",
2222
"google-meet",
2323
"granola",
24+
"hex",
2425
"hubspot",
2526
"jama",
2627
"jira",

‎apps/sim/lib/api/contracts/credential-groups.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ export type UpdateCredentialGroupBody = z.input<typeof updateCredentialGroupBody
370370
export const createCredentialGroupMcpConnectorBodySchema = z.discriminatedUnion('connectorId', [
371371
z.object({ connectorId: z.literal('fireflies') }).strict(),
372372
z.object({ connectorId: z.literal('granola') }).strict(),
373+
z.object({ connectorId: z.literal('hex') }).strict(),
373374
z.object({ connectorId: z.literal('notion') }).strict(),
374375
z.object({ connectorId: z.literal('coda') }).strict(),
375376
z.object({ connectorId: z.literal('hubspot') }).strict(),

‎apps/sim/lib/credential-groups/managed-mcp-connector-icons.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
DatabricksIcon,
44
FirefliesIcon,
55
GranolaIcon,
6+
HexIcon,
67
HubspotIcon,
78
LucidIcon,
89
NotionIcon,
@@ -13,6 +14,7 @@ import type { ManagedMcpConnectorId } from '@/lib/credential-groups/managed-mcp-
1314
export const MANAGED_MCP_CONNECTOR_ICONS = {
1415
fireflies: FirefliesIcon,
1516
granola: GranolaIcon,
17+
hex: HexIcon,
1618
hubspot: HubspotIcon,
1719
lucid: LucidIcon,
1820
zoom: ZoomIcon,

‎apps/sim/lib/credential-groups/managed-mcp-connectors.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { CREDENTIAL_GROUP_ACCOUNTS_PER_PROVIDER_LIMIT } from '@/lib/credential-g
33
export const MANAGED_MCP_CONNECTOR_IDS = [
44
'fireflies',
55
'granola',
6+
'hex',
67
'databricks',
78
'coda',
89
'notion',
@@ -44,6 +45,13 @@ export type ManagedMcpConnector =
4445
| FixedPreregisteredManagedMcpConnector
4546

4647
export const MANAGED_MCP_CONNECTORS = {
48+
hex: {
49+
id: 'hex',
50+
name: 'Hex',
51+
description: 'Search projects using your Hex account',
52+
url: 'https://app.hex.tech/mcp',
53+
oauthClientRegistration: 'dynamic',
54+
},
4755
zoom: {
4856
id: 'zoom',
4957
name: 'Zoom',

‎apps/sim/lib/mothership/generated/docs-manifest.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ export const DOCS_MANIFEST: readonly string[] = [
456456
'search/google-drive.mdx',
457457
'search/google-meet.mdx',
458458
'search/granola.mdx',
459+
'search/hex.mdx',
459460
'search/hubspot.mdx',
460461
'search/jama.mdx',
461462
'search/jira.mdx',

‎apps/sim/lib/mothership/generated/sim-assistant-tools.generated.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const liveSearchProviderSchema = z.enum([
1818
'gitlab',
1919
'linear',
2020
'lucid',
21+
'hex',
2122
'hubspot',
2223
'fireflies',
2324
'granola',

‎apps/sim/lib/mothership/generated/tool-catalog-v1.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6111,6 +6111,7 @@ export const SearchWorkspace: ToolCatalogEntry = {
61116111
'gitlab',
61126112
'linear',
61136113
'lucid',
6114+
'hex',
61146115
'hubspot',
61156116
'fireflies',
61166117
'granola',

‎apps/sim/lib/mothership/generated/tool-schemas-v1.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6024,6 +6024,7 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
60246024
'gitlab',
60256025
'linear',
60266026
'lucid',
6027+
'hex',
60276028
'hubspot',
60286029
'fireflies',
60296030
'granola',

‎apps/sim/lib/sim-search/live/README.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ MCP search covers page and table-row content, permits empty-query recency listin
8484

8585
In service mode, the source's selected document IDs restrict MCP retrieval. Every candidate's parent document must also be currently visible to the source token. With an Enterprise organization ID, the Admin API must return that exact document in the configured organization; deleted documents and revoked key access are rejected. Personal MCP still enforces the member's permission to read the actual content. [Official MCP tool catalog](https://coda.io/resources/mcp/tools-and-endpoints).
8686

87+
### Hex
88+
89+
Member mode uses managed OAuth against `https://app.hex.tech/mcp`. Only `get_me`, `search_projects`, `get_project`, and `list_cells` are allowed. The current workspace ID from `get_me` binds search results, references, and canonical draft-editor citations; a changed workspace requires a fresh search. Every candidate is hydrated through `get_project`, and search previews are explicitly project metadata rather than notebook evidence. Search verifies at most ten unique projects and has no continuation. Date filtering and sorting apply only to those candidates.
90+
91+
Reads verify the project revision before and after paging through its draft cells. SQL, Python, and Markdown source are included; other cell types retain their labels with an explicit unavailable-content marker. Rendered outputs, attachments, published app snapshots, and warehouse data are not retrieved. Reads fail instead of returning incomplete source when cells are malformed, project access changes, a cursor repeats, or the eight-page / 512 KiB text limit is exceeded. This path never executes projects or queries. Hex requires a Team or Enterprise plan and the Editor workspace role or above for these project-read tools; view access to each project is sufficient.
92+
8793
### GitLab
8894

8995
Service mode only, with no member GitLab connection. Each configured source fixes the instance, project, token, and permission strategy. Members search the configured project through that token, but each result must separately match their verified organization identity and source ACLs.
@@ -116,7 +122,7 @@ Paths below are relative to `apps/sim`.
116122

117123
The provider catalog holds a trusted origin, not an arbitrary URL supplied by a model. Actual endpoint paths and query translation belong in the provider module. `http.ts` supplies bounded responses, a per-client request budget, timeout/cancellation, configured-endpoint validation, and no credential-bearing redirects. Use its origin-bound path API; do not return tokens to UI or model tools.
118124

119-
Self-managed GitLab is resolved from the saved source's validated host/project instead of the catalog's default origin. Managed MCP providers resolve the current member server/grant through `mcp-accounts.ts` and `managed-mcp.ts`, discover tool schemas and permit only fixed read tools. Coda, Fireflies, Granola and Notion each have an adapter for their actual search/read formats. Neither exception lets a search query choose a credential destination.
125+
Self-managed GitLab is resolved from the saved source's validated host/project instead of the catalog's default origin. Managed MCP providers resolve the current member server/grant through `mcp-accounts.ts` and `managed-mcp.ts`, discover tool schemas and permit only fixed read tools. Coda, Fireflies, Granola, Hex and Notion each have an adapter for their actual search/read formats. Neither exception lets a search query choose a credential destination.
120126

121127
### Provider endpoint map
122128

0 commit comments

Comments
 (0)