AI models know amCharts 5 well - but how you use them makes a big difference. This guide covers the key scenarios and how to get the most out of each one.
Quick downloads - drop these into your project for immediately better AI-generated charts:
Rules file (works as AGENTS.md, .cursorrules, CLAUDE.md, etc.)
All major AI models (Claude, ChatGPT, Gemini, etc.) have amCharts 5 in their training data. That means they can produce working chart code out of the box - no special setup needed.
However, AI models have a knowledge cutoff date. They were trained on a snapshot of the internet, and anything added or changed after that date is invisible to them. This matters for newer amCharts features, recent API changes, or less common chart types where the model’s memory may be incomplete.
The good news: most AI platforms now offer web search and documentation fetching tools that let the model look things up in real time. When available, these tools dramatically improve code accuracy.
The bottom line: the closer the AI is to current documentation, the better the results. There are three ways to help:
Bundled docs - AGENTS.md and a docs/ folder that come with the library itself, matching the version you installed. Nothing to set up: just tell the AI where they are.
MCP Server - the AI queries our documentation, examples, and API reference on demand. Use the hosted server (just add a URL, no install) or run it yourself. Works with any MCP client: Claude Code, Cursor, Windsurf, VS Code + Copilot, Codex CLI, Gemini CLI, Cline, Zed, and browser chat: claude.ai from the Connectors Directory, ChatGPT as a plugin.
AI Skill - a structured reference the AI reads upfront. Works with any AI tool, including those without MCP support.
The sections below cover how to get the best results depending on your setup.
Since version 5.21.0, both the npm package and the ZIP download include docs written for AI coding agents:
AGENTS.md - the entry point: the rules most often broken, and where to look for what.
docs/ - a copy of the amCharts 5 skill: docs/index.md with core rules and patterns, and docs/references/ with a file per chart family.
examples/ - working code for every chart type, listed with descriptions and tags in examples/examples.json.
The big advantage: they match the exact version you have installed, so the AI never works from docs that are ahead of or behind your code. AGENTS.md also tells the AI to check CHANGELOG.md for anything newer than the docs.
To use them, point your AI tool at the file. For example, add this line to your project’s rules file (AGENTS.md, CLAUDE.md, .cursor/rules/, etc.):
With the ZIP download, use the path where you placed the amCharts files instead.
The bundled docs work with any AI tool that can read project files, and work offline. For the full documentation and API reference, add the MCP server as well.
Browser-based AI services like Claude, ChatGPT, and Gemini have built-in web search capabilities. When the model isn’t sure about a specific API detail, it can search the web, read the amCharts documentation, and verify its answer before responding.
This happens automatically in most cases - you don’t need to do anything special.
Even better: connect the chat to our hosted MCP server, for direct, on-demand access to the full amCharts documentation, examples, and API reference - no install required. In Claude, add amCharts 5 from the Connectors Directory. In ChatGPT (Free plan too), open Plugins > + > Add custom MCP server, set the URL to https://mcp.amcharts.com/mcp and Authentication to No authentication, click Create as a plugin, then type @amCharts in a chat. See the MCP server guide.
Claude.ai also accepts skills directly. Download the amCharts 5 Skill repo as a ZIP, go to Settings > Skills > Upload skill, and toggle it on. Claude will then apply the amCharts rules in every chat without you having to paste anything.
Claude artifacts and similar in-chat previews run the chart in a sandbox that only loads scripts from a few public CDNs. cdn.amcharts.com is not one of them, so the chart stays blank, or the AI switches to another library.
amCharts 5 is available on cdnjs, which these sandboxes allow. Add this to your prompt:
cdnjs URLs always need a version number. Any 5.x version works; the latest one is listed on cdnjs. Only low-detail maps (*Low.js) are available there. See Public CDNs for details.
Pro tip: If the AI produces code that doesn’t look right, paste the error back and ask it to check the amCharts docs. Models with web search can self-correct very effectively.
Example prompt:
Prompt
Thiscodethrows"[object Object] is not a valid color"online42.
This covers IDE assistants (Cursor, Windsurf, VS Code + Copilot) and terminal agents (Claude Code, Codex CLI, Gemini CLI). They are powerful, but many of them don’t search the web by default. When the AI works from training data alone, it may get API details wrong - especially for advanced or newer features.
Unlike browser-based chat, most editor assistants see your project files and codebase, but won’t browse the web or read external documentation unless you set this up or ask for it explicitly.
This leads to:
Occasionally incorrect method names or option structures
Mixing up amCharts 4 and amCharts 5 syntax
Missing newer features added after the model’s training cutoff
The amCharts 5 MCP Server is the easiest and most comprehensive way to give your AI assistant access to amCharts documentation. It provides 1,500+ documents on demand: 140+ documentation pages, 280+ code examples, and 1,000+ class API references. The AI queries only what it needs - no manual copying, no context waste.
Works with Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot, Codex CLI, Gemini CLI, Cline, Zed, and any other MCP client - and browser chat: claude.ai (from the Connectors Directory) and ChatGPT (as a plugin). The hosted server needs no install; clients that only speak stdio can bridge to it with npx mcp-remote https://mcp.amcharts.com/mcp.
This is the single most impactful thing you can do if MCP is not available. By indexing the amCharts docs in your editor, the AI gets direct access to accurate, up-to-date API information every time it generates code.
In Cursor:
Open Cursor Settings > Indexing & Docs
Click “+ Add Doc”
Paste: https://www.amcharts.com/docs/v5/
Let Cursor index the pages
When prompting, use @Docs amCharts to include the documentation as context
If your editor supports custom documentation indexing, you can connect it to the amCharts docs in a similar way. Check your editor’s documentation for details.
Every AI editor and agent reads a rules file from your project root that guides its behavior. We provide a ready-made file with the critical amCharts 5 patterns, common pitfalls, and v4-to-v5 migration rules.
The simplest option is to save it as AGENTS.md in your project root. That one file is read natively by Cursor, Windsurf, VS Code + Copilot, Codex CLI, Gemini CLI, Zed, and Claude Code (when no CLAUDE.md is present). If you already have a tool-specific file, append the contents to it instead:
Cursor - .cursor/rules/amcharts5.mdc (the legacy .cursorrules still works)
Windsurf - .windsurf/rules/amcharts5.md (the legacy .windsurfrules still works)
VS Code + Copilot - .github/copilot-instructions.md
Claude Code - CLAUDE.md (or a CLAUDE.md containing just @AGENTS.md to share one file)
Gemini CLI - GEMINI.md
If amCharts 5 is installed in your project, the rules file can simply point to the bundled docs instead - they always match your installed version.
We also provide a single AI skill - a structured reference that AI agents can read on demand. It follows the Anthropic skill spec with one central SKILL.md entry point and separate reference files per chart family. This works with any AI tool, including those without MCP support.
The AI reads SKILL.md first (core patterns + which reference to load), then reads only the relevant reference file for the chart type being built. This keeps context lean and focused.
For Claude Code - copy the skill folder into your project’s .claude/skills/ folder and it is picked up automatically. The skill is in the amcharts5-skill subfolder of the repository:
If you’ve already installed the MCP server, you may not need this - the MCP server includes all the same content and more.
For Claude.ai - download the repo as a ZIP and upload it under Settings > Skills.
For Cursor / Windsurf / Copilot / Codex CLI / Gemini CLI - place the folder in your project root or a docs/ folder and reference it from your rules file (e.g. “Read docs/amcharts5-skill/SKILL.md before writing chart code”). Cursor can also pull it in per prompt with @file.
For any API - paste SKILL.md plus the relevant reference into the system prompt.
Having a working amCharts example file in your project gives the AI something concrete to learn from. Create a file like charts/example-chart.ts with a well-structured chart, and the AI will pick up on patterns like import structure, root element creation, and theme application.
Tools without MCP support; offline or air-gapped setups
Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot, Codex CLI, Gemini CLI, and claude.ai / ChatGPT (via connector)
Stays up to date
Manual update needed (git pull)
Hosted server is always current; local install updates via npx
Recommendation: If your tool supports MCP, use the MCP server - it has much more content and uses context more efficiently. If your tool doesn’t support MCP, use the skill. You can also use both.
If you’re building tools or applications that use AI to generate amCharts code programmatically (via the Claude API, OpenAI API, or Gemini API), you can enable web search as a tool to get the same quality boost.
Instead of (or alongside) web search, you can attach our hosted MCP server directly via the MCP connector, giving the model on-demand access to amCharts docs. Both halves are required: mcp_servers declares the server, and an mcp_toolset entry in tools exposes it to the model.
When using any API, include a system prompt that guides the model. For even better results, include the content of the relevant skill file in your system prompt - this gives the model a compact, accurate reference for the chart type you need.
Pro tip: For API usage without web search or MCP, paste SKILL.md plus the relevant reference file (e.g., references/xy.md) directly into your system prompt. This gives the model all the critical patterns without needing to search.
Not all AI models produce equally good chart code. Based on our testing, here are the models that currently generate the most accurate and idiomatic amCharts 5 output. Model names change every few months - if a newer version of any of these has shipped, use that.
Strongest at understanding large codebases and complex configurations. Produces clean, well-structured chart code with correct v5 patterns. Excellent at self-correction when pointed to docs.
Complex charts, multi-panel stock charts, large projects
GPT-5.6 (Sol)
OpenAI’s flagship, used in ChatGPT, Codex, and the API. Reliable code generation across many chart types and strong when mixing amCharts with React, Angular, or Vue boilerplate.
Mid-tier of the GPT-5.6 family. Close to Sol on chart code at roughly half the price.
Claude Haiku 4.5
Fast and cheap. Fine for simple charts and edits, especially with the MCP server or skill attached.
DeepSeek V4
Strong open-weight option. Good reasoning on chart configuration, but may need more explicit prompting for amCharts-specific patterns.
Qwen3 Coder
Capable coding model, especially for local/self-hosted setups. Performs well with the rules file to guide it.
Mistral Codestral
Good for IDE integrations. Benefits significantly from having the skill or rules file in the project.
Key insight: The gap between “best” and “also good” models shrinks dramatically when you provide context - whether through MCP, web search, the skill, or the rules file. A mid-tier model with the right context often outperforms a top model without it.
Codex CLI and Gemini CLI follow the Claude Code column: MCP via their own config file, AGENTS.md / GEMINI.md as the rules file, web search available, and the skill folder anywhere in the project.
Browser-based chat gives the best results out of the box - web search is built in and handles most cases automatically. Adding the MCP connector or uploading the skill makes it even better. For charts shown inside the chat, load amCharts from cdnjs.
Code editors and CLI agents need a little setup but can match browser-quality results. The MCP server is the fastest path - add the hosted URL (or one install command) and the AI gets 1,500+ documentation pages, code examples, and API references.
The single biggest improvement in any scenario is making sure the AI has access to the amCharts 5 documentation, whether through MCP, web search, doc indexing, the skill, the bundled docs, or pasting docs into the prompt.
Always specify amCharts 5 in your prompts to avoid confusion with older versions. An AGENTS.md with our rules file does this for every prompt.
For MCP-compatible tools (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot, Codex CLI, Gemini CLI), add the MCP server - it’s the most comprehensive and context-efficient option available.
Still unsure where to start? Open Claude or ChatGPT, browse our demo gallery where most demos include sample AI prompts you can copy, and see the results for yourself.