Documentation Index
Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
Use this file to discover all available pages before exploring further.
MCP Server
CRAFT handles the “what” — governed, accurate data retrieval from your enterprise systems — so your AI tools and agents can focus on the “why”: validating hypotheses, identifying root causes, running what-if scenarios, and surfacing anomalies. Useresolve_term so your agent knows what “active customer” means in your warehouse before generating SQL; use execute_query to validate results; use generate_plotly_chart to surface patterns instantly. Connect Claude Code, Cursor, Goose, or a purpose-built agent to https://craft.emergence.ai/mcp and CRAFT becomes a governed data layer for any reasoning workflow.
Two connection patterns: (a) interactive — IDE clients query CRAFT while you code; (b) programmatic — embed CRAFT as a tool server in an agent pipeline for hypothesis testing, root cause analysis, anomaly detection, or what-if modeling.
Server details
| Property | Value |
|---|---|
| Endpoint | https://craft.emergence.ai/mcp |
| Transport | Streamable HTTP (MCP 2025-11-25 spec; SSE-compat path available) |
| Auth | OAuth 2.0 PKCE (authorization code + S256, via Keycloak) |
| Health | GET https://craft.emergence.ai/health → {"status": "ok"} |
Verify the endpoint (no auth needed)
Before setting up OAuth, confirm the server is reachable with the no-authhello_world tool:
Authentication
Interactive clients (OAuth)
Supported IDE clients use the MCP OAuth 2.0 PKCE authorization flow. On first connection, the client opens a browser window tocraft.emergence.ai, where you sign in with your Google or Microsoft account. The access token is stored and refreshed by the client automatically — no manual token handling required.
X-Project-ID header
All tools excepthello_world require an X-Project-ID header scoping the request to your CRAFT project. Find your project ID in the CRAFT console under Settings → Project → ID.
X-Project-ID selects a project scope but does not grant access — project membership is enforced server-side against your JWT’s claims. Passing an arbitrary project ID returns an authorization error if you are not a member.
Token requirements for headless callers
Programmatic callers (agents, pipelines) must obtain an access token before calling tools:| Requirement | Value |
|---|---|
Issuer (iss) | https://craft.emergence.ai/keycloak/realms/emergence |
| Required scopes | openid profile email |
| Grant type | Authorization code (interactive) or Client credentials (service account) |
| Token TTL | ~5 minutes; refresh token manages rotation for interactive clients |
Connect your AI client
Claude Code
Claude Code
Add the CRAFT MCP server from the CLI:Or add it to The OAuth browser flow triggers automatically on first tool call. Token refresh is handled by Claude Code.
.mcp.json in your project root (or ~/.claude.json for user-scope):Find your project ID in the CRAFT console under Settings → Project → ID.
Cursor
Cursor
Add to Set
.cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):CRAFT_PROJECT_ID as a shell environment variable — Cursor expands ${env:VAR} at runtime. The OAuth browser window opens on first use.VS Code
VS Code
Create VS Code prompts for the project ID once and stores it securely. OAuth handles the access token automatically.
.vscode/mcp.json in your project:Goose
Goose
Add to Set
~/.config/goose/config.yaml:CRAFT_PROJECT_ID in your environment. Alternatively, run goose configure, select Remote Extension (Streamable HTTP), and the interactive wizard will prompt you for the URL and any custom headers. OAuth triggers on first connection.Interactive charts — MCP Apps extension
generate_plotly_chart currently returns raw Plotly JSON (plotly_json). Inline interactive chart rendering via the io.modelcontextprotocol/ui MCP Apps extension is in development — no additional configuration is needed when it ships; supported clients will render charts inline automatically.io.modelcontextprotocol/ui) lets a tool return a ui:// resource containing HTML/JS. The host fetches it and renders it in a sandboxed iframe alongside the chat — users interact with the chart without switching tabs, with bidirectional data flow back to the server.
Clients recommended for interactive Plotly charts, sourced from the official client matrix (verified 2026-05-19):
| Client | MCP Apps | Notes |
|---|---|---|
| Goose | ✅ | Desktop app; renders iframes inline |
| VS Code Copilot | ✅ | Browser-rendered panel |
| Cursor | ✅ | Desktop IDE; renders iframes inline |
| Postman | ✅ | Renders in Postman canvas; good for dev/testing |
| MCPJam | ✅ | Inspector UI; best for debugging chart output |
| Claude Code (CLI) | ❌ | Terminal — no browser context; receives raw plotly_json |
Claude Code users receive the raw
plotly_json response. Render it locally with plotly.io.show(fig) in Python or Plotly.newPlot(...) in JavaScript.Developer tools
Use these tools to test and debug CRAFT’s MCP server during development, especially the MCP Apps / Plotly rendering path.MCPJam Inspector
MCPJam Inspector
MCPJam is a dedicated MCP inspector — web app (no install), desktop app, or CLI. It supports the MCP Apps extension and will render Plotly charts inline as they ship.Web app or desktop: Add a server with URL CLI: Run a health check and OAuth flow validation:MCPJam provides full JSON-RPC trace visibility and guided OAuth conformance checks (DCR, PKCE, CIMD) — useful for validating the MCP server before shipping tool changes.
https://craft.emergence.ai/mcp, enable OAuth, and set X-Project-ID in the headers field:Postman
Postman
Postman can act as an MCP host (client), connecting to external MCP servers — distinct from Postman’s own MCP server for managing Postman resources.Go to Settings → MCP Hosts → Add and configure:
- URL:
https://craft.emergence.ai/mcp - Auth: OAuth (recommended) or access token
- Headers:
X-Project-ID: <your-project-id>
Calling CRAFT from an external agent
Any MCP-compatible agent framework can use CRAFT as a tool server, bringing governed data access to any reasoning pipeline.- Pydantic AI
- Google ADK
- Raw HTTP
Requires
pydantic-ai-slim[fastmcp] and fastmcp:MCPServerHTTP is deprecated — use FastMCPToolset with StreamableHttpTransport.Headless callers need a programmatic access token. Obtain one via a Keycloak service account (client credentials grant). See Service Accounts for setup.
Available tools
Catalog tools
Always available — provide governed access to your project’s data catalog.| Tool | Required parameters | Returns |
|---|---|---|
hello_world | — | Server greeting; confirms connectivity (no auth required) |
list_databases | resource_uri — data connection UUID | Database metadata list |
get_schema | resource_uri, fqn — 2 segments = database, 3 = schema, 4 = table | Full entity schema including columns and types |
search_schema | query — Elasticsearch-style text query | Matching metadata entries across the project |
Talk2Data tools
Available when the deployment includes the Data Insights solution. See Data Connections to connect your data sources.| Tool | Required parameters | Returns |
|---|---|---|
generate_sql | question (natural language), database (connection UUID), schema (object with schema_name) | sql, explanation, assumptions |
execute_query | sql (SELECT statements only), database | columns, rows, row_count, truncated |
resolve_term | term — business term (e.g., “ARR”, “churn rate”) | definition, related_columns, sql_pattern |
generate_plotly_chart | data (tabular), chart_type (bar, line, scatter, pie, …) | Plotly JSON figure spec (plotly_json) |
sample_data | resource_uri, table_fqn — database.schema.table | columns, rows (up to 100 rows preview) |
execute_query only accepts SELECT statements — DDL, DML, and admin functions are rejected. generate_sql delegates to the Text2SQL A2A agent; the first call in a session may take 3–8 s (cold start), subsequent calls ~1–2 s.Per-project allowlist and governance
CRAFT enforces a per-project tool allowlist — each project defines which tools each agent identity may call. This is the key difference between the CRAFT MCP gateway and a raw FastMCP server. Configure allowlists in Platform → Authorization (RBAC model) and Platform → Agents (agent identity → allowlist mapping). Denied calls return a structured error:- Timestamp, agent identity, tool name, project ID
- Input parameters (PII-scrubbed per governance policy)
- Result status (allowed / denied / error)
Errors and limits
| Condition | HTTP | MCP error code | Remediation |
|---|---|---|---|
Missing Authorization header | 401 | missing_authorization | Complete the OAuth flow; verify token is fresh |
Missing X-Project-ID header | 400 | missing_project | Add X-Project-ID header with your project UUID |
| Tool not in allowlist | 403 | tool_not_allowed | Ask project admin to add tool to allowlist |
Non-SELECT SQL in execute_query | 422 | validation_error | Only SELECT statements are permitted |
| Text2SQL agent unavailable | 503 | upstream_unavailable | Retry; generate_sql depends on the Talk2Data A2A agent |
| Query row limit hit | 200 | — | Response includes "truncated": true; reduce max_rows |
execute_query: up to 5,000 rows (max_rowsparameter; default 500);truncated: truewhen cappedsample_data: up to 100 rows (limitparameter; default 10)generate_sql: first call may take 3–8 s (Text2SQL agent cold-start); subsequent calls ~1–2 s
Next steps
LLM Gateway
The complementary gateway for LLM completions — model allowlist, rate limits, and cost attribution.
Data Connections
Connect your data sources to enable Talk2Data tools.
Release Notes
Track new tools, breaking changes, and platform updates.

