flint-chart-mcp

v1.1.1
flint-chart-mcp Checked 20 hours ago Published 14 days ago

Model Context Protocol server for Flint — compile, validate, and render semantic chart specs across supported backends.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

render_chart Render chart

Compile a Flint chart spec for a backend and render it to a STATIC image (PNG) or vector (SVG), returned inline. Rendering is local/in-process. The chartjs backend supports PNG only. Prefer show instead when the host supports MCP App UIs; use render_chart for a static artifact or when no App UI is available.

ParameterTypeDescription
backend *stringRendering backend. One of: vegalite, echarts, chartjs.
chart_spec *As `chart.chart_spec` on the show tool.
data *As `chart.data` on the show tool.
backgroundstringBackground color (CSS color). Default: #ffffff.
field_display_namesAs `chart.field_display_names` on the show tool.
formatstringOutput format. Default: png. chartjs supports png only.
interaction_specAs `chart.interaction_spec` on the show tool.
optionsAs `chart.options` on the show tool.
scalenumberDevice scale for PNG raster (1 = design size, 2 = retina). Default: 1.
semantic_typesAs `chart.semantic_types` on the show tool.
theme_specAs `chart.theme_spec` on the show tool.

compile_chart Compile chart spec

Compile a Flint chart spec to a backend-native spec object (Vega-Lite / ECharts / Chart.js) without rendering. Returns the spec JSON, assembly warnings, and the computed layout size.

ParameterTypeDescription
backend *stringRendering backend. One of: vegalite, echarts, chartjs.
chart_spec *As `chart.chart_spec` on the show tool.
data *As `chart.data` on the show tool.
field_display_namesAs `chart.field_display_names` on the show tool.
interaction_specAs `chart.interaction_spec` on the show tool.
optionsAs `chart.options` on the show tool.
semantic_typesAs `chart.semantic_types` on the show tool.
theme_specAs `chart.theme_spec` on the show tool.

validate_chart Validate chart spec

Validate a Flint chart spec for a backend without rendering. Every backend returns the validation result as JSON (also in structuredContent). For vegalite, a second block follows: the report of what to act on (errors, warnings, interaction_spec entries the chart drops, and update ops that will not apply, ✗), the same report show returns; "Nothing to fix" when it is clean. For a host with no card UI; with a card, call show directly, which runs the same check. Nothing is kept between calls.

ParameterTypeDescription
backend *stringRendering backend. One of: vegalite, echarts, chartjs.
chart_spec *As `chart.chart_spec` on the show tool.
data *As `chart.data` on the show tool.
field_display_namesAs `chart.field_display_names` on the show tool.
interaction_specAs `chart.interaction_spec` on the show tool.
optionsAs `chart.options` on the show tool.
semantic_typesAs `chart.semantic_types` on the show tool.
theme_specAs `chart.theme_spec` on the show tool.
updatesAs `chart.updates` on the show tool.

list_chart_types List chart types

The chart types, each with its channels and a one-line note on what it is for, for a backend (or all). Pass `chartType` for one type in full: its guidance (map keys, which bar chart), its chartProperties with values, defaults and effects, and the interaction presets it supports in interaction_spec (Vega-Lite).

ParameterTypeDescription
backendstringRendering backend. One of: vegalite, echarts, chartjs.
chartTypestringOne chart type name, for its guidance, properties and presets.

list_interaction_presets List interaction presets

List the interaction presets for interaction_spec: what the reader does, what each needs from the chart, its reset gestures, and every option it accepts under `options`. Pass `chartType` for the presets a Vega-Lite chart type supports, or `type` for one preset. Which presets answer a request and how they combine is in get_flint_skill with skill "interaction", section "Add interactions".

ParameterTypeDescription
chartTypestringA Vega-Lite chart type name from list_chart_types.
typestringOne preset type, for its options alone.

get_flint_skill Get Flint skill

Return a bundled Flint skill as markdown. Read it once before you write the matching spec: `chart` for a ChartAssemblyInput, `theme` for a ThemeSpec, `interaction` for an interaction_spec or ChartUpdate layers (updates), `board` for a board spec, `app` for code that uses flint-chart in an application. Pass `section` with a heading to get only that part; an unknown section lists the headings. The same text is served as the flint://agent-skill, flint://theme-skill, flint://interaction-skill, flint://board-skill and flint://app-skill resources.

ParameterTypeDescription
skill *stringWhich skill: chart, theme, interaction, board, or app.
sectionstringOne heading of the skill, e.g. "Update the chart" or "Muted annotations".

list_themes List themes

List Flint visual theme presets for `theme_spec` (for example, `theme_spec: "economist"`). Pass an `id` for preset-specific authoring guidance. To customize a preset, use an object with `extends` and a small set of overrides.

ParameterTypeDescription
idstring

validate_board Validate board

Check a board of several Flint charts without drawing it, for a host with no card UI or a static image; with a card, call show directly, which runs the same check. The report gives the layout in one line, what to fix before it draws, and what it would draw with. Before the first board, call get_flint_skill with skill "board".

ParameterTypeDescription
charts *As `board.charts` on the show tool.
colorsAs `board.colors` on the show tool.
columnsAs `board.columns` on the show tool.
gridAs `board.grid` on the show tool.
link_specAs `board.link_spec` on the show tool.
sourceAs `board.source` on the show tool.
subtitleAs `board.subtitle` on the show tool.
theme_specAs `board.theme_spec` on the show tool.
titleAs `board.title` on the show tool.

show Show chart or board

Put a chart or a board on screen: pass the full spec as chart or as board; there is no need to validate first. show checks the spec: one with errors, or with something it must not be drawn with (rows drawn as slices, a link that joins nothing), draws nothing and returns what to fix, so call show again with the fixed spec. Otherwise the card draws it live with an editing panel, and the result notes what it drew with; change nothing for those unless the user asks. Nothing is kept: to change what is on screen, change the spec and call show again; a new card shows it and earlier cards stay as they…