Markdy 标志

Markdy

社区
HoangYell

🎬 Open-source animated architecture diagrams as code. Diagram-native DSL, 17 layout engines, Web Animations API, and MCP server for AI agents.

发布者HoangYell
代码仓库markdy-com
语言TypeScript
复刻数
3
星标数
95
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Markdy 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 95 个 Star 和 3 个 Fork。

💼 Sponsorship & Commercial Use: Markdy is free and open source under the MIT license. Access production architectural templates, custom diagram kits, and direct support via GitHub Sponsors & Pro Blueprints.


⚡ Why Markdy?

  • Explain behavior, not just topology. Walk through requests, responses, and background events one step at a time.
  • Keep the explanation beside the code. Store diagrams as readable .markdy files you can review and version in Git.
  • Start in the browser. Try an example, edit it, and share it. Use an AI agent to help write the script when you need one.

🚀 Quick Start

1. Try the Live Example

Open the cache-aside walkthrough. Play it or step through the timeline to follow the cache hit and miss paths.

2. Make It Yours

Edit the example in the studio, or start with the smaller script below. Write MarkdyScript yourself, or ask your coding agent to generate it.

"Follow the canonical Markdy specification (https://markdy.com/AGENT.md) and generate a .markdy scene:
Explain a Cache-Aside Architecture with a Web Client, API Gateway, URL Service, Redis Cluster, and PostgreSQL database. Include two animated storyboard beats: 1. Cache Hit Path and 2. Cache Miss & Async Warm."

(Tip: If you have the official Markdy MCP Server installed, just ask: "Create an animated Markdy architecture diagram for our cache-aside service.")

markdy
scene "Cache-Aside Architecture" theme=auto
layout LR

browser Client "Web Client"
gateway Gateway "API Gateway"
service Svc "URL Service"
cache Redis "Redis Cluster"
database Postgres "PostgreSQL 16"

beat cache_hit "1. Cache Hit Path":
  show $nodes stagger=60ms
  frame Client Gateway Svc Redis zoom=1.12
  Client -> Gateway "GET /link" -> Svc "resolve"
  Svc -> Redis "GET key:link"
  Svc <- Redis "200 Target URL"
  Client <- Gateway "301 Redirect"

beat cache_miss "2. Cache Miss & Async Warm":
  frame Svc Redis Postgres zoom=1.15
  Svc -> Postgres "SELECT destination WHERE key = 'link'"
  Svc <- Postgres "Row Found"
  Svc ~> Redis "SETEX key:link (Warm Cache)"
  glow Postgres color=#38bdf8 & glow Redis color=#22c55e

3. Preview Locally (Optional)

Prefer your own editor or terminal? Save the script as system.markdy:

  • VS Code / Cursor Extension — hoangyell.markdy-vscode:
    Press Cmd+K V (macOS) or Ctrl+K V (Windows/Linux) for live side-by-side animated preview.

  • Terminal CLI — @markdy/cli:

    bash
    npx @markdy/cli render system.markdy --out diagram.html

Embed in Web Apps & Docs

