Docs menu
MCP for AI assistants
Let Claude, Claude Code or Cursor draw charts and hand you their URLs, through Chartshot's MCP server.
Chartshot's MCP server lets an AI assistant draw charts. Ask Claude for "a line chart of weekly signups 12, 18, 15, 22, 30" and it calls Chartshot, shows you the chart, and gives you a URL you can paste into an email, a Slack message or a document.
It works in any app that connects to remote MCP servers. You need:
- The server URL,
https://api.chartshot.dev/mcp. - A secret key from the Keys page, sent as the header
Authorization: Bearer sk_live_….
The MCP server comes with every plan, Free included. Charts drawn through it count against your plan like any others.
Claude
Add Chartshot once on the web and it works in Claude on the web, Claude Desktop and the mobile apps. Claude sends your key in a request header, which is in beta in Claude: if you don't see Request headers in step 4, your account doesn't have it yet, so use Claude Code or Cursor for now.
On Free, Pro and Max (Free can add one custom connector):
- Open Customize › Connectors, click + Add, then Add custom connector.
- Name it
Chartshot, enter the server URL,https://api.chartshot.dev/mcp, and click Continue. - Under Authentication, choose No sign-in.
- Under Request headers, choose the
authorizationheader and enterBearerfollowed by your secret key, with the space. - Click Add.
On Team and Enterprise, an owner adds it for everyone:
- Open Organization settings › Connectors, click Add, then Custom, then Web.
- Enter the server URL and choose No sign-in, then add the
authorizationheader as in step 4 above. - Click Add. Members then click Connect beside Chartshot under Customize › Connectors.
Everyone in the organization then uses the same key, so make a key just for it on the Keys page.
Claude Desktop connects to remote servers only through these settings, not through claude_desktop_config.json. Claude reaches the server from Anthropic's cloud, so nothing runs on your computer.
Claude Code
With your secret key in CHARTSHOT_SECRET_KEY, or pasted in its place:
claude mcp add --transport http chartshot https://api.chartshot.dev/mcp \
--header "Authorization: Bearer $CHARTSHOT_SECRET_KEY"Add --scope user to use it in every project. Run /mcp in Claude Code to check that Chartshot shows as connected. Keep the key out of a project's .mcp.json, which is usually committed.
Cursor
Add Chartshot to ~/.cursor/mcp.json to use it in every project, or to .cursor/mcp.json in one project. Cursor fills in ${env:CHARTSHOT_SECRET_KEY} from your environment, so the key stays out of the file:
{
"mcpServers": {
"chartshot": {
"url": "https://api.chartshot.dev/mcp",
"headers": { "Authorization": "Bearer ${env:CHARTSHOT_SECRET_KEY}" }
}
}
}Tools
| Tool | What it does |
|---|---|
render_chart | Draws a chart from a spec and returns the image, its alt text and a URL that draws the same chart. |
create_chart_url | Draws and stores a chart, and returns its short c.chartshot.dev URL. Best for emails and anything other people will open later. Pro and up. |
list_chart_types | Every chart type, when to use it, and a small spec to start from. |
list_themes | The built-in themes and the themes saved on your account. |
Both chart tools take the same spec as the API, described in the spec reference. When a spec isn't valid, the assistant gets back each field at fault and a valid example of the chart type, so it can fix the spec and try again. Fields the spec doesn't know are ignored, and the assistant is told which.
How assistants' charts are drawn
Charts drawn by render_chart are at scale 1 unless the spec sets scale, and 800×400 pixels unless it sets preset, width or height, so the image stays small in the conversation. KPI cards and sparklines keep their own sizes. Ask for "scale 2" or "email size" when the chart is going somewhere else. An image over 5 MB once encoded, more than a tool result carries, comes back as its alt text and URL instead.
The image the assistant sees is always a PNG. The URL draws the chart in the spec's format:
- On Pro and up it's a signed URL that works for 90 days.
- On Free it's a keyless URL, with the Chartshot badge, as Free charts have. A chart over 5,000,000 pixels gets no URL, since keyless URLs draw up to that size.
create_chart_url stores the chart as the spec describes it, at scale 2 unless the spec says otherwise. Stored charts are kept for 90 days on Pro and a year on Team and Business.
Things to ask
- "Show weekly signups 12, 18, 15, 22, 30 as a line chart."
- "Make a donut chart of traffic by source from this table, in the ocean theme, dark mode."
- "Turn these monthly revenue numbers into a bar chart I can put in an email, and give me the URL."
- "Which chart types can Chartshot draw?"