Semiotic

io.github.nteractPublished by GitHub account nteractv3.13.3Updated Oct 30, 2026

Verified React chart generation: select, validate, repair, render, and inspect charts through MCP.

VerifiedStreamable HTTPWeb executableDeveloper ToolsData & AnalyticsMedia & Design

Overview

AI-generated overview

Semiotic's MCP server lets an assistant pick, validate, render and audit React chart configurations, returning SVG output plus render evidence.

What you can do
  • Select and render charts: create a chart from data and props, returning SVG plus render evidence such as mark counts and axis domains
  • Inspect and repair configurations: diagnose problems, assess data fit, propose repairs or variants, and explain a chart's structure
  • Audit charts: run design, accessibility and mobile diagnostics with prioritized findings
  • Look up schemas: return canonical prop-schema guidance for code editing and advanced configuration
When to use it
Useful when building React data visualizations with an assistant and you want the chart configuration checked, rendered and repaired rather than guessed. It fits projects needing network graphs, streaming or coordinated views, or when you want accessibility and design diagnostics on generated charts.
Requirements
Runs as a local stdio process via npx with the semiotic package, or as an HTTP endpoint; no API keys or authentication are required for local stdio. The library itself requires React 18.1+ or React 19. HTTP mode binds to 127.0.0.1 by default and needs an origin allowlist for browser requests.
Before you install
Rendering and diagnostics are read-only, but the server returns chart code and configuration that you then apply to your project. HTTP mode is unauthenticated unless MCP_AUTH_TOKEN is set, and public exposure requires explicit host and origin allowlists. Audit results are diagnostics, not proof of accessibility or legal compliance.

Installation

In SourceWeft

  1. Open Semiotic in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.nteract%2Fsemiotic/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "semiotic": {
      "type": "http",
      "url": "https://semiotic-mcp-server-481507046413.us-west1.run.app/mcp"
    }
  }
}

README

[MCP Toplist]

[Semiotic]

[CI] [npm version] [TypeScript] [MseeP.ai Security Assessment Badge]

[MCP Queen operational grade]

A React data visualization library designed for AI-assisted development and streaming data.

Start with a small chart component. Add network graphs, streaming data and coordinated views when the task needs them. Structured schemas, diagnostics and rendering evidence help coding assistants implement, check and repair chart configurations.

Work through a complete task: check category totals, maintain a live chart, or correct a published chart. The source task packets identify their build and evidence scope; source availability does not establish installed or deployed parity.

[Semiotic release dashboard showing chart count, bundle sizes, capability coverage, chart families, and documentation growth]

What's New in 3.13.3

3.13.3 improves streaming chart suggestions with field cardinality, additivity, and schema warnings, and adds count aggregation for realtime histograms. Streaming charts preserve extents, hover detail, and keyboard focus as data changes. Pie, donut, and network charts use more of their available space, with matching server rendering. This release also improves chart error recovery, legend fitting, heatmap colors, and compositional routing.

See the changelog for the complete fixes and additions.

Why Semiotic

Semiotic is a data visualization library for React that combines broad chart coverage with AI tooling. It supports network graphs, streaming data, statistical distributions and coordinated views, with schemas, examples and diagnostics for implementing and checking each task. Check the project's existing dependencies first: extending its current charting library may be the best fit for a small change.

Built for AI-assisted development

Semiotic provides a workflow for generating, checking and repairing chart configurations. The July 27, 2026 evaluation reports model- and task-specific results; it does not guarantee first-try correctness.

  • semiotic/ai — a single import with the schema-backed chart capability catalog (XY, ordinal, network, realtime, geo, value, and portable recipes), optimized for LLM code generation. See ai/surface-manifest.json for the generated current inventory. Named imports now tree-shake across published chunks. Prefer family subpaths (semiotic/xy, semiotic/geo, semiotic/value, …) in production code to keep the intended chart family explicit; the cold-consumer table below reports initial-load and on-demand costs.
  • ai/schema.json — machine-readable prop schemas for every component
  • npx -y -p semiotic semiotic-mcp — an MCP server for tool-based chart rendering in any MCP client
  • npx -p semiotic semiotic-ai --doctor — validate component + props JSON from the command line with typo suggestions and anti-pattern detection
  • diagnoseConfig(component, props) — programmatic anti-pattern detector with actionable fixes, spanning validation, encoding, accessibility, and misleading-design (deception) checks
  • auditData(component, props, data?) — chart-aware numeric preflight for inputs that pass schema validation but break the math: non-finite values, zero-span domains, invalid log inputs, negative size geometry, unsafe normalized totals, and scale-dominating outliers. Returns bounded row evidence and flows into diagnoseConfig, Chart Clinic, CLI doctor, and opt-in ChartContainer notifications
  • AGENTS.md — concise repository workflow shared by modern coding agents; CLAUDE.md imports it and Copilot receives a short compatibility bridge
  • ai/reference.md — complete on-demand product reference, kept out of always-loaded coding-agent context
  • llms.txt — machine-readable documentation following the emerging standard

Every chart includes a built-in error boundary, dev-mode validation warnings with typo suggestions, and accessibility features (canvas aria-label, keyboard-navigable legends, keyboard live-region announcements, SVG <title>/<desc>) so AI-generated code fails gracefully with actionable diagnostics instead of a blank screen.

Accessibility is a release surface

