# ApexCharts [Health: Active]

**Category:** 📊 Data Visualization  
**Repository:** https://github.com/apexcharts/apexcharts-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 3349  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/apexcharts

## Description
Generates and validates configs for ApexCharts charts, grid, gantt, tree, sankey, stock and maps.

## Tools
Capabilities this server exposes over MCP:

- **apexcharts_list_products** — Return every product (charts, gantt, tree, sankey, grid, stock, maps) currently exposed by this MCP server, with a "when to pick this" hint and the tool names it registers. Use this once at the start of a session to decide which product matches the user's task; then call that product's tools directly. Each product also reports `compatibility`: the bundled skill version and the upstream library version its guidance was verified against; use it to tell the user which library version this server targets. Results respect the APEXCHARTS_MCP_PRODUCTS env-var gating.
- **apexcharts_generate_config** — Build a minimal valid ApexCharts options object for a given chart type. Picks the correct series data format (axis vs non-axis) and supplies placeholder data when none is given. Use this as the starting point for a chart. Since apexcharts 8.0 the Tier 2 types (waterfall, dumbbell, streamgraph, raincloud, violin, icicle, sunburst, unit, waffle) are outside the default bundle: the page also needs that type's add-on import next to 'apexcharts', or `import ApexCharts from 'apexcharts/full'`; apexcharts_list_types names the import per type.
- **apexcharts_validate_config** — Check an ApexCharts options object against the data-format rules and known pitfalls (wrong series shape for chart type, radialBar values outside the min/max domain, undefined data points, conflicting tooltip flags, hex colors missing #, etc.). Returns structured issues so the caller can fix them. Returns ok: true when there are no errors (warnings still allowed).
- **apexcharts_list_types** — Return every ApexCharts chart type this server supports, with name, description, family (cartesian/bar/financial/circular/grid/radar/unit), series format (axis vs non-axis), expected data shape, the reference doc filename for deeper detail, and `bundle`: { tier: 1 } for a type the default bundle has, or for a Tier 2 type { tier: 2, import, scripts, since, failure, note? } naming the add-on it needs. Optionally filter by family.
- **apexcharts_get_reference** — Read authoritative ApexCharts documentation from the bundled apexcharts-skill knowledge base. Call with no arguments to list all available files (SKILL.md plus per-family reference docs). Call with `file` to return that file as markdown. Use this when you need to look up an option, formatter signature, plotOptions detail, or a fully worked example for a specific chart family.
- **apexgantt_generate_config** — Build a minimal valid ApexGantt options object. Generates a placeholder schedule (phases, dependencies, a milestone) when `tasks` is omitted, so the result can be rendered as-is. The placeholder dates are emitted in whatever `inputDateFormat` is chosen, so they parse without further work.
- **apexgantt_validate_config** — Check an ApexGantt options object against what the library does with it (missing id/name, tasks missing the dates the library requires, an incomplete `parsing` map, duplicate ids, orphan parentId, progress out of 0 to 100, ISO dates with the default MM-DD-YYYY format, dependency object using `id` instead of `taskId`, unknown dependency target, self-dependency, invalid dependency type, cycles, baseline missing start/end). Returns structured issues with stable rule ids.
- **apexgantt_get_reference** — Read authoritative ApexGantt documentation from the bundled apexgantt-skill knowledge base. Call with no arguments to list all available files. Call with `file` to return that file as markdown. Use this to look up task data format, dependency types, view modes, the update lifecycle, or framework integration.
- **apextree_generate_config** — Build a minimal valid ApexTree config split into `options` (constructor) and `data` (the root NestedNode passed to `tree.render(data)`). Generates a small 3-level org chart placeholder when `data` is omitted. Every node in the output has `children: []` even for leaves (ApexTree requires it).
- **apextree_validate_config** — Check an ApexTree config against what the library does with it: root is a NestedNode, every node has an id and a label, children (when present) is an array, ids unique across the whole tree, valid direction/edgeStyle/edgeColorMode/theme values, enableSelection is "single"|"multi"|false (NOT boolean true), and a warning when contentKey is "data" but a node has no `data` payload. Accepts both the wrapped `{ options, data }` shape and a bare root node.
- **apextree_get_reference** — Read authoritative ApexTree documentation from the bundled apextree-skill knowledge base. Call with no arguments to list available files; call with `file` to fetch markdown. Use this for the NestedNode data shape, grow directions, nodeTemplate, the graph API, or framework integration.
- **apexsankey_generate_config** — Build a minimal valid ApexSankey config split into `options` (constructor) and `data` (render payload). Generates a 5-node placeholder flow when nodes/edges are omitted so the result renders something visible. Use the result by calling `new ApexSankey(el, options)` then `sankey.render(data)`.
- **apexsankey_validate_config** — Check an ApexSankey config against what the library does with it (unique node ids, edges reference real nodes, no negative values, no self-loops, no parallel edges that collapse into one, nodes without edges). Cycles are allowed: they render as dashed loops. Accepts the wrapped `{ options, data }` shape from generate_config, the raw render payload `{ nodes, edges }`, or an ApexSankey.compare `{ before, after }` config.
- **apexsankey_get_reference** — Read authoritative ApexSankey documentation from the bundled apexsankey-skill knowledge base. Call with no arguments to list available files; call with `file` to fetch markdown. Use this for the { nodes, edges, options } data shape, layer ordering, styling, or framework integration.
- **apexgrid_generate_config** — Build a minimal valid `<apex-grid>` config: `{ columns, data }`. When both are omitted, a small users table is generated. When only `columns` is omitted, they are inferred from the keys of the first data row with `type` inferred per column. Pass `enableSortAndFilter: true` to opt every generated column in.
- **apexgrid_validate_config** — Check an apex-grid `{ columns, data }` config against apexgrid-skill rules: columns/data required and array-shaped, every column.key must be a real key of the data rows, column.key unique, type is one of apex-grid's column types (string, number, boolean, date, currency, select and the other presentation types), sort/filter is boolean or config object. Returns structured issues with stable rule ids.
- **apexgrid_get_reference** — Read authoritative apex-grid documentation from the bundled apexgrid-skill knowledge base. Call with no arguments to list available files; call with `file` to fetch markdown. Use this for ColumnConfiguration, Lit cellTemplate, sort/filter, data pipeline, or framework integration.
- **apexstock_generate_config** — Build a minimal valid ApexStock options object for a financial / stock chart. Generates a placeholder OHLCV candle series when `data` is omitted, so the result renders as-is. Note: ApexStock does not bundle ApexCharts. The host provides the constructor per instance (`new ApexStock(el, options, { ApexCharts })`), once app-wide (`ApexStock.setApexCharts(ApexCharts)`), or as the `window.ApexCharts` global. That is a host-page concern, not part of this options object.
- **apexstock_validate_config** — Check an ApexStock options object against the rules in apexstock-skill (missing series/data, flat o/h/l/c keys instead of a y:[o,h,l,c] array, malformed or inconsistent OHLC tuples, missing/invalid x, non-ascending data, invalid theme.mode, and unknown indicator keys). Returns structured issues with stable rule ids.
- **apexstock_get_reference** — Read authoritative ApexStock documentation from the bundled apexstock-skill knowledge base. Call with no arguments to list all available files. Call with `file` to return that file as markdown. Use this to look up the OHLC data format, indicators, streaming/appendData, trading overlays, theming, or framework integration.
- **apexmaps_generate_config** — Build a minimal valid ApexMaps options object for a geographic visualization. Supports the six series types: choropleth (default), bubble, marker, arc, line, hexbin. Geometry comes from the built-in registry (e.g. "world/countries", "us", "eu/nuts2"), so no GeoJSON is needed. Generates a small placeholder dataset when data is omitted. Use the result with `new ApexMaps(el, options)` then `await map.render()`.
- **apexmaps_validate_config** — Check an ApexMaps options object against what the library does with it: geo.map present and a built-in map id (or a URL / inline geometry), hex layouts only where one exists, a frameable geo.view.fit, known series types, arc from/to endpoints, line paths, bubble/marker coordinates or something to join on, hexbin point positions and aggregates (a hexbin has no joinBy), [lon, lat] ordering, joinBy shape, null (not undefined) for missing values, and known scale / projection / palette names. Returns structured issues with stable rule ids, severity, path, and a fix when there is a one-shot remedy.
- **apexmaps_get_reference** — Read authoritative ApexMaps documentation from the bundled apexmaps-skill knowledge base. Call with no arguments to list available files; call with `file` to fetch markdown. Use this for series datum shapes, joins, the geometry registry, projections, scales, drilldown, theming, or framework integration.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation & README

# apexcharts-mcp

A [Model Context Protocol](https://modelcontextprotocol.io) server that gives AI assistants like Claude expert-level help with the **ApexCharts ecosystem**: charts, gantt, tree, sankey, grid, stock, and maps. It generates valid configs, catches common mistakes, and serves the official knowledge base for each product on demand, so the AI gets your visualization right the first time.

One MCP, seven products. Tools are namespaced per product (`apexcharts_*`, `apexgantt_*`, `apextree_*`, `apexsankey_*`, `apexgrid_*`, `apexstock_*`, `apexmaps_*`) so you can use any combination together.

## Install

Pick your editor / client. You only need to do this once.

### Hosted server (nothing to install)

The quickest way: point your client at the hosted server, `https://mcp.apexcharts.com/mcp`. It needs no Node.js and stays on the latest release.

**Claude Code**

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

**Cursor**, in `~/.cursor/mcp.json`:

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

**VS Code**, in `.vscode/mcp.json`:

```json
{
  "servers": {
    "apexcharts": {
      "type": "http",
      "url": "https://mcp.apexcharts.com/mcp"
    }
  }
}
```

Any other client that accepts a remote MCP server URL (Streamable HTTP) connects the same way. To run the server on your own machine instead, use one of the local installs below.

### Claude Code

```bash
claude mcp add apexcharts -- npx -y apexcharts-mcp
```

### Claude Desktop

Add to `claude_desktop_config.json`:

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

### Cursor

Add to `~/.cursor/mcp.json`:

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

After installing, restart the client. Your AI assistant now has tools for every ApexCharts product, with no further commands needed.

## What you can ask the AI

Once installed, the assistant uses the server's tools automatically. Things you can ask:

- *"Build me a stacked area chart of monthly revenue across three regions."*
- *"Here's my pie chart config — why isn't it rendering?"* (paste the config)
- *"What data format does ApexGantt expect for dependencies?"*
- *"Show me the recursive node shape ApexTree uses."*
- *"How do I configure layer ordering in ApexSankey?"*
- *"Explain `cellTemplate` in apex-grid and give me an example."*
- *"Map unemployment by US state as a choropleth with ApexMaps."*

The AI decides which tool to call. You don't invoke them directly.

## Tools

| Product   | Tools |
|-----------|-------|
| **meta** | `apexcharts_list_products` |
| **apexcharts** | `apexcharts_generate_config`, `apexcharts_validate_config`, `apexcharts_list_types`, `apexcharts_get_reference` |
| **apexgantt** | `apexgantt_generate_config`, `apexgantt_validate_config`, `apexgantt_get_reference` |
| **apextree** | `apextree_generate_config`, `apextree_validate_config`, `apextree_get_reference` |
| **apexsankey** | `apexsankey_generate_config`, `apexsankey_validate_config`, `apexsankey_get_reference` |
| **apexgrid** | `apexgrid_generate_config`, `apexgrid_validate_config`, `apexgrid_get_reference` |
| **apexstock** | `apexstock_generate_config`, `apexstock_validate_config`, `apexstock_get_reference` |
| **apexmaps** | `apexmaps_generate_config`, `apexmaps_validate_config`, `apexmaps_get_reference` |

Every product exposes `generate_config` (build a valid config from a short spec) and `validate_config` (check a config against its skill's rules and return structured issues), plus `get_reference` to read that product's knowledge base on demand. The chart tools add `apexcharts_list_types` (a typed catalog of the 30 supported chart types, including the v6 additions violin, funnel, pyramid, gauge, unit, waffle, sunburst and histogram, the v7.1 additions waterfall, dumbbell, streamgraph and raincloud, the v7.6 addition icicle, and `column`, the synonym for `bar` that `chart.type` accepts since v7.9; each entry's `bundle` field says whether the default bundle has the type or names the add-on import a Tier 2 type needs); `apexcharts_generate_config` covers all 30 and `apexcharts_validate_config` checks against 40 rules. `apexcharts_list_products` is a meta tool that lists the products this server exposes, their tool names, and the upstream library version each product's guidance targets.

## Limiting which products load

By default, all seven products' tools are registered. To load only a subset, set `APEXCHARTS_MCP_PRODUCTS` to a comma-separated list of product ids:

```json
{
  "mcpServers": {
    "apexcharts": {
      "command": "npx",
      "args": ["-y", "apexcharts-mcp"],
      "env": { "APEXCHARTS_MCP_PRODUCTS": "charts,gantt" }
    }
  }
}
```

Valid ids: `charts`, `gantt`, `tree`, `sankey`, `grid`, `stock`, `maps`. Unknown ids are skipped with a stderr warning; the server still starts.

## Running over HTTP

The install commands above run the server locally over stdio. To serve it over the network instead (for a shared team server, or a client that only takes a URL), start it with `--http`:

```bash
npx -y apexcharts-mcp --http --port 3000
```

It speaks [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) at `/mcp` and answers a dependency-free health check at `/healthz`. Connect a client to it:

```bash
claude mcp add --transport http apexcharts http://localhost:3000/mcp
```

The server is **stateless** and answers every request with plain JSON. Every tool is a quick read-only call, so it keeps no sessions and opens no long-lived streams: `GET` and `DELETE` on `/mcp` return 405, which the spec defines as "this server offers neither". Nothing outlives a single request, so it runs behind any load balancer without sticky sessions or a raised idle timeout.

| Setting | Default | Meaning |
|---|---|---|
| `--port` or `PORT` | `3000` | Port to listen on |
| `--host` or `APEXCHARTS_MCP_HOST` | `127.0.0.1` | Address to bind. Use `0.0.0.0` in a container |
| `APEXCHARTS_MCP_ALLOWED_HOSTS` | `localhost,127.0.0.1,[::1]` | Hostnames `/mcp` answers for (DNS-rebinding defence), or `*`. Set it to your public hostname when exposing the server |
| `APEXCHARTS_MCP_ALLOWED_ORIGINS` | none | Browser origins that may call `/mcp` (CORS), or `*`. Requests without an `Origin` header, which is every IDE and desktop client, are always accepted |
| `APEXCHARTS_MCP_PRODUCTS` | all | Same as in stdio mode |

Request bodies are capped at 1 MiB. Each request writes one JSON line to stdout naming the JSON-RPC method and tool (never the arguments); diagnostics go to stderr. `SIGTERM` lets in-flight requests finish before exiting.

A [Dockerfile](https://github.com/apexcharts/apexcharts-mcp/blob/HEAD/Dockerfile) builds a production image that listens on port 3000 inside the container:

```bash
docker build -t apexcharts-mcp .
docker run -d -p 127.0.0.1:3100:3000 --memory=256m \
  -e APEXCHARTS_MCP_ALLOWED_HOSTS=mcp.example.com,localhost apexcharts-mcp
```

Configure the container through environment variables rather than flags; its `HEALTHCHECK` reads `PORT`.

## Knowledge base

Authoritative guidance comes from the per-product skill packages on npm:

- [`apexcharts-skill`](https://www.npmjs.com/package/apexcharts-skill): SKILL.md + cartesian/bar/financial/circular/grid/radar references + the feature platform and its bundle tiers (the v8 default bundle, add-on imports, `apexcharts/full`), tree-shaking, SSR, framework wrappers
- [`apexgantt-skill`](https://www.npmjs.com/package/apexgantt-skill): task data, dependencies, columns/toolbar, events, editing (CRUD/undo/calendar), the task-list grid (sort/filter/group), interaction (UI state, draw-to-create, export), framework wrappers
- [`apextree-skill`](https://www.npmjs.com/package/apextree-skill): data format, graph API, framework wrappers
- [`apexsankey-skill`](https://www.npmjs.com/package/apexsankey-skill): data format, styling/interaction, framework wrappers
- [`apexgrid-skill`](https://www.npmjs.com/package/apexgrid-skill): columns/templates, data pipeline, sort/filter, state and interaction features (row pinning/reordering, undo-redo, validators, localization), framework integration, vanilla JS
- [`apexstock-skill`](https://www.npmjs.com/package/apexstock-skill): OHLC data format, technical indicators, streaming/appendData, trading overlays, the analysis workspace (range statistics, drawdown, measurements, comparison), state and export, theming, framework wrappers
- [`apexmaps-skill`](https://www.npmjs.com/package/apexmaps-skill): series data formats, geo joins, geometry registry, projections, scales, drilldown, framework wrappers

They're regular dependencies: to pick up upstream improvements, bump the version in this repo's [package.json](https://github.com/apexcharts/apexcharts-mcp/blob/HEAD/package.json) and in the product's `packages/mcp-<id>/package.json` (see [CLAUDE.md](https://github.com/apexcharts/apexcharts-mcp/blob/HEAD/CLAUDE.md)). Each skill repo is the source of truth for its own docs.

---

## Contributing

For working on `apexcharts-mcp` itself.

```bash
git clone https://github.com/apexcharts/apexcharts-mcp.git
cd apexcharts-mcp
npm install
npm run build
```

This is an npm workspace monorepo:

```
apexcharts-mcp/
  src/index.ts            # bootstrap: reads APEXCHARTS_MCP_PRODUCTS, wires up products, picks stdio or --http
  Dockerfile              # production image for HTTP mode
  packages/
    mcp-core/             # shared types and the reference-reader factory
    mcp-http/             # stateless Streamable HTTP transport, /healthz, Host/Origin policy
    mcp-charts/           # apexcharts_* tools
    mcp-gantt/            # apexgantt_* tools
    mcp-tree/             # apextree_* tools
    mcp-sankey/           # apexsankey_* tools
    mcp-grid/             # apexgrid_* tools
    mcp-stock/            # apexstock_* tools
    mcp-maps/             # apexmaps_* tools
```

The build runs `tsc -b` across all workspaces, then bundles `src/index.ts` (plus all workspace packages) into a single `dist/index.js` via esbuild. Skill packages stay external because they resolve file paths via `import.meta.url`.

Run the server directly (for manual testing):

```bash
node dist/index.js          # stdio
node dist/index.js --http   # HTTP on 127.0.0.1:3000
```

Point your client at the local build instead of the published package:

```bash
claude mcp add apexcharts -- node /absolute/path/to/apexcharts-mcp/dist/index.js
```

Common scripts:

```bash
npm run dev        # tsc -b --watch
npm test           # vitest
npm run typecheck  # tsc -b
npm run clean      # remove all dist/ output
```

Keeping the bundled knowledge base honest (see [CLAUDE.md](https://github.com/apexcharts/apexcharts-mcp/blob/HEAD/CLAUDE.md) for the full loop):

```bash
npm run check:versions       # is any upstream library ahead of what its skill was verified against?
npm run check:chart-types    # hard gate: every chart type the library ships is documented and supported
npm run check:surface-delta  # what shipped since the pin that the docs never mention
npm run verify:skills        # signal: doc examples referencing names the types don't have
```

