Skip to main content
Glama
klar-mcp

klar-mcp

Official

Why Klar

  • The charts other libraries don't have. Candlestick with volume, order-book depth, yield curve, volatility surface, Kaplan–Meier with log-rank test, forest plot, raincloud, spectrogram, flame graph, dependency Gantt, chord, Sankey and more, next to the everyday line, bar, area, pie and funnel.

  • Zero chart dependencies. Every chart is hand-written SVG in React: no D3, no Recharts, no canvas framework. What you install is what renders.

  • Light and dark, one prop. Design tokens are scoped to <ThemeScope>, so they never touch the rest of your app or your shadcn/ui theme.

  • Accessible and exportable. Keyboard navigation, screen-reader descriptions, data-table views, and SVG/PNG/CSV export built in.

  • Yours to own. Import from npm, or copy any chart's source into your project with the shadcn CLI.

  • Built for AI assistants. An MCP server and a Claude Code plugin let your coding assistant pick the right chart for your data and install it.

Related MCP server: microcharts

Install

Pick the way that fits your project. All three install the same charts.

npm

npm i klar-charts
import 'klar-charts/styles.css' // or, with Tailwind v4: @import 'klar-charts/tailwind.css';
import { ThemeScope, LineChart } from 'klar-charts'

export function Revenue() {
  return (
    <ThemeScope theme="light" accent="#3366ff">
      <LineChart
        x={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']}
        series={[{ id: 'mrr', label: 'MRR', values: [42, 47, 51, 58, 63, 71] }]}
        unit="currency"
        ariaLabel="Monthly recurring revenue"
      />
    </ThemeScope>
  )
}

shadcn

Copies one chart, and only the files it needs, into components/klar/:

npx shadcn@latest add https://klar.run/r/fin-candlestick.json

Every chart page in the atlas shows its command. Whole dashboards install the same way, e.g. https://klar.run/r/dashboard-halo.json.

Your AI assistant (MCP)

# Claude Code
claude mcp add klar -- npx -y klar-mcp

# or as a plugin, with a Klar skill included
/plugin install klar --marketplace klar-run/klar

Works with Cursor, VS Code, Windsurf, Claude Desktop and any MCP client. Then just ask: "add a Kaplan–Meier chart of survival by arm to the trial page". Setup for every tool →

Twelve example dashboards

Complete dashboards built from the charts, with layout, navigation and sample data. Install one as source and swap in your data.

What's in the box

Collection

Charts

Basics

Line, area, stacked and grouped bar, pie, scatter, bubble, funnel, waterfall, box plot, timeline, KPI cards

Finance

Candlestick, order-book depth, yield curve, volatility surface, drawdown, correlation matrix, market treemap

Science

Kaplan–Meier, forest plot, regression with bands, raincloud, hexbin, histogram + KDE, spectrogram, parallel coordinates

BI

Bullet, bump, slope, dumbbell, Marimekko, Pareto, calendar heatmap

Engineering

Flame graph, Sankey, chord, network graph, dependency Gantt, radial dendrogram, wind rose

Kit

Sparklines, gauges, radars, rings, dot matrices, hatched columns, waffles

Plus 42 charts drawn for the example dashboards: Sankeys, hex maps, lane maps, cohort triangles, streamgraphs and more.

Contributing

Issues and pull requests are welcome. CONTRIBUTING.md covers the repository layout, how the npm package, shadcn registry and MCP server are built, and how to run the tests.

Questions or ideas: open an issue or write to hello@qtech.ee.

License

MIT. Every company, person and number in the examples is fictional.

Available Tools

11 tools
get_chartGet one Klar chartA
Read-only

Everything needed to use one chart: description, tags, its props (with comments) and data types taken from the component source, a usage example, the files and npm packages it needs, whether it is standalone, and for a bespoke chart the dashboard it belongs to. Accepts an id from list_charts, a short id ("candlestick"), a component name ("KaplanMeier") or a name.

Inputs: id (required), target_dir.

get_dashboardGet a Klar dashboardA
Read-only

Details for one dashboard: summary, signature charts, the ids of the charts it contains (each installable on its own with install_chart), its files with line counts, the kit modules it imports, and a preview screenshot. Accepts a slug ("meridian"), a product name ("Meridian Freight") or a description ("freight control tower").

Inputs: slug (required), preview.

get_guideGet a Klar guideC
Read-only

"charts": the end-to-end workflow for finding, choosing, installing and wiring a chart, with data-shaping tips. "setup": requirements, CSS wiring and rendering. "design": how to adapt a dashboard (brand, data, copy) and build new screens in the same style.

Inputs: topic (required).

install_chartInstall Klar charts into a projectA
Idempotent

Copies one or more charts into the project (default /src/klar): each chart component plus exactly the files it imports, klar.css and ThemeScope. Rewrites imports to relative paths, never overwrites existing files unless overwrite is true, and adds the charts to the generated index.ts. Returns the files written, the npm packages still missing, the CSS import step, and an import line and usage snippet per chart. Does not copy the rest of the kit or any dashboard.

Inputs: ids (required), project_dir (required), dry_run, overwrite, +1 more.

install_dashboardsInstall whole Klar dashboards into a projectA
Idempotent

Copies the Klar kit and the chosen dashboards into the project (default /src/klar), rewriting imports to relative paths and generating an index.ts. Dashboards can be given as slugs or names. Never overwrites existing files unless overwrite is true. Returns the files written and the remaining setup steps (packages to install, CSS import, render snippet). For a single chart use install_chart instead.

Inputs: project_dir (required), dry_run, overwrite, dashboards, +2 more.

list_chartsList Klar chartsA
Read-only

Lists Klar's 110 charts, one line each: id · name · collection (or the dashboard a bespoke chart belongs to) · kind · tags. With no arguments it returns ALL of them, compact enough to scan and choose from. Filters narrow the list; "query" is a fuzzy search over names, tags and descriptions (typos and partial words are fine). Start here when the user wants a chart.

Inputs: tag, kind, limit, query, +2 more.

list_chart_tagsList chart tags, kinds and collectionsA
Read-only

The vocabulary for list_charts: every tag with the number of charts carrying it, plus the kinds, collections and dashboards with counts.

Inputs: no named parameters.

list_componentsList Klar kit componentsA
Read-only

Lists the reusable kit modules (shell, UI, charts, lib) and what each file exports. For charts prefer list_charts, which has descriptions and tags.

Inputs: no named parameters.

list_dashboardsList Klar dashboardsA
Read-only

Lists the 12 example dashboards built from the charts: product, purpose, category, default theme, accent and signature charts. Optional "query" (fuzzy over name, title, summary, category, signature charts) and "category" narrow the list.

Inputs: query, category.

read_fileRead a Klar source fileA
Read-only

Returns the source of one kit or dashboard file, e.g. "components/charts/finance/Candlestick.tsx", "dashboards/orbit/index.tsx" or "klar.css". Imports use the "@/" alias for the kit root; the install tools rewrite them to relative paths. Use it to study or adapt a file, not to copy it by hand.

Inputs: path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool maps to a distinct resource and action: list/get/install for charts and dashboards, separate kit-module/file tools, and search is explicitly scoped as the cross-entity fallback. Descriptions route ambiguous discovery cases clearly, so an agent can select the right tool without guessing.

    Naming Consistency5/5

    All names are lowercase snake_case and verb-led (list_, get_, install_, search, read_, get_guide), with no mixed casing or style. The noun-less 'search' is a conventional exception and remains unambiguous.

    Tool Count5/5

    Eleven tools is well within the ideal 3-15 range for a chart/dashboard kit server. Each tool covers a distinct phase—discovery, inspection, installation, or guidance—and none feels redundant.

    Completeness4/5

    The surface covers discovery, detailed inspection, installation, source reading, and guidance for both charts and dashboards. Minor lifecycle gaps remain, such as no explicit uninstall/remove or installed-state inspection, but agents can work around these with normal file operations.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides documentation and component references for the Reacticx React Native library, including props, code examples, and installation guides. It enables users to search through over 90 components and retrieve setup commands for project dependencies.
      5
      17 npm
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Renders word-sized charts — sparklines, bars, bullets and 100+ more types — to self-contained SVG with generated alt text, small enough to sit inline in a model's reply or a table cell. Three tools: find the right chart for a question, get its wiring, and render it.
      3
      4,695 npm
      209
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Generates pure CSS and SVG charts for web pages and markdown docs, eliminating the need for chart libraries, and provides injection guidance.
      3
      197 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Deterministic chart engine for AI agents. A small JSON spec renders locally to PNG or SVG with no headless browser. 47 chart types, tiled dashboards and 8 scientific plots (Kaplan-Meier, volcano, Bland-Altman, Q-Q).
      1
      AGPL 3.0