The European Accessibility Act has applied to covered products and services since 28 June 2025. A chart library cannot certify an application's legal compliance: scope, content, surrounding controls, testing, and national enforcement remain the application owner's responsibility. Semiotic supplies testable infrastructure for that work: keyboard interaction, accessible data tables, layered descriptions, structured navigation, reduced-motion and forced-colors paths, and WCAG-derived contrast tests for shipped theme presets. See the Accessibility docs and run the application's own assistive-technology and user testing.

Beyond standard charts

Network visualization. Force-directed graphs, Sankey diagrams, chord diagrams, tree layouts, treemaps, circle packing, and orbit diagrams — all as React components with the same prop API as LineChart.

Streaming data. Realtime charts render on canvas at 60fps with a ref-based push API. Rapid network edge pushes coalesce into one layout per animation frame, while read/mutation methods preserve synchronous read-after-write semantics. Built-in decay, pulse, and staleness encoding for monitoring dashboards.

Coordinated views. LinkedCharts provides hover cross-highlighting, brush cross-filtering, coordinate-based linked crosshairs, and selection synchronization across any combination of chart types through shared selection state.

Geographic visualization. Choropleth maps, proportional symbol maps, flow maps with animated particles, and distance cartograms — all canvas-rendered with d3-geo projections, zoom/pan, tile basemaps, and drag-rotate globe spinning.

Statistical summaries. Box plots, violin plots, swarm plots, histograms, LOESS smoothing, forecast with confidence envelopes, and anomaly detection. Marginal distribution graphics on scatterplot axes with a single prop.

First-class annotations. Annotations are data-bound objects, not post-hoc artwork. Labels, callouts, thresholds, enclosures, statistical overlays, and React widgets move with the chart and render through browser, SSR, and export paths. Opt into placement, hierarchy, density, progressive disclosure, audience-aware amount, provenance, and editorial lifecycle when the chart needs to communicate more than its encoding alone.

Choose the API layer

LayerForExample
ChartsCommon chart forms with chart-level props<LineChart data={d} xAccessor="x" yAccessor="y" />
FramesFull control over rendering, interaction, and layout<StreamXYFrame chartType="line" lineStyle={...} />

Chart HOCs register only the mark plugins they need. Direct StreamXYFrame loads the remaining built-ins on first client paint. Call registerBuiltInXYPlugins() from semiotic/xy or semiotic/realtime/core before the first render when SSR or the first frame must include marks.

Every Chart component accepts a frameProps prop to access the underlying Frame API without leaving the simpler interface.

Serialization and interop

Charts serialize to JSON and back: toConfig, fromConfig, toURL, copyConfig, configToJSX. Have Vega-Lite specs? fromVegaLite(spec) translates them to Semiotic configs — works with configToJSX() for full round-trip from notebooks and AI-generated specs.

Need an external pitfall review? The experimental unstable_toDataPitfallsChain() builds a dependency-free chain input for datapitfalls, combining the Semiotic config, JSX, reader grounding, diagnostics, accessibility audit, and optional rendered SVG/image evidence:

ts
import { unstable_toDataPitfallsChain } from "semiotic/experimental"import { detectPitfalls } from "datapitfalls"
const input = unstable_toDataPitfallsChain("LineChart", props, {  narrative: "Monthly sales are accelerating.",  rendered: { svg, evidence },})
const report = await detectPitfalls(input, { apiKey: process.env.ANTHROPIC_API_KEY })

The return path stays dependency-free too. Use whole-chart findings as ChartContainer notifications, and only turn findings into annotations after your app can anchor them to marks or semantic positions:

tsx
import { ChartContainer } from "semiotic"import { LineChart } from "semiotic/xy"import {  unstable_toDataPitfallsAnnotations,  unstable_toDataPitfallsNotifications,} from "semiotic/experimental"
const notifications = unstable_toDataPitfallsNotifications(report)const annotations = unstable_toDataPitfallsAnnotations(report, {  anchorFor: (finding) =>    finding.ruleId === "truncated-axis" ? { x: 9, y: 9000 } : null,})
<ChartContainer notifications={notifications}>  <LineChart {...props} annotations={annotations} /></ChartContainer>

When to use something else

Need a standard bar or line chart for a dashboard you'll never need to customize beyond colors and labels? Recharts has a larger ecosystem and more community examples. Need GPU-accelerated rendering for millions of data points? Apache ECharts handles that scale.

Semiotic is for projects that outgrow those libraries — when you need network graphs alongside time series, streaming data alongside static snapshots, or coordinated views across chart types.

Install

bash
npm install semiotic

Requires React 18.1+ or React 19.

Quick Examples

Coordinated Dashboard

Hover one chart and highlight the same data in another through a shared selection:

jsx
import { LinkedCharts, Scatterplot, BarChart } from "semiotic"
<LinkedCharts>  <Scatterplot    data={data} xAccessor="age" yAccessor="income" colorBy="region"    linkedHover={{ name: "hl", fields: ["region"] }}    selection={{ name: "hl" }}  />  <BarChart    data={summary} categoryAccessor="region" valueAccessor="total"    selection={{ name: "hl" }}  /></LinkedCharts>

Streaming Metrics with Decay

Live data fades old points, flashes new ones, flags stale feeds:

jsx
import { RealtimeLineChart } from "semiotic"
const chartRef = useRef()chartRef.current.push({ time: Date.now(), value: cpuLoad })
<RealtimeLineChart  ref={chartRef}  timeAccessor="time"  valueAccessor="value"  decay={{ type: "exponential", halfLife: 100 }}  staleness={{ threshold: 5000, showBadge: true }}/>

