MS-Teja/Glyphic

πŸ“Š Data Visualization
0 Views
0 Installs

πŸ“‡ 🏠 - Generate diagrams from structured JSON across 18 types (architecture, ERD, sequence, flowchart, Gantt…) β€” native SVG/PNG, no headless browser. Built for LLMs and agents.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "ms-teja-glyphic": {
      "command": "npx",
      "args": [
        "-y",
        "ms-teja-glyphic"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Glyphic

A diagram is data, not a drawing.

Your model describes the diagram as typed JSON; Glyphic renders it β€” deterministic SVG & PNG across 18 types, validated before it draws, with no DSL and no headless browser. Diagram infrastructure for LLMs and agents that you own and build on.

npm version mcp-server npm version npm downloads License: FSL / MIT Sponsor

Live playground Β· Quick Start Β· Examples Gallery Β· Documentation Β· 18 Diagram Types

Sketch architecture diagram Freeform canvas dashboard


Quick Start

Glyphic gives an LLM structured data in and hands you a finished diagram out. Use it three ways.

1. MCP server β€” add to your AI agent in 30 seconds

It runs over stdio via npx, no install:

# Claude Code
claude mcp add glyphic -- npx -y @glyphicjs/mcp-server

For Cursor, Claude Desktop, VS Code, Windsurf, and Antigravity, add it to your client's MCP config:

{
  "mcpServers": {
    "glyphic": { "command": "npx", "args": ["-y", "@glyphicjs/mcp-server"] }
  }
}

Then just ask: "Draw an ERD for a blog with users, posts, and comments." The model emits the JSON, calls the tool, and the rendered diagram appears inline. See the MCP setup guide.

2. Library

npm install @glyphicjs/core @glyphicjs/schema
import { processDiagram } from "@glyphicjs/core";
import { writeFileSync } from "node:fs";

const result = await processDiagram({
  type: "architecture",
  title: "Web App",
  nodes: [
    { id: "web", label: "Web App", shape: "rounded", icon: "fab-react" },
    { id: "api", label: "API", shape: "hexagon", icon: "fas-bolt" },
    { id: "db", label: "PostgreSQL", shape: "database", icon: "fas-database" }
  ],
  edges: [
    { source: "web", target: "api", label: "REST" },
    { source: "api", target: "db", label: "SQL" }
  ]
});

writeFileSync("diagram.png", result.png);   // Buffer (high-res PNG)
writeFileSync("diagram.svg", result.svg);   // string (scalable SVG)
console.log(result.reactFlow);              // interactive React Flow JSON

See the Core API reference.

3. Self-hosted HTTP API

Need it behind your own endpoint? Glyphic can be self-hosted as an HTTP service that wraps the exact same engine β€” same schema in, same SVG/PNG/React Flow out β€” so your product or platform can generate diagrams without shipping the library to every client.

Who it's for

  • Agent & LLM-app builders β€” expose diagram generation as a single tool call and let the model describe it, not draw it.
  • Platform teams β€” embed diagram generation directly in your product behind one validated schema.
  • CI & docs pipelines β€” deterministic, byte-identical, versionable output with no Chromium to install or babysit.
  • React developers β€” get interactive React Flow JSON out of the box, not just static images.

What

Glyphic is infrastructure for generating diagrams from structured data. You give it a strict, semantic JSON document β€” arrays of nodes and edges, or entities, or commits β€” and it returns a polished diagram as:

  • SVG β€” pure, scalable vector markup (accessible: role="img" + <title>).
  • PNG β€” high-resolution raster, rendered natively via Rust (@resvg/resvg-js).
  • React Flow JSON β€” nodes/edges mapped for an interactive React Flow canvas.

It supports 18 diagram types (architecture, sequence, ERD, UML class, state machines, flowcharts, Gantt, timelines, Sankey, Git trees, mindmaps, pie, quadrant, user journeys, Kanban, C4, treemaps, and a freeform canvas) behind a single validated schema.

Why

Yes β€” a modern LLM can draw a clean six-box flowchart as raw SVG. Go ask one; for a single throwaway diagram, that's the right tool. This isn't a bet that models "can't draw."

The problem is that a drawn SVG is a dead picture. It comes out different every generation, it falls apart exactly where real diagrams live β€” many nodes and later edits β€” and to change one box you regenerate the whole thing and it drifts. Glyphic treats the diagram as data: your model describes what it means as typed JSON, and a real engine renders it. Three reasons that holds up no matter how good the model gets:

  1. A machine-authoring contract, not a DSL. The input is a strict Zod schema. Malformed model output comes back as a precise, fixable error before anything renders β€” so generate β†’ validate β†’ fix β†’ render loops are trivial. DSLs like Mermaid parse-or-crash on a single typo (-->|label|).
  2. Deployable as infrastructure. Layout is computed by real graph engines (elkjs, d3-hierarchy/d3-sankey) and SVG is rasterized to PNG by Rust (@resvg/resvg-js) β€” no DOM, no headless browser, no Chromium. It runs in a CI job, a Lambda, an agent loop, or a Docker container as a normal Node dependency. This stays true regardless of model capability.
  3. Cheap and intact at scale. Hand-drawing a large diagram means emitting thousands of coordinate tokens β€” slow, costly, and liable to blow the model's output limit and truncate into a broken render. Your model emits compact semantic JSON instead; the heavy geometry is generated deterministically.

And because a real engine owns the layout, the diagram scales and stays editable: it nests clusters and routes edges around obstacles where hand-placed SVG turns into diagonal lines cutting through boxes, its output is byte-identical (versionable, snapshot-testable), and the JSON stays a source of truth you can diff and re-render β€” not a house of cards of absolute coordinates.

The same 44-node architecture: a frontier model's one-shot raw SVG (edges tangled diagonally through boxes) above Glyphic's rendering of the identical JSON (nested tiers, routed edges)
The same 44-node spec. Top: a current frontier model asked for raw SVG β€” the boxes are fine, but the edges cut diagonally through shapes and the result can't be edited without regenerating it. Bottom: Glyphic renders the identical JSON β€” nested tiers, edges routed around obstacles, still an editable source of truth.
Method: both produced by the same model (Claude Opus 4.8) from one brief β€” the top by asking it to hand-write SVG in a single pass; the bottom by asking it to emit Glyphic's typed JSON, then rendering with @glyphicjs/core (ELK layout + resvg, no browser). Same author, same content β€” only the draw-vs-describe boundary differs.

How it compares

FeatureGlyphicClaude ArtifactsMermaidD2
Input formatTyped JSON (Zod schema)Natural language β†’ SVGText DSLText DSL
Renders without a browserβœ… Rust (resvg)N/A (cloud-only)❌ Puppeteer/Chromiumβœ… Go binary
Model-agnosticβœ… Any JSON-capable LLM❌ Claude onlyβœ…βœ…
Schema validationβœ… Zod + fixable errors❌❌ Parse-or-crash❌
Native MCP serverβœ… @glyphicjs/mcp-serverN/A (built-in to Claude)❌❌
React Flow outputβœ… Interactive nodes/edges❌❌❌
Deterministic outputβœ… Byte-identical❌⚠️ Mostlyβœ…
LicenseFSL β†’ Apache-2.0ProprietaryMITMPL-2.0

See the full comparison + benchmarks.

Features

  • 🧩 18 diagram types behind one validated schema β€” see them all.
  • 🎨 Theming β€” built-in presets ("theme": "dark", plus light / pastel / mono) or a full custom palette. Theming guide.
  • πŸ–ŒοΈ Styles β€” visual personality presets: "style": "compact" (default), clean, minimal, or hand-drawn sketch. Styles guide.
  • πŸ“Ί Aspect-ratio framing β€” auto-fits diagrams to clean 16:9 / 9:16 frames (or set "aspectRatio"), by padding β€” never cropping.
  • πŸ”€ Fonts β€” any Google Font ("theme": { "fontFamily": "Outfit" }) or your own .ttf.
  • πŸ–ΌοΈ Native icons β€” drop in any FontAwesome icon ("icon": "fas-database", "icon": "fab-aws") or your own SVG via customIcons.
  • πŸ“ Real layout β€” elkjs + d3 compute nesting (VPCs/clusters), crow's-foot/UML markers, and edge routing around obstacles β€” staying clean at the node counts where hand-placed SVG tangles into diagonals through boxes.
  • ⚑ Native PNG β€” Rust rasterization, no headless browser.
  • β™Ώ Accessible output β€” every SVG ships with role="img" and a <title>.
  • πŸ”’ Safe by construction β€” strict input validation, SVG output escaping/sanitization, and size limits to resist malicious input.
  • πŸ§ͺ Multiple outputs β€” SVG, high-res PNG, and React Flow JSON from one call.

Supported Diagrams

18 first-class types β€” explore them in the Examples Gallery and the Diagram Types reference.

Architecture (nested VPCs/clusters)C4 contextFlowchart
SequenceState machineERD (crow's-foot)
UML ClassMindmapGantt
TimelineUser JourneyKanban
PieQuadrantSankey
Git graphTreemapCanvas (freeform SVG)

Monorepo architecture

A pnpm + Turborepo monorepo of three open-source libraries.

PackageWhat it is
@glyphicjs/schemaThe pure Zod validation layer β€” the LLM-facing contract. Validate model output before rendering.
@glyphicjs/coreThe engine: layout adapters, scene graph, SVG rendering, and rasterization.
@glyphicjs/mcp-serverOfficial Model Context Protocol server β€” exposes Glyphic as a native tool to Claude Desktop / Cursor.

Adding a new diagram type is one entry in packages/core/src/registry.ts plus a schema and a layout adapter β€” see CONTRIBUTING.

Documentation

Blog

Support

License

LICENSE β€” FSL / MIT.


Give your AI structured data. Let Glyphic handle the drawing.

Related MCP Servers

KyuRish/mcp-dashboards

πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - 45+ interactive chart types (bar, line, pie, candlestick, sankey, geo, radar, funnel, treemap, and more), dashboards with KPI cards, drill-down navigation, live API polling, 20 themes, and export to PNG/PPT/A4. Built on MCP Apps.

πŸ“Š Data Visualization0 views
marzukia/charted

🐍 🏠 🍎 πŸͺŸ 🐧 - Zero-dependency chart server that renders bar, line, pie, scatter, and more from JSON or CSV to SVG, HTML, PNG, or data URL. Built-in themes; PNG output renders inline in chat. Install via uvx --from charted[mcp] charted-mcp.

πŸ“Š Data Visualization0 views
nteract/semiotic

πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - React data visualization MCP server with 30+ chart types. 5 tools: suggest charts for a dataset, render validated React configs to SVG, diagnose configuration anti-patterns, get component schemas, and report issues.

πŸ“Š Data Visualization0 views
pushtodisplay/cli

πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Push To Display MCP server send structured content to selected boards on iOS and android devices with app Push To Display, route updates to specific panels, and render in real time with display-focused multi-panel layouts.

πŸ“Š Data Visualization0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.