DHTMLX Pivot MCP server: configuration, aggregation, and export
DHTMLX Pivot turns one configuration object into a fully aggregated table, and opens onto a whole second API, the underlying Table widget, for exporting data or expanding tree rows. Layout changes and full table redraws each trigger their own event: a layout edit fires one, while every redraw underneath fires the other. Getting all of that right depends on current documentation, not a stale guess.
Query the DHTMLX MCP server instead: it returns the current config shape, the export path through getTable(), and the right event to use for persistence, so the assistant generates code that matches how Pivot actually behaves today.
MCP endpoint
https://docs.dhtmlx.com/mcp
The DHTMLX MCP server covers all major DHTMLX products, not only DHTMLX Pivot. The same endpoint and configuration instructions work regardless of which DHTMLX component you are building with.
What Pivot developers ask the MCP server
The MCP server can tell you nearly everything about DHTMLX Pivot's documentation, starting with:
- Looking up the current API for methods, events, and properties, including the Event Bus and state methods.
- Generating ready-to-run initialization code with the
fields,data, andconfigshape a specific table needs. - Defining rows, columns, and values in the
configproperty, including both accepted forms of avaluesentry. - Choosing or writing aggregation methods, from the built-in
sum/count/averageset to a custom one added through themethodsproperty. - Pre-processing data with predicates before aggregation, such as grouping dates by month.
- Sizing, freezing, and templating table cells through
tableShapeandheaderShape, including tree mode and frozen columns. - Localizing labels and date/number formats, and styling the table with
--wx-pivot-*CSS variables. - Exporting a table to CSV or XLSX through the Table instance that
getTable()returns. - Deciding between
update-configandrender-tablewhen persisting state to a server, or integrating Pivot with React, Vue, Angular, and Svelte.
Where a Pivot question lands in MCP
A Pivot question sent to the DHTMLX MCP server runs through a Retrieval-Augmented Generation (RAG) pipeline built on the Model Context Protocol (MCP), and lands in one of two workflows: Search, which returns matching reference pages for the assistant to write from, or Inference, which reads those pages and answers the question itself. Only half of this request needs a documentation lookup. The assistant pinpoints that half and writes the rest, the server-specific save logic, from what it already knows.
Consider the prompt "Write a handler that saves the Pivot config to the server on every layout change.":
- The assistant marks out the half that needs documentation: which event to listen for and how to read the current config.
- The server locates the working-with-server documentation it maps to.
- Because the ask is for generated code, Search takes it (a narrower question, like whether
render-tablefires more often thanupdate-config, would go to Inference instead). - Search fetches the matching pages from a vector index of the current Pivot documentation.
- The assistant gets those pages back as context.
- From that context, the assistant writes the
update-configlistener, correctly skippingrender-table's more frequent firing, then adds the actual save request for the target server from its own knowledge.
Pivot's aggregation and export code stays matched to the current API this way.
Linking your AI tool to the MCP server
Whichever AI development tool you use alongside Pivot, wiring it to the MCP server comes down to one step: pointing it at the endpoint URL below, either through a CLI command or a JSON configuration file.
https://docs.dhtmlx.com/mcp
Setup details for widely used tools come next.
Claude Code
Claude Code's official documentation walks through every MCP setup path.
To register the server from the command line, run:
claude mcp add --transport http dhtmlx-mcp https://docs.dhtmlx.com/mcp
No CLI on hand? Add the following configuration to your .mcp.json manually:
{
"mcpServers": {
"dhtmlx-mcp": {
"type": "http",
"url": "https://docs.dhtmlx.com/mcp"
}
}
}
Cursor
See Cursor's official documentation for the full set of MCP configuration options.
Steps to add the server:
- Open Settings (
Cmd+Shift+Jon Mac,Ctrl+Shift+Jon Windows/Linux) - Go to Tools & MCP
- Click Add Custom MCP
- Paste the following config:
{
"mcpServers": {
"dhtmlx-mcp": {
"url": "https://docs.dhtmlx.com/mcp"
}
}
}
Google Antigravity
Antigravity 2.0
The official documentation has the full picture on MCP server integration in Antigravity.
These are the steps to complete for connecting DHTMLX MCP server with Google Antigravity:
- Open the command palette
- Type "mcp add"
- Select "HTTP"
- Provide the following values:
- Name:
dhtmlx-mcp
- URL:
https://docs.dhtmlx.com/mcp
Antigravity CLI
The related guide explains what changes when migrating from Gemini CLI to Antigravity CLI.
To connect the DHTMLX MCP server to Antigravity CLI, create mcp_config.json in one of these locations:
- Global:
~/.gemini/config/mcp_config.json - Workspace:
.agents/mcp_config.json
Add the following configuration:
{
"mcpServers": {
"dhtmlx-mcp": {
"serverUrl": "https://docs.dhtmlx.com/mcp"
}
}
}
Then run agy in the terminal.
ChatGPT
See the official documentation for every step of setting up an MCP connector in ChatGPT.
Steps to configure the connector:
- Go to Settings → Apps & Connectors
- Click Advanced settings
- Enable Developer mode
- Return to Apps & Connectors and click "Create"
- Fill in the connector details:
- Name:
dhtmlx-mcp
- URL:
https://docs.dhtmlx.com/mcp
- Authentication:
No authentication
- Click Create
After you create the connector, ChatGPT pulls documentation from the MCP server during conversations.
For intensive coding workflows, other MCP-aware tools may be a better fit.
Other tools
Settings panels in other AI coding tools tend to call this "Model Context Protocol" or "Context Sources." Add https://docs.dhtmlx.com/mcp there as a custom source.
Where your queries go
As a hosted service, the MCP server never runs on your hardware, never opens a local file, and never stores personal information.
The server logs queries only to debug problems and improve the service.
Request a commercial deployment to turn query logging off entirely. Reach info@dhtmlx.com to arrange it.
Prompts that get Pivot right
A prompt is usually about one of four things: config, aggregation, layout, or server sync. Naming it up front is what the groups below do for you.
Config and aggregation
How do I add a custom aggregation method in DHTMLX Pivot? Use the docs.
How do I set a default sort order for a field in DHTMLX Pivot?
What's the difference between the two accepted forms of a values entry in the config property?
Predicates and fields
How do I group date values by month using a custom predicate in DHTMLX Pivot?
How do I apply a currency format with a dollar-sign prefix to a numeric field?
Layout and styling
How do I freeze the first two row fields on the left in DHTMLX Pivot?
How do I enable tree mode in DHTMLX Pivot and choose which field becomes the parent row?
How do I change the hover color for primary buttons in the Material theme?
Server sync and export
How do I save the user's layout to a server whenever they change it?
How do I export the Pivot table to XLSX?
Small tips for Pivot prompts
- Say which API you mean.
export, tree-row expand/collapse, and filtering by row all run through the Table instancegetTable()returns, not the Pivot instance directly. Naming that layer keeps the assistant from calling a Table-only method on the wrong object. - Distinguish a method from a predicate. Aggregation methods (
sum,count, a custom entry inmethods) summarize values already in a row or column. Predicates transform a raw value before that grouping happens. State which stage your prompt targets. - Spell out the
valuesentry form you want. Avaluesitem can be a"method(field)"string or a{ field, method }object. Naming the form you're using stops the assistant from inventing a third shape. - Add "Use the docs" when asking about
update-configversusrender-table. The two fire at different rates, and that distinction is exactly the kind of detail stale training data glosses over.