Network Graphs

Force-directed graphs and Sankey diagrams — same API as LineChart:

jsx
import { ForceDirectedGraph, SankeyDiagram } from "semiotic"
<ForceDirectedGraph  nodes={people} edges={friendships}  colorBy="team" nodeSize={8} showLabels/>
<SankeyDiagram  edges={budgetFlows}  sourceAccessor="from" targetAccessor="to" valueAccessor="amount"/>

Geographic Visualization

Choropleth maps, flow maps, and distance cartograms with canvas rendering, zoom/pan, tile basemaps, and animated particles:

jsx
import { ChoroplethMap, FlowMap, DistanceCartogram } from "semiotic/geo"
<ChoroplethMap  areas={geoJsonFeatures} valueAccessor="gdp"  colorScheme="viridis" projection="equalEarth" zoomable tooltip/>
<FlowMap  nodes={airports} flows={routes} valueAccessor="passengers"  showParticles particleStyle={{ color: "source", speedMultiplier: 1.5 }}/>
<DistanceCartogram  points={cities} center="rome" costAccessor="travelDays"  showRings costLabel="days" lines={routes}/>

Streaming System Monitor

Live service topology with threshold alerting and click-to-inspect:

jsx
import { StreamNetworkFrame, ChartContainer, DetailsPanel, LinkedCharts } from "semiotic"
const chartRef = useRef()chartRef.current.push({ source: "API", target: "Orders", value: 15 })
<LinkedCharts>  <ChartContainer title="System Monitor" status="live"    detailsPanel={      <DetailsPanel position="right" trigger="click">        {(datum) => <div>{datum.id}: {datum.value} req/s</div>}      </DetailsPanel>    }>    <StreamNetworkFrame ref={chartRef} chartType="sankey"      showParticles particleStyle={{ proportionalSpeed: true }}      thresholds={{ metric: n => n.value, warning: 100, critical: 250 }}    />  </ChartContainer></LinkedCharts>

Standard Charts

Line, bar, scatter, and area charts share the same accessor-driven API:

jsx
import { LineChart, BarChart } from "semiotic"
<LineChart  data={salesData}  xAccessor="month" yAccessor="revenue"  curve="monotoneX" showPoints/>
<BarChart  data={categoryData}  categoryAccessor="department" valueAccessor="sales"  orientation="horizontal" colorBy="region"/>

All Chart Components

CategoryComponents
XYLineChart AreaChart DifferenceChart StackedAreaChart Scatterplot ConnectedScatterplot BubbleChart Heatmap QuadrantChart MultiAxisLineChart MinimapChart CandlestickChart ScatterplotMatrix
CategoricalBarChart StackedBarChart GroupedBarChart LikertChart SwimlaneChart FunnelChart SwarmPlot BoxPlot Histogram ViolinPlot RidgelinePlot DotPlot PieChart DonutChart GaugeChart
NetworkForceDirectedGraph ChordDiagram SankeyDiagram ProcessSankey TreeDiagram Treemap CirclePack OrbitDiagram
GeoChoroplethMap ProportionalSymbolMap FlowMap DistanceCartogram
RealtimeRealtimeLineChart RealtimeHistogram RealtimeSwarmChart RealtimeWaterfallChart RealtimeHeatmap
CoordinationLinkedCharts
LayoutChartGrid ContextLayout CategoryColorProvider
FramesStreamXYFrame StreamOrdinalFrame StreamNetworkFrame StreamGeoFrame

Vega-Lite Translation

Paste a Vega-Lite spec, get a Semiotic chart:

jsx
import { fromVegaLite } from "semiotic/data"import { configToJSX, fromConfig } from "semiotic"
const config = fromVegaLite({  mark: "bar",  data: { values: [{ a: "A", b: 28 }, { a: "B", b: 55 }] },  encoding: {    x: { field: "a", type: "nominal" },    y: { field: "b", type: "quantitative" },  },})
// Render directlyconst { componentName, props } = fromConfig(config)// → componentName: "BarChart", props: { data, categoryAccessor: "a", valueAccessor: "b" }
// Or generate JSX codeconfigToJSX(config)// → <BarChart data={[...]} categoryAccessor="a" valueAccessor="b" />

Supports bar, line, area, point, rect, arc, tick marks with encoding translation for color, size, aggregation, and binning.

Conversation Arc Telemetry

Capture and replay the path an AI-assisted chart session took:

ts
import {  createLocalStorageConversationArcSink,  enableConversationArc,  getConversationArcStore,  loadConversationArc,  registerConversationArcSink,} from "semiotic/ai"
const sink = createLocalStorageConversationArcSink({ key: "my-app:arc" })registerConversationArcSink(sink)enableConversationArc({ sessionId: "session-abc" })
getConversationArcStore().record({ type: "chart-rendered", component: "LineChart" })loadConversationArc(sink.load(), { enabled: false })

Bundle Sizes

Semiotic ships 42 stable JavaScript entry points (41 subpaths plus the root). Don't import from "semiotic" unless you need everything — use the smallest sub-path that matches your charts or tooling.

Custom network layouts can opt into a virtual zoom/pan viewport through semiotic/network/zoom. It exports ZoomableNetworkCustomChart and projected-size/LOD hooks; ordinary chart imports exclude its gesture and LOD runtime.

