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.

Most MCP-compatible tools - including Claude, Claude Desktop, ChatGPT, and others - support adding an MCP server by URL.

  1. Open your tool's MCP settings (might go by different names like "connectors", "integrations", "apps")
  2. Add a new MCP server with the URL https://mcp.chartr.ai/mcp
  3. 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.

  1. Get your API key from Chartr.ai Settings
  2. Configure your MCP client to connect to https://mcp.chartr.ai/mcp with this header:
x-api-key: YOUR_API_KEY

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:

ToolDescription
get_charting_guidelinesGet universal charting guidelines, chart type selection guidance, and the recommended workflow. Call this once at the start of a charting session.
get_chart_schemaGet the JSON schema, rules, and a working example for a specific chart type
render_chartRender a chart directly from structured JSON data

Typical workflow

  1. get_charting_guidelines - discover available chart types and when to use each one
  2. get_chart_schema - get the exact JSON structure for a chosen chart type
  3. render_chart - create the chart

get_chart_schema parameters

ParameterTypeRequiredDescription
codestringYesChart type id (from get_charting_guidelines)

render_chart parameters

ParameterTypeRequiredDescription
chartobjectYesChart data matching the schema. Must include a code field identifying the chart type.
imageOptionsobjectNoControls what appears in the image (see below)
savebooleanNoSave the chart to your account (default: false)

imageOptions

{ "withTitle": true, "withFootnotes": true, "withBackground": true }

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