Ask any AI assistant for an ApexCharts chart and it will confidently hand you code. About half the time that code renders blank, because the assistant guessed at a detail it only half-remembers: the wrong series shape for a pie chart, a missing render() call, or a formatter with the wrong signature. The ApexCharts MCP server fixes this by giving the assistant real tools instead of memory. It generates a valid config, validates it against documented rules, and serves the official knowledge base on demand.

The fastest way to see it: in Claude Code, run claude mcp add --transport http apexcharts https://mcp.apexcharts.com/mcp, restart, and ask for a chart. The rest of this post walks through exactly what happens next, using the real output the server returned.

Key takeaways

  • The MCP server gives an AI assistant five chart tools: generate a config, validate a config, list chart types, read the knowledge base, and list the products the server covers. The assistant calls them automatically once connected.
  • Validation is the part a docs search cannot do. The server checks a config against the rules in the ApexCharts skill (40 of them in release 0.12.0) and returns structured fixes, so bad series shapes and out-of-range values are caught before the code reaches your app.
  • Setup is one line. Point your client at the hosted server, https://mcp.apexcharts.com/mcp, or run npx -y apexcharts-mcp locally. No account, no API key.
  • One server covers the whole family: ApexCharts, ApexGrid, ApexGantt, ApexTree, ApexSankey, ApexStock, and ApexMaps, 23 tools in all, each product reporting the library version its guidance was verified against.
  • There is no charge for the MCP server or the skill packages. The libraries you build with follow their own licensing.

What is the ApexCharts MCP server?

MCP (Model Context Protocol) is an open standard that lets an AI assistant call external tools during a conversation. Instead of relying on what the model memorized during training, the assistant can ask a live server for the right answer. The apexcharts-mcp server is that live server for ApexCharts. It returns configs, validation results and documentation as text; it does not render charts. Your app renders the config with the ApexCharts library, as it would any other.

For the charts library it exposes four tools, plus one that describes the whole server:

ToolWhat it does
apexcharts_generate_configBuilds a minimal valid options object for any of the 30 chart types, with the correct series-data format and placeholder data.
apexcharts_validate_configChecks a config against the ApexCharts skill's rules (wrong series shape, radialBar out of range, hex colors without #, conflicting tooltip flags) and returns each issue with a rule id and a fix.
apexcharts_list_typesReturns every supported chart type with its family, series format and data shape, and whether the default bundle has it or which add-on import it needs.
apexcharts_get_referenceReads the bundled knowledge base: SKILL.md plus per-family docs for every chart type.
apexcharts_list_productsLists the products the server exposes, their tool names, and the library version each product's guidance targets.

Tools are namespaced per product, so the same connection also carries apexgrid_*, apexgantt_*, apextree_*, apexsankey_*, apexstock_* and apexmaps_* tools: a generate, a validate and a reference tool for each, and a single connection covers all seven libraries.

How do I connect it?

You do this once per client, then forget about it.

The hosted server needs nothing installed. In Claude Code:

claude mcp add --transport http apexcharts https://mcp.apexcharts.com/mcp

In Cursor (~/.cursor/mcp.json), or any client that takes a server URL:

{
  "mcpServers": {
    "apexcharts": {
      "url": "https://mcp.apexcharts.com/mcp"
    }
  }
}

Run it locally instead, over stdio, from the apexcharts-mcp npm package. In Claude Code:

claude mcp add apexcharts -- npx -y apexcharts-mcp

In Claude Desktop (claude_desktop_config.json) or Cursor:

{
  "mcpServers": {
    "apexcharts": {
      "command": "npx",
      "args": ["-y", "apexcharts-mcp"]
    }
  }
}

Restart the client after adding it. The assistant now has the ApexCharts tools and will reach for them on its own. The one-click install links, VS Code setup and the other options are in the MCP server docs.

A real walkthrough

Here is an actual session. We asked for a chart, and the assistant used the server's tools to build it. Every block below is real tool output from apexcharts-mcp 0.12.0.

The request

Build me a stacked area chart of monthly revenue across three regions for the first half of 2025.

Step 1: the assistant checks the right format

Before writing anything, the assistant confirms how an area chart wants its data by calling apexcharts_list_types. The relevant part of the response:

{
  "type": "area",
  "name": "Area",
  "description": "Filled area chart, like line but with the area below the curve shaded.",
  "family": "cartesian",
  "seriesFormat": "axis",
  "dataFormat": "[{ name, data: [number | null] }] or [{ name, data: [{ x, y }] }]",
  "referenceFile": "cartesian-charts.md",
  "bundle": { "tier": 1 }
}

This is the step that prevents the most common failure. The assistant now knows an area chart takes the axis series format, not the flat number array a pie chart wants, so it will not mix them up. bundle.tier: 1 also tells it the default bundle has the type, so no extra import is needed.

Step 2: generate a valid config

Next the assistant calls apexcharts_generate_config with the type, the stacking flag, and the month categories. The server returns a complete, valid skeleton with placeholder data:

{
  "chart": { "type": "area", "height": 350, "stacked": true },
  "title": { "text": "Monthly Revenue by Region" },
  "series": [
    { "name": "Series 1", "data": [30, 40, 35, 50, 49, 60, 70] }
  ],
  "xaxis": { "categories": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] }
}

The structure is correct out of the box: chart.type is area, stacked is set, the series uses the axis format, and the x-axis has categories. The assistant swaps the placeholder for your real three-region data and you get a chart that renders on the first try:

That chart is the generated config filled with real numbers, rendered live on this page. No back-and-forth, no blank canvas.