The numbers below are first-party artifact cost: the gzip size of Semiotic's own code for each sub-path. They exclude React and other runtime dependencies, and each row counts every chunk the entry can reach, including code loaded only on demand, so they are not a prediction of a cold application bundle. Do not add artifact rows to estimate an app: dependency resolution and cross-import deduplication happen in the consumer bundler and are measured separately below.

Entry PointgzipWhat's inside
semiotic/atlas325 KBMotif Braid, Dependency Forest, and Flow Circuit readers
semiotic/atlas/core15 KBNetwork Atlas preparation, projections, and evidence queries
semiotic/access31 KBChart Access Contract factory and first-wave baseline contracts
semiotic/evidence48 KBChart Evidence Envelope, deterministic hashing, and publication gate
semiotic/artifact126 KBRenderer-independent contracts, claims, time, policy, grounding, and transfer audits
semiotic/artifact/react4 KBAccessible progressive disclosure for artifact contracts and policy evaluations
semiotic/line151 KBLineChart only — one-chart micro boundary
semiotic/xy188 KBLineChart, AreaChart, Scatterplot, Heatmap, + 8 more XY charts
semiotic/ordinal140 KBBarChart, PieChart, BoxPlot, Histogram, + 11 more categorical charts
semiotic/network184 KBForceDirectedGraph, SankeyDiagram, ProcessSankey, Treemap, + 4 more
semiotic/network/zoom193 KBOptional virtual network viewport, camera controls and consumer-owned LOD
semiotic/network/perspective2 KBIsometric pictograms and an accessible perspective toggle (the prop ships in ./network)
semiotic/network/perspective/core3 KBProjection sizing, resolution, and SVG placement helpers
semiotic/vite1 KBBuild plugin for unused Semiotic worker assets
semiotic/geo115 KBChoroplethMap, FlowMap, DistanceCartogram, ProportionalSymbolMap
semiotic/wordcloud132 KBWordCloud, shaped text placement, and portable layouts
semiotic/realtime223 KBRealtimeLineChart, RealtimeHistogram, + 4 streaming charts
semiotic/realtime/core221 KBStreaming chart types, HOCs, and buffer helpers
semiotic/realtime/react7 KBStream status and synced push hooks
semiotic/server290 KBrenderChart, renderDashboard, renderToImage, renderToAnimatedGif
semiotic/server/node290 KBrenderChart, renderDashboard, renderToImage, renderToAnimatedGif
semiotic/server/edge295 KBrenderChart, renderChartWithEvidence, renderToStaticSVG, renderDashboard
semiotic/utils112 KBThemeProvider, numeric/accessibility audits, serialization — no chart components
semiotic/utils/core103 KBPure theme helpers, numeric/accessibility audits, and serialization
semiotic/utils/react9 KBThemeProvider, useTheme, useReducedMotion, useHighContrast, useStreamStatus
semiotic/recipes118 KBPure layout functions (waffle, marimekko, flextree, dagre, …)
semiotic/recipes/core115 KBPure layout functions (waffle, marimekko, flextree, dagre, …)
semiotic/recipes/react3 KBGlyph and React layout-selection helpers
semiotic/themes13 KBTheme presets only (tufte, carbon, etc.)
semiotic/themes/core13 KBTheme presets and token helpers
semiotic/themes/react8 KBThemeProvider/useTheme and hooks
semiotic/data5 KBbin, rollup, groupBy, pivot, fromVegaLite
semiotic/value6 KBBigNumber — focal-value KPI / scorecard (SingleValueFrame POC)
semiotic/physics191 KBGaltonBoardChart, EventDropChart, UnitPileChart, CollisionSwarmChart, PacketFlowChart, PhysicsCustomChart
semiotic/physics/matter1 KBMatter.js migration helpers + optional peer guard (no chart components)
semiotic/physics/rapier1 KBRapier peer guard + adapter decision metadata (no chart components)
semiotic/ai696 KBAll schema-backed charts + validation — optimized for LLM code generation
semiotic/ai/core148 KBsuggestCharts, auditData, describeChart, repairChartConfig, tool adapters — no chart components
semiotic/controls19 KBDirectManipulationControl, CircularBrush, LinearBrush, MobileStandardControls, auditVisualizationControls — no frame renderer
semiotic/rough3 KBOptional deterministic Rough.js paint backend — exact Semiotic geometry remains authoritative
semiotic/text2 KBOptional Pretext annotation hook — peer package excluded
semiotic439 KBFull chart API and shared utilities

Cold-consumer named imports

The table above is first-party artifact cost, not an application bundle. The generated table below measures a different thing: a fresh consumer bundles one retained named import from a packed semiotic tarball through the public export path, with code splitting as an application build does. Initial load is what a page downloads before the chart renders; on demand is code fetched only when a feature needs it. It includes Semiotic and its resolved runtime dependencies, but externalizes React/React DOM and optional adapter peers that the host application owns. Each row starts cold, so use it to compare one public import choice—not to add together an application's rows. The checked machine-readable baseline is benchmarks/setup/cold-consumer-imports.json; refresh it after a production build with npm run docs:cold-consumer.

Method: fresh npm pack --ignore-scripts tarball → temporary consumer → minified/tree-shaken Rolldown (Vite's bundler) ESM build with code splitting and a production NODE_ENV → gzip -9 per file. Initial load counts the entry and its statically imported chunks; on demand counts chunks fetched only when a feature needs them (brushing, marginal graphics, animated transitions, a bare frame's built-in layouts). React/React DOM and optional adapter peers are external; Semiotic and its resolved runtime dependencies are included.

