Helix Model Context Protocol Server
Point Claude Desktop, Codex, or any MCP client at Helix so your agent can ask for a chart, run the graph pipeline with plugins, and get a PNG back in one call.
What you get
- Defensive chart generation across the full graph pipeline, even with arbitrary user data.
- Plugin-aware responses so the agent can pick chart styles, data platforms, exports, and AI controllers.
- PNG + JSON in one response with pipeline metadata for auditing and retries.
- Discovery endpoints (
get_server_info,list_graph_capabilities) so agents self-configure.
Set up in Claude Desktop
- Install dependencies (includes
mcp>=1.17.0):python -m pip install -r requirements.txt - Ensure your Helix account has an active subscription (the server calls
/api/mcp/validateon start). - Open Claude Desktop > Settings > Developer > MCP and add a server:
{
"command": "/absolute/path/to/.venv-14/bin/python",
"args": ["-m", "mcp"],
"transport": "stdio",
"env": {
"ASKFELIX_API_SECRET": "your-secret",
"ASKFELIX_API_BASE_URL": "https://helixapi.app.nz",
"ASKFELIX_MCP_DOC_URL": "https://helixapi.app.nz/mcp"
}
}
Restart Claude, then run get_server_info to confirm the MCP server is reachable and the secret maps to your account.
Set up in Codex or other MCP CLIs
Add an entry to ~/.config/codex/mcp.toml (adapt the command path to your interpreter):
[servers.helix]
command = "/absolute/path/to/.venv-14/bin/python"
args = ["-m", "mcp", "--transport", "stdio"]
env.ASKFELIX_API_SECRET = "your-secret"
env.ASKFELIX_API_BASE_URL = "https://helixapi.app.nz"
env.ASKFELIX_MCP_DOC_URL = "https://helixapi.app.nz/mcp"
Run codex mcp test helix to verify connectivity before issuing chart prompts.
Make your first graph
- Give the agent a small CSV or table. It can be attached, pasted, or referenced by URL the MCP server can reach.
- Ask explicitly for a chart and an image:
"Use the helix MCP server to plot revenue by month as a PNG and include the response JSON." - The agent will call
generate_graph, select plugins (chart type, export target, data platform), and return the PNG plus JSON in one response.
# Direct HTTP equivalent (useful for debugging)
curl -X POST https://helixapi.app.nz/api/mcp/generate_graph \
-H "Content-Type: application/json" \
-d '{
"secret": "your-secret",
"prompt": "Bar chart of revenue by month; return a PNG image.",
"output": "png",
"include_response_json": true
}'
If your agent prefers JSON, set "output": "json" and let it render locally; PNG is fastest for quick previews.
Tools and controls
| Tool | Purpose | Agent controls |
|---|---|---|
generate_graph |
Send natural language chart requests and receive PNG or JSON. | chart plugin, export target (png/json/svg), AI controller, data platform, pipeline overrides. |
list_graph_capabilities |
Enumerate plugins and export targets so the agent can plan before calling generate_graph. |
filters for plugin families (chart/export/dataplatform). |
get_server_info |
Return base URL, default output, timeout, and documentation link for self-configuration. | none (read-only discovery). |
All inputs are Pydantic-validated to keep arbitrarily large or messy user data safe while giving the agent fine-grained control.
Troubleshooting
- Authentication: ensure
ASKFELIX_API_SECRETmatches an active Helix account. The server presents helpful error messages when authentication fails. - Networking: set
ASKFELIX_VERIFY_SSL=falseonly when debugging custom certs. The production Helix API requires TLS. - Timeouts: complex datasets may require longer timeouts. Increase
ASKFELIX_API_TIMEOUTand re-run the server. - Agent debugging: use the
include_response_jsonflag ingenerate_graphrequests to return the raw pipeline payload for inspection.