Step 3: the validator catches a mistake

The generation step is useful, but the validator is what makes this different from a chatbot that only retrieves docs. Say you already have a pie chart config from somewhere else and it renders blank. A naive assistant often produces this, copying the axis format it uses for line and bar charts:

// Renders blank: pie charts do not take the axis series format
{
  chart: { type: 'pie' },
  series: [
    { name: 'Desktop', data: [44] },
    { name: 'Mobile', data: [55] },
    { name: 'Tablet', data: [13] }
  ],
  labels: ['Desktop', 'Mobile', 'Tablet']
}

Pass that to apexcharts_validate_config and it does not just say "invalid." It returns ok: false with a structured issue for each problem: the rule that was broken, the path to the offending field, a plain-language message, and a fix hint:

{
  "severity": "error",
  "rule": "wrong-series-format-non-axis",
  "path": "series[0].data",
  "message": "Chart type \"pie\" takes either a flat array of numbers (plus a top-level `labels` array) or series objects whose `data` holds `{ x, y }` points. Plain numbers inside a series object are dropped.",
  "fix": "Use series: [44, 55, 13] with labels: [\"A\", \"B\", \"C\"], or series: [{ data: [{ x: \"A\", y: 44 }, { x: \"B\", y: 55 }] }]."
}

The numbers inside those series objects are exactly what a pie chart drops. The corrected config the assistant writes back:

// Correct: a flat number array plus labels
{
  chart: { type: 'pie' },
  series: [44, 55, 13],
  labels: ['Desktop', 'Mobile', 'Tablet']
}

The assistant applies the fix and moves on, without you ever pasting broken code into your app and wondering why the canvas is empty.

Why this beats pasting into a raw chatbot

A plain chatbot answers from memory, and its memory of a specific library's API is fuzzy. The MCP server changes three things:

  • It validates before you paste. The apexcharts_validate_config tool is the direct equivalent of a linter for AI-generated chart code. It catches the wrong series shape for a chart type, radialBar values outside 0 to 100, hex colors missing a #, and conflicting options, and it returns a fix rather than a vague warning.
  • Its knowledge is versioned, not remembered. Calling apexcharts_get_reference with no arguments lists the bundled knowledge base, eleven files covering every chart family plus the feature platform and its bundle tiers, tree-shaking, server-side rendering, and framework wrappers. apexcharts_list_products reports which library version each product's guidance was verified against (apexcharts 8.7.0 in the npm release 0.12.0; the hosted server catches up when it is redeployed), so the assistant is working from current docs, not a training snapshot of unknown age.
  • It covers the whole family from one connection. The same server answers for grids, Gantt charts, trees, Sankey diagrams, stock charts, and maps, each with its own generate, validate, and reference tools.

Skill file or MCP server: which should I use?

Both exist, and they solve the same problem in different ways. The skill is a context file your assistant reads once and applies to every request, and it works with tools that do not speak MCP (ChatGPT, Gemini, Copilot). The MCP server adds live tools that generate and validate on demand. If your client supports MCP, use it, because it uses context more efficiently and can catch mistakes before you paste. You do not need both. The AI overview covers all three setup paths, including a browser-chat prompt for tools with no install.

Summary

The ApexCharts MCP server turns "the AI wrote chart code that does not run" into a non-problem. Connect it in one line, and your assistant stops guessing: it checks the correct data format with apexcharts_list_types, builds a valid skeleton with apexcharts_generate_config, catches mistakes with apexcharts_validate_config, and reads current docs with apexcharts_get_reference, all automatically. The validation step in particular is something a plain chatbot cannot do, and it is the difference between pasting code that works and debugging a blank canvas. Add it to your client, describe the chart you want, and let the tools handle the details. See the Build with AI page for every setup option, or read The State of JavaScript Charting in 2026 for where ApexCharts sits in the wider field.

Frequently asked questions

What is the ApexCharts MCP server?

It is a Model Context Protocol server that gives AI assistants tools to generate valid ApexCharts configs, validate configs against documented rules, and read the official knowledge base. It covers ApexCharts, ApexGrid, ApexGantt, ApexTree, ApexSankey, ApexStock, and ApexMaps. Connect to the hosted server at https://mcp.apexcharts.com/mcp, or run it on your own machine from the apexcharts-mcp npm package.

How do I install it in Claude Code?

Run 'claude mcp add --transport http apexcharts https://mcp.apexcharts.com/mcp' to use the hosted server, or 'claude mcp add apexcharts -- npx -y apexcharts-mcp' to run it locally. There is no account or API key.

Does it work with Cursor and Claude Desktop?

Yes. Any MCP-compatible client works, including Claude Code, Claude Desktop, Cursor, and VS Code. Clients that accept a remote server URL connect to https://mcp.apexcharts.com/mcp; any client can run 'npx -y apexcharts-mcp' locally instead.

Does the MCP server render charts?

No. It returns config objects, validation results, and documentation as text. Your app or your assistant's code renders the chart with the ApexCharts library, as with any other config.

Why does AI-generated ApexCharts code break without it?

Assistants guess at details they half-remember: the wrong series shape for pie and donut charts, a missing render() call, memory leaks from skipping destroy() on unmount, or wrong formatter signatures. The server encodes the correct patterns and validates against them, so those errors disappear.

Does the MCP server cost anything?

No. There is no charge for the MCP server or the skill packages. The libraries you build with follow their own licensing, so using them still requires the relevant ApexCharts plan.

Do I need the MCP server and the skill?

No, either works on its own. The skill is a context file; the MCP server adds live tools. If your assistant supports MCP, that is the better option.