Public named importRuntimegzip initial loadgzip on demand
import { semioticVite } from "semiotic/vite"node0.6 KiB—
import { getNetworkPerspectiveSize } from "semiotic/network/perspective/core"browser1.1 KiB—
import { MotifBraidChart } from "semiotic/atlas"browser112.5 KiB29.4 KiB
import { prepareNetworkAtlas } from "semiotic/atlas/core"browser7.1 KiB—
import { LineChart } from "semiotic"browser126.4 KiB44.4 KiB
import { LineChart } from "semiotic/xy"browser126.2 KiB32.4 KiB
import { LineChart } from "semiotic/line"browser126.3 KiB32.5 KiB
import { BarChart } from "semiotic/ordinal"browser107.2 KiB14.7 KiB
import { SankeyDiagram } from "semiotic/network"browser136.3 KiB6.6 KiB
import { ZoomableNetworkCustomChart } from "semiotic/network/zoom"browser115.7 KiB29.4 KiB
import { isometricGlyphs } from "semiotic/network/perspective"browser1.4 KiB—
import { RealtimeLineChart } from "semiotic/realtime"browser127.4 KiB42.2 KiB
import { RingBuffer } from "semiotic/realtime/core"browser0.7 KiB13.6 KiB
import { useStreamStatus } from "semiotic/realtime/react"browser0.8 KiB—
import { GaltonBoardChart } from "semiotic/physics"browser96.2 KiB2.7 KiB
import { MATTER_PHYSICS_CAPABILITIES } from "semiotic/physics/matter"browser0.1 KiB—
import { RAPIER_PHYSICS_CAPABILITIES } from "semiotic/physics/rapier"browser0.2 KiB—
import { renderChart } from "semiotic/server"node309.7 KiB—
import { generateFrameSVGs } from "semiotic/server/edge"node128.8 KiB—
import { renderToImage } from "semiotic/server/node"node310.1 KiB0.6 KiB
import { suggestCharts } from "semiotic/ai"browser32.4 KiB13.6 KiB
import { suggestCharts } from "semiotic/ai/core"browser32.2 KiB—
import { buildArtifactContract } from "semiotic/artifact"browser4.5 KiB—
import { ArtifactInspector } from "semiotic/artifact/react"browser3.7 KiB—
import { createChartAccessContract } from "semiotic/access"browser28.0 KiB—
import { toEvidenceEnvelope } from "semiotic/evidence"browser43.6 KiB—
import { bin } from "semiotic/data"browser0.9 KiB—
import { ChoroplethMap } from "semiotic/geo"browser109.3 KiB1.7 KiB
import { WordCloud } from "semiotic/wordcloud"browser111.0 KiB39.2 KiB
import { usePretextAnnotations } from "semiotic/text"browser1.5 KiB—
import { createRoughRenderMode } from "semiotic/rough"browser3.2 KiB—
import { resolveThemePreset } from "semiotic/themes"browser2.6 KiB—
import { resolveThemePreset } from "semiotic/themes/core"browser2.6 KiB—
import { ThemeProvider } from "semiotic/themes/react"browser5.7 KiB—
import { validateProps } from "semiotic/utils"browser10.3 KiB—
import { smartTickFormat } from "semiotic/utils/core"browser1.1 KiB—
import { useReducedMotion } from "semiotic/utils/react"browser0.3 KiB—
import { waffleLayout } from "semiotic/recipes"browser1.6 KiB—
import { waffleLayout } from "semiotic/recipes/core"browser1.6 KiB—
import { Glyph } from "semiotic/recipes/react"browser0.8 KiB—
import { BigNumber } from "semiotic/value"browser5.9 KiB—
import { DirectManipulationControl } from "semiotic/controls"browser1.5 KiB—

Line-boundary interpretation: the retained named import from semiotic/line emits 373.9 KiB raw versus 374.0 KiB from semiotic/xy; gzip differs by 0.2 KiB (0.1%). Tree-shaking converges both paths on the same LineChart implementation graph. Treat semiotic/line as a narrower API/direct-ESM artifact boundary, not an application-bundle saving. Do not add another per-chart entry until its packed named import beats the family path by both 10 KiB gzip and 7%.

d3 packaging model: Semiotic externalizes the twelve d3 modules it imports and declares them as normal runtime dependencies. Consumers do not need to install d3 packages manually; their bundler resolves, deduplicates, and tree-shakes that dependency graph. A packed webpack comparison favored this model in three of four representative chart families, and a Next 16 webpack route was 22.7 KiB gzip smaller than the fully bundled alternative. The one bundled win, Sankey, was only 0.4 KiB gzip. This choice retains a 22-package, 1.9 MB unpacked d3 install closure in exchange for smaller common application graphs and an ordinary dependency contract. The checked policy is npm run check:d3-packaging; the reproducible evidence is in benchmarks/setup/d3-packaging.json and can be regenerated with npm run measure:d3-packaging -- --toolchain-root <dir> after installing webpack and Next in that isolated toolchain directory.

jsx
// Import from the sub-path, not from "semiotic"import { LineChart } from "semiotic/xy"import { BarChart } from "semiotic/ordinal"import { SankeyDiagram } from "semiotic/network"import { ChoroplethMap } from "semiotic/geo"