Choose the package that fits your stack:

  • Web Apps (Vanilla JS, React, Vue, Svelte) — @markdy/renderer-dom:

    bash
    npm install @markdy/renderer-dom
    ts
    import { createDiagram } from "@markdy/renderer-dom";
    
    // Mount and render interactive 60fps WAAPI diagram directly from code
    const diagram = createDiagram({
      container: document.getElementById("diagram-container")!,
      code: markdyScriptCode,
    });
  • Astro Sites & Blogs — @markdy/astro:

    bash
    npm install @markdy/astro

    (Zero-CLS SSR island: <Markdy code={code} client:visible /> — see Astro Guide ↓)

  • Next.js / MDX Docs — @markdy/mdx:

    bash
    npm install @markdy/mdx

    (Auto-renders fenced ```markdy blocks — see MDX Guide ↓)

👉 DOM Renderer Guide ↗  •  Astro Guide ↗  •  MDX Guide ↗  •  Core Compiler ↗


Technical Capabilities

Static boxes and arrows fail to capture distributed systems in action. Markdy turns text into choreographed 60fps motion graphics directly in your browser.

  • 🎬 Kinetic Storytelling: Choreograph requests (->), responses (<-), and events (~>) across sequential beat timelines with auto-zooms and glow cues.
  • 📐 Dynamic Port Multiplexing: Automatically balances parallel connections across node boundaries with zero line congestion or overlapping paths.
  • 🔗 Code Provenance & Git Grounding: Anchor high-level architecture nodes directly to verified source code (@src="src/auth.ts#L10-L50") with automated in-tree Git verification.
  • 🔄 Architectural Evolution Matrix: Compare architecture states across Git commits and automatically synthesize animated migration storyboards.
  • 🔬 Blast Radius & Route Pathfinder: Compute upstream dependency callers, downstream failure blast radius, and shortest message paths in real-time.
  • 💎 Native Vector Symbol Registry: Embedded, zero-dependency SVG vector glyphs for AWS, GCP, Kubernetes, Docker, Postgres, Redis, Kafka, and 20+ stacks.
  • ⚡ Zero-Dep & Web-Native: Powered by pure CSS/SVG transforms and the Web Animations API (WAAPI) — ~14 kB parser, no Canvas, no GSAP.
  • 🔄 Universal Ingestion: 1-click migration from Mermaid, Draw.io, Docker Compose, Kubernetes manifests, and Terraform states.
  • 🤖 AI-Native & MCP: Official Model Context Protocol (MCP) server for Claude, Cursor, Antigravity, and Cline with self-healing syntax diagnostics.
  • 🛡️ Architecture Governance: Built-in rules prevent deadlock cycles and cross-layer bypasses.

🌟 Advanced Engineering Superpowers

Markdy goes beyond basic diagram drawing into a comprehensive Architecture Intelligence Platform:

markdy
scene "Cloud Native Microservices Mesh" theme=paper
layout LR

gateway ApiGateway "API Gateway" icon=nginx @src="src/gateway/router.ts#L20"
service OrderSvc "Order Service" icon=nodejs @src="src/orders/service.ts#L45"
service UserSvc "User Service" icon=golang @src="src/users/handler.go#L30"
cache Redis "Redis Cluster" icon=redis
database Postgres "PostgreSQL 16" icon=postgresql

beat workflow:
  show $nodes stagger=60ms
  ApiGateway -> OrderSvc "POST /orders" & ApiGateway -> UserSvc "GET /profile"
  OrderSvc -> Postgres "Write Order" & UserSvc -> Postgres "Read User"
  OrderSvc ~> Redis "Cache Invalidation"
SuperpowerSyntax / APIDeveloper Impact
Dynamic Port MultiplexingAuto-calculatedPerfectly balanced multi-lane fan-in/fan-out with smooth fillet curves
Code Provenance Anchors@src="path/file.ts#L10"Guaranteed synchronization between architecture diagrams and real Git code
Evolution Git-DiffdiffDiagramASTs(v1, v2)Automated visual diffing and animated migration timeline generation
Blast Radius LenscalculateBlastRadius(node, ast)Real-time upstream impact and downstream failure cascade isolation
Contextual Share Cards (1200×630)exportRouteShareCard(), exportReachShareCard()High-impact social & README cards with active route/blast-radius telemetry
9-Point Showcase Quality Gatemarkdy verify <file> --quality showcaseDeterministic SHA-256 integrity receipt & responsive viewport validation
Architecture Recipe Guidancemarkdy guide "<query>"Instant AI scenario pattern matching for cache-aside, EDA, zero-trust, and lakehouse
Native Vector Symbolsicon=redis, icon=kafkaZero-CDN, lightweight vector badges embedded directly in the artifact

🔌 Integrations & Ecosystem

Extend Markdy across your favorite AI agents, editors, frameworks, and deployment workflows:

Equip Claude, Cursor, Antigravity, VS Code, Cline, Windsurf, or Zed with self-healing syntax diagnostics, auto-repair, and transpilers:

bash
# Claude Code / CLI
claude mcp add markdy -- npx -y @markdy/mcp-server

# Google Antigravity & Gemini CLI
agy mcp add markdy -- npx -y @markdy/mcp-server

👉 1-Click Install for Cursor ↗  •  1-Click Install for VS Code ↗  •  Full JSON Configs for 6 IDEs ↓  •  AI Agent Guide (AGENT.md) ↗

Live side-by-side animated preview (Cmd+K V), syntax highlighting, auto-completion, error squiggles, and SVG/PNG export:

bash
# Visual Studio Code
code --install-extension hoangyell.markdy-vscode

# Cursor / VSCodium (Open VSX Registry)
cursor --install-extension hoangyell.markdy-vscode

👉 VS Code Marketplace ↗  •  Open VSX Registry ↗  •  Extension Docs ↗

Zero-CLS, SSR-placeholder islands with viewport-triggered lazy hydration for Astro documentation sites and blogs:

bash
pnpm add @markdy/astro
astro
---
import { Markdy } from "@markdy/astro";
import code from "./diagram.markdy?raw";
---

<Markdy code={code} client:visible />

👉 @markdy/astro Package Guide ↗

Render fenced ```markdy code blocks directly inside .mdx files with automatic lazy loading:

bash
pnpm add @markdy/mdx react react-dom
ts
// mdx.config.js
import { remarkMarkdy } from "@markdy/mdx";

export default {
  remarkPlugins: [[remarkMarkdy, { componentName: "MarkdyDiagram" }]],
};

👉 @markdy/mdx Package Guide ↗

Render standalone HTML diagrams or run architecture linting in CI/CD pipelines:

bash
# Global install
npm install -g @markdy/cli

# Render diagram to animated HTML or SVG
markdy render system.markdy --out diagram.html

# Lint Markdy architecture scenes in CI/CD
markdy lint **/*.markdy

👉 CLI Package Guide ↗  •  Universal Ingestion Guide ↗


📊 Feature Comparison

CapabilityMermaid / PlantUMLExcalidraw / Draw.ioMarkdy
Animation & Timing❌ Static SVG / PNG❌ Static canvas✅ 60fps WAAPI motion & step-by-step narrative beats
Authoring StyleText DSLManual drag-and-drop✅ Declarative text DSL + Live Editor Preview
Return Flows & Cycles⚠️ Rank distortion / tanglingManual curve placement✅ Cycle-safe returns (<-) & async event arcs (~>)
AI Agent Reliability⚠️ High hallucination❌ Coordinate hallucination✅ Strict grammar AST + Self-healing MCP Server
Architecture Linter❌ None❌ None✅ Built-in rules (e.g. anti-pattern detection)
Universal Ingestion❌ Manual rewrite❌ Manual export✅ 1-Click Transpiler for Mermaid, Compose, K8s, Terraform
Core Footprint~2 MB+ runtimeHeavy web app✅ ~14 kB core parser, zero dependencies

📦 Component Responsibilities & Packages

Markdy is architected as a modular monorepo where each package fulfills a focused responsibility:

PackageResponsibilityPrimary Exports
@markdy/coreCompiler Core & AST Engineparse(), compile(), formatScene(), diagnoseMarkdyCode(), validateArchitecture(). Zero dependencies (~14 kB).
@markdy/renderer-domMotion Graphics & RenderingcreateDiagram(), exportDiagramAsVectorSvg(), exportDiagramAsPng(), exportDiagramAsGif(). 60fps WAAPI timeline.
markdy-vscodeIDE Extension (VS Code & Cursor)Side-by-side live animated preview, document formatter (Shift+Alt+F), QuickFix lightbulbs (💡 Fix), Universal Ingestion, CodeLens.
@markdy/compatUniversal Ingestion SuiteTranspilers for Mermaid, Docker Compose, Kubernetes YAMLs, Terraform state, and Draw.io XML.
@markdy/cliTerminal Tool & CI/CDmarkdy lint, markdy render, markdy format, markdy import, markdy diff.
@markdy/mcp-serverAI Agent Integration (MCP)Model Context Protocol server exposing validation, auto-healing, and transpilation tools for Claude, Cursor, Antigravity, Cline, Windsurf.
@markdy/astro & @markdy/mdxDocs & Blog IntegrationsZero-CLS, SSR-placeholder islands with viewport hydration for content sites.
@markdy/language-serverHeadless LSP ServerDiagnostic publishing, hover docs, formatting, and completions for language clients.
@markdy/stdlib-systemsDomain VocabularySemantic primitives for cloud, infrastructure, and distributed systems.

🔍 Detailed Features & Advanced Usage

Markdy provides topological layout algorithms tailored to specific system patterns:

  • Distributed Systems: architecture, flowchart, tree, state, sequence
  • Security & Structure: layers, nested, swimlane, quadrant, pyramid
  • Data & Product Loops: medallion, timeline, gantt, flywheel, constellation, radar, venn

Themes: midnight (dark modern), paper (light technical), blueprint (CAD cyan), editorial (serif publication), graphite (minimal dark), nebula (cosmic violet), terminal (CLI retro), sketchy (hand-drawn), ink (blue ballpoint & fountain pen ink), doodle (playful doodle).

👉 Explore all 17+ interactive scenes in the Live Gallery ↗

Convert existing diagrams and infrastructure configs into animated MarkdyScript scenes:

bash
markdy import flow.mmd            --out flow.markdy        # Mermaid.js Flowcharts & Sequences
markdy import docker-compose.yml  --out compose.markdy     # Docker Compose Services & Networks
markdy import k8s-manifests/      --out cluster.markdy     # Kubernetes Ingress, Pods & Services
markdy import terraform.tfstate   --out infra.markdy       # Terraform Provisioned State
markdy import architecture.drawio --out diagram.markdy     # Draw.io / diagrams.net XML

Equip your favorite AI Coding Agent with native Markdy tools (validate_markdy_code, diagnose_markdy_syntax, fix_markdy_code, transpile_to_markdy) and live specification resources (markdy://spec/agent-reference).

⚡ Quick MCP Server Setup & Installation

AI EnvironmentSetup ActionMethod
CursorInstall in Cursor1-Click Install ↗ or JSON Config
VS Code / CopilotInstall in VS Code1-Click Install ↗ or JSON Config
Claude Code & DesktopSetup in ClaudeCLI (claude mcp add) & JSON
Google AntigravitySetup in Antigravity1-Command CLI (agy mcp add)
Cline / Roo CodeConfig in ClineConfig File (cline_mcp_settings.json)
Windsurf / CascadeConfig in WindsurfConfig File (mcp_config.json)
Zed EditorConfig in ZedConfig File (settings.json)

🛠️ Client Configuration Snippets

1. Claude Code & Claude Desktop

Claude Code (Anthropic CLI):

bash
claude mcp add markdy -- npx -y @markdy/mcp-server

Claude Desktop GUI (claude_desktop_config.json):

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

2. Cursor & VS Code (.cursor/mcp.json or .vscode/mcp.json)

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

3. Google Antigravity & Gemini CLI

Via 1-Command CLI:

bash
agy mcp add markdy -- npx -y @markdy/mcp-server

Or via Config File (~/.gemini/antigravity/mcp_config.json or .agents/mcp_config.json):

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

4. Cline & Roo Code (cline_mcp_settings.json)

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

5. Windsurf / Cascade (~/.codeium/windsurf/mcp_config.json)

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

6. Zed Editor (settings.json)

json
{
  "context_servers": {
    "markdy": {
      "command": {
        "path": "npx",
        "args": ["-y", "@markdy/mcp-server"]
      }
    }
  }
}

🧰 Available Agent Tools & Resources

  • 🔍 validate_markdy_code: Check syntax, unresolved node references, and cycle rules.
  • 💡 diagnose_markdy_syntax: Detailed diagnostics with exact line numbers and remediation steps.
  • 🩹 fix_markdy_code: Self-healing code repair that fixes common syntax mistakes and formats AST.
  • 🔄 transpile_to_markdy: Convert Mermaid, Docker Compose, Kubernetes, Terraform, or Draw.io into valid MarkdyScript.
  • 📚 markdy://spec/agent-reference: Full AST grammar reference and token catalog.
  • 🏛️ markdy://governance/rules: Architecture rules (Well-Architected, cycle bounds, layer separation).
  • 📦 markdy://templates/catalog: 33 production-grade architecture blueprints.

👉 Read the Full AI Agent Reference Guide (AGENT.md) ↗


🚦 Verification Gates & Quality Engineering

Every pull request and build must pass the automated full-cycle verification pipeline:

CommandVerification GateFocus Area
pnpm testUnit & Integration SuiteAST parser, compiler math, layout solvers, CLI
pnpm test:visualAutomated Visual GateHeadless Chrome + Pixelmatch against golden baselines (tests/visual-baselines/)
pnpm test:perfSub-Frame Performance GateChrome DevTools Protocol tracing (sub-40ms render, <25MB JS heap)
pnpm verify:examplesCanonical Showcase Gate33 production blueprints compile with zero warnings
cleanroom-guard checkAnti-Leak & Clean-RoomPre-commit secret scanning and clean-room zero-footprint protection

📖 Documentation Links

GuideDescription
Syntax Reference (SYNTAX.md)Full DSL grammar, flow operators, selectors, cues, and player settings
Step-by-Step Tutorial (TUTORIAL.md)Step-by-step guide from basic flows to multi-beat kinetic scenes
AI Agent Guide (AGENT.md)LLM system prompts, token rules, and anti-patterns
Architecture Internals (ARCHITECTURE.md)Compiler pipelines, WAAPI loop, and orthogonal routing geometry
VS Code Extension GuideShortcuts, settings, and IDE features

安装

TypingMind
{
  "mcpServers": {
    "markdy-com": {
      "command": "npx",
      "args": [
        "-y",
        "@markdy/mcp-server"
      ]
    }
  }
}

将 Markdy MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Markdy 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Markdy 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Markdy MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "markdy-com": {
      "command": "npx",
      "args": [
        "-y",
        "markdy"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Markdy MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Markdy MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Markdy 帮我完成这项任务吗?
Markdy
当然。我已阅读。
以下是我使用 Markdy 得到的结果。

常见问题

Markdy MCP 服务器有什么用途?

Markdy 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Markdy MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Markdy,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Markdy MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Markdy 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Markdy MCP 连接到 TypingMind?

Markdy 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Markdy MCP 在 TypingMind 中提供哪些工具?

Markdy 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Markdy MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Markdy 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