ApexCharts
com.apexchartsv0.9.3更新于 Oct 7, 2026
Generates and validates configs for ApexCharts charts, grid, gantt, tree, sankey, stock and maps.
概览
让助手生成并校验 ApexCharts 的图表、甘特图、树图、桑基图、表格、股票图和地图配置,并查阅官方参考资料。
- 功能
- 该服务器为七个 ApexCharts 产品提供按产品命名空间的工具。每个产品都有 generate_config,可根据简短说明生成有效配置;validate_config 按规则集检查现有配置并返回结构化问题;get_reference 可按需读取该产品的知识库。图表工具还提供受支持的图表类型目录,另有一个元工具列出各产品、工具名称及其对应的上游库版本。
- 适用场景
- 适合助手编写或调试 ApexCharts 可视化、需要准确的选项名称、数据格式和规则校验而非猜测的场景。可用于图表、甘特图、树图、桑基图、表格、股票图和地图的配置工作,包括排查无法渲染的配置。
- 运行要求
- 可使用托管的 Streamable HTTP 端点,或通过 npm 包 apexcharts-mcp 在本地运行,需要 Node.js。无需身份验证、API 密钥或环境变量。可选设置包括用 APEXCHARTS_MCP_PRODUCTS 限制加载哪些产品;HTTP 模式下还有端口、主机、允许的主机名和允许的来源。
安装
在 SourceWeft 中
- 打开 控制台中的 ApexCharts,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"mcp": {
"type": "http",
"url": "https://mcp.apexcharts.com/mcp"
}
}
}README
apexcharts-mcp
A Model Context Protocol 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
Cursor, in ~/.cursor/mcp.json:
VS Code, in .vscode/mcp.json:
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
Claude Desktop
Add to claude_desktop_config.json:
Cursor
Add to ~/.cursor/mcp.json:
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
cellTemplatein 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
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 29 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, and the v7.6 addition icicle); apexcharts_generate_config covers all 29 and apexcharts_validate_config checks against 39 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:
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:
It speaks Streamable HTTP at /mcp and answers a dependency-free health check at /healthz. Connect a client to it:
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.
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 builds a production image that listens on port 3000 inside the container:
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— SKILL.md + cartesian/bar/financial/circular/grid/radar references + the feature platform and its v7 bundle tiers, tree-shaking, SSR, framework wrappersapexgantt-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 wrappersapextree-skill— data format, graph API, framework wrappersapexsankey-skill— data format, styling/interaction, framework wrappersapexgrid-skill— columns/templates, data pipeline, sort/filter, state and interaction features (row pinning/reordering, undo-redo, validators, localization), framework integration, vanilla JSapexstock-skill: OHLC data format, technical indicators, streaming/appendData, trading overlays, the analysis workspace (range statistics, drawdown, measurements, comparison), state and export, theming, framework wrappersapexmaps-skill: series data formats, geo joins, geometry registry, projections, scales, drilldown, framework wrappers
They're regular dependencies — bump the version in this repo's package.json to pick up upstream improvements. Each skill repo is the source of truth for its own docs.
Contributing
For working on apexcharts-mcp itself.
This is an npm workspace monorepo:
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):
Point your client at the local build instead of the published package:
Common scripts:
Keeping the bundled knowledge base honest (see CLAUDE.md for the full loop):
License
MIT
来源:README.md,提交 ea4966d
工具
0版本历史
1- v0.9.3最新Oct 7, 2026