Tree-shaking & multi-subpath imports: Family entries (semiotic/xy, semiotic/network, semiotic/ai, …) are built as one ESM graph with shared chunks. Stream frames, renderers, and other common code ship once and are imported by every entry that needs them — so combining semiotic/ai + semiotic/xy + semiotic/network does not mean paying for three full copies of the runtime. The package is marked "sideEffects": false, so modern bundlers keep only the named exports you retain (e.g. LineChart + suggestCharts). Prefer family subpaths for clarity; import AI helpers from semiotic/ai or the lighter semiotic/ai/core when you do not need the chart catalog.

When to use "semiotic": Fine when you want one import for mixed families. Shared chunks prevent duplicated runtime code across family subpaths; the cold-consumer table above is the better guide for a single named import.

CommonJS compatibility note: require("semiotic/xy") loads the shared CommonJS client bundle (about 2.1 MB before compression) so React contexts stay singletons across family imports. Prefer ESM imports in browser builds when bundle size matters; splitting that CJS client without a context-identity contract would be unsafe.

TypeScript

Built with strict: true. Full type definitions ship with the package. Generics for type-safe accessors:

tsx
interface Sale { month: number; revenue: number }
<LineChart<Sale>  data={sales}  xAccessor="month"    // TS validates this is keyof Sale  yAccessor="revenue"/>

Server-Side Rendering

All chart components render SVG automatically in server environments — no special imports or configuration needed. Non-streaming chart HOCs can be imported and rendered directly from a Next.js Server Component: Semiotic's "use client" directive defines the package boundary, so the importing page does not need its own wrapper or directive. Props crossing that boundary must remain serializable; add an app-owned client wrapper only when you introduce hooks, callback props, browser state, or a push-driven streaming chart.

jsx
// app/dashboard/page.tsx — a Next.js Server Componentimport { LineChart } from "semiotic/xy"
// Server: renders <svg> with path/circle/rect elements// Client: renders <canvas> with SVG overlay for axesexport default async function DashboardPage() {  const data = await fetchMetrics()  return <LineChart data={data} xAccessor="date" yAccessor="value" />}

For standalone SVG/PNG/GIF generation (email, OG images, PDF, Slack), use the server entry point:

js
import { renderChart, renderToImage, renderToAnimatedGif } from "semiotic/server"
// SVG — sync, no dependenciesconst svg = renderChart("LineChart", {  data, xAccessor: "date", yAccessor: "value",  theme: "tufte", title: "Revenue Trend",})
// PNG — async, requires sharpconst png = await renderToImage("BarChart", { data, ... }, { format: "png", scale: 2 })
// Animated GIF — async, requires sharp + gifencconst gif = await renderToAnimatedGif("line", data, { ... }, { fps: 12 })

MCP Server

mcp-name: io.github.nteract/semiotic

Semiotic ships with an MCP server that lets AI coding assistants render charts, diagnose configuration problems, discover schemas, read packaged AI guidance, and get chart recommendations via tool calls.

Setup

Add to your MCP client config (e.g. claude_desktop_config.json for Claude Desktop):

json
{  "mcpServers": {    "semiotic": {      "command": "npx",      "args": ["-y", "-p", "semiotic", "semiotic-mcp"]    }  }}

No API keys or authentication required for local stdio. HTTP mode is also available for inspectors, web clients, and ChatGPT Apps SDK experiments: npx -y -p semiotic semiotic-mcp --http --port 3001. It binds to 127.0.0.1 by default and accepts only its bind hostname (plus localhost for loopback). Browser requests require an explicit origin allowlist, for example MCP_ALLOWED_ORIGINS=http://localhost:5173; otherwise any request carrying Origin is rejected with 403. Native MCP clients that omit Origin continue to work. Since 3.7.2, HTTP mode is stateless: each request gets a fresh read-only MCP server + transport, so it can autoscale on serverless hosts without sticky sessions.

For ChatGPT developer mode, expose the HTTP endpoint over HTTPS with a tunnel, set MCP_ALLOWED_HOSTS to the tunnel hostname, and create a connector that points at https://<your-tunnel>/mcp. For a public interface, explicitly use --host 0.0.0.0 or MCP_HOST=0.0.0.0 and configure MCP_ALLOWED_HOSTS with the served hostnames. An all-interface bind still permits only loopback Host values until configured. Both allowlists are comma-separated and checked before preflight, health, or MCP handling. CORS echoes only an explicitly allowed origin; wildcard origins are unsupported. Set MCP_AUTH_TOKEN when transport requests should require a bearer token. The experimental Apps SDK surface is renderInteractiveChart, which returns a text/html;profile=mcp-app widget template plus a hidden SVG payload rendered by Semiotic on the MCP server.

For a hosted deployment, see deploy/cloud-run. The wrapper runs the published semiotic-mcp binary, exposes /mcp plus health endpoints, and supports MCP_ALLOWED_HOSTS for production host-header allowlisting. For ChatGPT Apps domain verification, set OPENAI_APPS_CHALLENGE_TOKEN so HTTP mode serves the raw token from /.well-known/openai-apps-challenge.

Use --profile=public for the five-tool public surface; separated option values also work. Explicit invalid profiles or malformed options stop startup. Both profiles and transports cap complete tool responses at 2 MiB by default through MCP_MAX_TOOL_OUTPUT_BYTES, returning an explicit error for oversized results.

Tools

