MCP
Connect your AI tools Chartr.ai using the Model Context Protocol (MCP) to generate charts and boards with natural language.
There are two ways to authenticate: OAuth (recommended) or an API key.
Option 1: OAuth (recommended)
Most MCP-compatible tools - including Claude, Claude Desktop, ChatGPT, and others - support adding an MCP server by URL.
- Open your tool's MCP settings (might go by different names like "connectors", "integrations", "apps")
- Add a new MCP server with the URL
https://mcp.chartr.ai/mcp - You'll be redirected to sign in with Chartr.ai
That's it. No API key or extra configuration needed.
Option 2: API Key
For tools or workflows where OAuth isn't available, you can authenticate with an API key.
- Get your API key from Chartr.ai Settings
- Configure your MCP client to connect to
https://mcp.chartr.ai/mcpwith this header:
How you pass the header depends on your tool. Check your MCP client's documentation for how to set custom headers on an MCP server connection.
Available Tools
The MCP server provides three tools:
| Tool | Description |
|---|---|
get_charting_guidelines | Get universal charting guidelines, chart type selection guidance, and the recommended workflow. Call this once at the start of a charting session. |
get_chart_schema | Get the JSON schema, rules, and a working example for a specific chart type |
render_chart | Render a chart directly from structured JSON data |
Typical workflow
get_charting_guidelines- discover available chart types and when to use each oneget_chart_schema- get the exact JSON structure for a chosen chart typerender_chart- create the chart
get_chart_schema parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Chart type id (from get_charting_guidelines) |
render_chart parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chart | object | Yes | Chart data matching the schema. Must include a code field identifying the chart type. |
imageOptions | object | No | Controls what appears in the image (see below) |
save | boolean | No | Save the chart to your account (default: false) |
imageOptions
All default to true. Set any to false to exclude that element from the rendered image.
REST API
The MCP tools call the same backend as the REST API. Use the REST API for direct HTTP access from scripts or apps.
Example prompts
Once connected, you can ask your AI tool things like:
- "Create a timeline of major AI milestones using Chartr"
- "Make a flowchart for user authentication"
- "Generate a 2x2 matrix comparing programming languages using Chartr"
- "Build a sequence diagram for an API request flow"
The agent handles the tool calls automatically.
Support
Questions or issues? Contact us at support@chartr.ai