ToolDescription
renderChartRender a Semiotic chart to static SVG. Supports the components returned by getSchema that are marked [renderable]. Pass { component: "LineChart", props: { data: [...], xAccessor: "x", yAccessor: "y" } }. Returns SVG string plus a "Render evidence" JSON block (mark counts by scene type, resolved axis domains, empty flag, annotation count, accessible name) so agents can verify the chart drew data marks, or validation errors with fix suggestions.
renderInteractiveChartRender a static-data chart as a ChatGPT Apps widget. Uses the same Semiotic server render path as renderChart, then hydrates an iframe UI with fit, zoom, data, hover, and render-evidence controls.
getSchemaReturn the prop schema for a specific component. Pass { component: "LineChart" } to get its props, or omit component to list the complete schema-backed catalog. Components marked [renderable] are available through renderChart; realtime charts require a browser/live environment.
suggestChartSample-row recommender. Pass { data: [{...}, ...] } with 1–5 sample objects plus optional broad intent/capability filters.
suggestChartsCapability-based recommender for bounded row data. Returns ranked chart suggestions with scores, reasons, caveats, import paths, and ready-to-use props.
suggestStreamChartsRecommend streaming charts from a schema (shape, keys, throughput, field cardinality/additivity). Returns { suggestions, excluded, stretchSuggestions, rankingIntents, warnings }.
suggestStreamDashboardCompose a multi-panel dashboard from stream schemas and an audience layout policy.
suggestDashboardBuild a multi-panel dashboard suggestion that covers distinct analytical intents.
suggestStretchChartsRecommend audience-literacy stretch picks from an AudienceProfile.
repairChartConfigCheck whether a requested chart fits a dataset and return ranked alternatives when it does not.
interrogateChartReturn a statistical summary and chart-aware context for answering natural-language questions with optional annotations.
diagnoseConfigCheck a chart configuration for common problems — empty data, bad dimensions, missing accessors, wrong data shape, and more. Returns a human-readable diagnostic report with actionable fixes.
reportIssueGenerate a pre-filled GitHub issue URL for bug reports or feature requests. Pass { title: "...", body: "...", labels: ["bug"] }. Returns a URL the user can open to submit.
applyThemeList named theme presets or return ThemeProvider/CSS/token usage for a preset such as { name: "tufte" }.
auditArtifactEvaluate an explicit artifact contract under a named policy without inferring missing source, review, or timing facts.
recommendRepresentationCompare chart and non-chart outcomes against supplied data, claims, evidence, time state, and policy requirements.
repairArtifactPropose contract repairs and optionally fill missing identity fields; existing mismatches require a revision and claim reassessment.
explainRefusalExplain which explicit policy obligations prevent publication or action and identify safe follow-up work.

Artifact tools are opt-in diagnostics, not publication authorization. A conditional result (including CLI exit code 0) retains open work. Ordinary renderChart calls do not enforce artifact policy; governed hosts must enforce their own release boundary. Manual-check resolution and revision-bound release approval remain separate host workflow work.

Resources

ResourceDescription
semiotic://artifact-contract-schemaStandalone JSON Schema for portable purpose, claim, evidence, timing, review, and transfer metadata.
semiotic://schemaFull machine-readable component schema JSON.
semiotic://schema-indexCompact discovery index with categories, renderability, import paths, and each component's schema resource URI.
semiotic://schema/{component}One component's schema, metadata, accessibility guidance, and behavior contracts (for example semiotic://schema/LineChart).
semiotic://componentsBackward-compatible component index showing renderable/browser-only status and MCP categories.
semiotic://surface-manifestGenerated inventory of the current AI schema, exports, renderability, tools, resources, and prompts.
semiotic://behavior-contractsAgent-visible semantic rules for color precedence, required prop combinations, push refs, and renderability.
semiotic://system-promptCompact AI instructions with import rules, chart props, SSR guidance, and pitfalls.
semiotic://examplesCopy-paste chart examples by data shape.
ui://semiotic/chart-widget.htmlChatGPT Apps / MCP Apps widget template used by renderInteractiveChart.

Prompts

PromptDescription
build-semiotic-chartReusable workflow for choosing a chart, reading schema, diagnosing props, and rendering a preview.
debug-semiotic-chartReusable workflow for debugging invalid props, rendering failures, and issue reports.

Example: get schema for a component

Tool: getSchemaArgs: { "component": "LineChart" }→ Returns: { "name": "LineChart", "description": "...", "parameters": { "properties": { "data": ..., "xAccessor": ..., ... } } }

Example: suggest a chart for your data

Tool: suggestChartArgs: {  "data": [    { "month": "Jan", "revenue": 120, "region": "East" },    { "month": "Feb", "revenue": 180, "region": "West" }  ]}→ Returns:  1. BarChart (high confidence) — categorical field (region) with values (revenue)  2. StackedBarChart (medium confidence) — two categorical fields (month, region)  3. DonutChart (medium confidence) — 2 categories — proportional composition

Example: render a chart

Tool: renderChartArgs: {  "component": "BarChart",  "props": {    "data": [      { "category": "Q1", "revenue": 120 },      { "category": "Q2", "revenue": 180 },      { "category": "Q3", "revenue": 150 }    ],    "categoryAccessor": "category",    "valueAccessor": "revenue"  }}→ Returns: <svg>...</svg>

Example: render a ChatGPT Apps widget

Tool: renderInteractiveChartArgs: {  "component": "BarChart",  "props": {    "title": "Revenue by Quarter",    "data": [      { "quarter": "Q1", "revenue": 120 },      { "quarter": "Q2", "revenue": 180 }    ],    "categoryAccessor": "quarter",    "valueAccessor": "revenue"  }}→ Returns: structured chart summary for the model + hidden SVG/widget metadata for ChatGPT.

Widget SVG is rebuilt from an element, attribute, CSS, and URL allowlist before embedding. Local fragment references and inline base64 PNG/JPEG/GIF/WebP images are supported; external resources, SVG data URLs, scripts, foreign HTML, animation, CSS imports, and font-face rules are removed. Allowed styles are scoped to the chart, preserving automatic dark palettes and annotation disclosure. Theme variables use color, length, font, and other supported token grammars. Malformed SVG returns an explicit tool error instead of an empty successful preview. The widget's host CSP provides an additional boundary.

Example: diagnose a broken config

Tool: diagnoseConfigArgs: { "component": "LineChart", "props": { "data": [] } }→ Returns: ✗ [EMPTY_DATA] data is an empty array — Fix: provide at least one data point

Example: report an issue

Tool: reportIssueArgs: {  "title": "Bug: BarChart tooltip shows undefined for custom accessor",  "body": "When using valueAccessor='amount', tooltip displays 'undefined'.\n\ndiagnoseConfig output: ✓ no issues detected.",  "labels": ["bug"]}→ Returns: Open this URL to submit the issue: https://github.com/nteract/semiotic/issues/new?...

CLI alternative

For quick validation without an MCP client:

bash
npx -p semiotic semiotic-ai --list         # list components with import paths and renderabilitynpx -p semiotic semiotic-ai --list --json  # machine-readable component indexnpx -p semiotic semiotic-ai --schema GaugeChartnpx -p semiotic semiotic-ai --suggest '{"data":[{"category":"A","value":10}],"intent":"comparison"}'npx -p semiotic semiotic-ai --doctor       # validate component + props JSONnpx -p semiotic semiotic-ai --schema       # dump all chart schemasnpx -p semiotic semiotic-ai --compact      # compact schema (fewer tokens)

--doctor uses the full diagnoseConfig checks when dist is available and falls back to schema-only validation in clean source checkouts.

Where to find Semiotic for AI assistants

Semiotic is indexed by AI-coding-agent documentation tools so your assistant (Claude Code, Cursor, Cline, Copilot, etc.) can pull current docs and tools without copy-paste:

The Official MCP Registry is the canonical MCP directory record; it is distinct from acceptance into any assistant vendor's curated connector directory. Secondary-directory freshness and release ownership are tracked in MCP_DISTRIBUTION.md.

Agent-facing API surface:

  • AGENTS.md is the concise repository development contract and CLAUDE.md imports it for Claude Code. These stay repository-local rather than shipping irrelevant contributor instructions to package consumers.
  • ai/reference.md, ai/schema.json, ai/surface-manifest.json, ai/behaviorContracts.cjs, and agent-skill/semiotic-charts/SKILL.md are bundled in the npm tarball (see package.json#files). The reference is the on-demand product guide printed by npx -p semiotic semiotic-ai; the schema, manifest, contracts, and portable skill provide structured generation and validation guidance.
  • semiotic.nteract.io/llms.txt + /llms-full.txt — deployed at the docs site per the llms.txt standard. Agents fetch the navigation map (llms.txt) or the full inlined docs (llms-full.txt) over HTTP; they're not part of the npm package itself.

Documentation

Interactive docs and examples

  • Getting Started
  • Charts — chart types with live examples
  • Frames — full Frame API reference
  • Features — axes, tooltips, interaction, responsive behavior, and composition
  • Annotations — first-class annotation types, design guidance, provenance, and lifecycle
  • Cookbook — advanced patterns and recipes
  • Playground — interactive prop exploration

Upgrading

Contributing

See CONTRIBUTING.md. Our community follows the nteract Code of Conduct.

Acknowledgments

Development of this library owes a lot to Susie Lu, Jason Reid, James Womack, Matt Herman, Shelby Sturgis, and Tristan Reid.

The Sankey layout engine is based on sankey-plus by Tom Shanley, which improved on his earlier d3-sankey-circular with better cycle detection, hierarchical arc stacking, and dynamic extent adjustment.

Semiotic icon based on an icon by Andre Schauer.

License

Apache 2.0

Source: README.md at commit 3cf18f8

Tools

5

createChart

Create and prove a chart

Select, validate, diagnose, render, and prove a static-data Semiotic chart. This is the default public workflow.

ParametersdatarequiredpropsthemeintentaudiencecomponentfieldRolesidentifiers

improveChart

Improve an existing chart

Diagnose a chart configuration, assess data fit, and propose repairs or variants.

ParametersdatapropsrequiredintentcomponentrequiredfieldRolesidentifiers

explainChart

Explain a chart without pixels

Return reader grounding: chart description, communicative intent, and navigable data structure.

Parameterspropsrequiredcomponentrequired

auditChart

Audit chart quality and accessibility

Run design diagnostics plus accessibility and mobile audits, returning prioritized structured findings.

ParameterspropsrequiredcomponentrequiredviewportWidth

getChartSchema

Get a chart schema

Return canonical Semiotic prop-schema guidance for code editing and advanced configuration.

Parameterscomponent

Version history

11
  1. v3.13.3LatestOct 30, 2026
  2. v3.13.1Oct 26, 2026
  3. v3.13.0Oct 22, 2026
  4. v3.12.1Oct 6, 2026
  5. v3.12.0Oct 1, 2026
  6. v3.11.2Sep 29, 2026
  7. v3.11.1Sep 29, 2026
  8. v3.10.4Sep 23, 2026
  9. v3.10.3Sep 20, 2026
  10. v3.10.2Sep 19, 2026
  11. v3.9.2Sep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts