excalidraw-architect-mcp

作者 BV-Venky已验证

Turn your architecture into a living, queryable knowledge graph - and render it as beautiful auto-laid-out Excalidraw diagrams. An MCP server for Cursor, Claude Code & Windsurf. Offline, no API keys.

144
Stars
8
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/BV-Venky/excalidraw-architect-mcp

快速入门

使用 excalidraw-architect-mcp 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Excalidraw Architect MCP

PyPI Cursor Directory License: MIT PyPI Downloads

It's been a constant struggle trying to understand unfamiliar and complex codebases - managing cognitive overload and trying to imagine how everything fits together.

The Problem

When you're onboarding onto a codebase, designing a new system, or documenting existing architecture, a visual diagram communicates in seconds what pages of text can't. But the options today aren't great. Mermaid diagrams are quick to generate but have limited capabilities - you can't drag a node to reposition it, group components visually. Excalidraw solves these problems, but when LLMs try to generate Excalidraw directly, they hallucinate coordinates - boxes overlap, arrows tangle, and you end up fixing the diagram manually.

The Solution

excalidraw-architect-mcp separates the what from the where - the AI focuses on structure, the engine handles the pixel math.

Your LLM describes the components and connections, and the MCP handles layout, styling, and rendering using a proper graph layout algorithm. 50+ technologies (Kafka, PostgreSQL, Redis, etc.) get auto-styled, you can iteratively edit diagrams with natural language ("add a cache in front of the DB"), and it runs fully offline in Cursor/Windsurf - no API keys needed.

  • Living architecture knowledge graph - persist your system as a version-controlled model your AI can query, lint, and re-render — diagrams become views, not the source of truth (details)
  • Perfect layouts every time - Sugiyama algorithm with adaptive spacing; no overlapping boxes
  • Architecture-aware styling - say "Kafka" and get a stream-styled node, not a generic rectangle
  • Talk to your diagrams - add, remove, or rewire components on an existing diagram with natural language
  • Hub node visualization - gateways and load balancers auto-stretch to span their connected services
  • Export to SVG & PNG - convert any .excalidraw file to a portable image, no browser needed

See It In Action

Every frame below is generated entirely by AI using this MCP - zero manual positioning.

E-Commerce Platform Architecture

E-Commerce Platform Demo

Payment Processing Flow

Payment Processing Flow Demo

🧠 Architecture Knowledge Graph

New in v1.0. Your diagrams were always backed by a graph. Now that graph is yours — a persistent, version-controlled model of your system that the AI builds once and reuses everywhere.

Knowledge Graph rendered diagram

The diagram above was rendered from a knowledge graph — a single .claude/architecture.md file. Notice Order Service → Payment Service appears twice: a solid REST /charge call and a dashed Kafka payment.requested event. Two communication modes, two arrows.

Why a knowledge graph?

A one-off diagram goes stale the moment you close it. A knowledge graph is a living model:

  • One source of truth, many views — store the whole system once, then render the full picture, a single domain, or everything within N hops of one service.
  • Consistent across diagrams — the same service keeps the same id, styling, and metadata everywhere.
  • Queryable — ask "what breaks if payments goes down?" and get the real blast radius, not a guess.
  • Self-checking — lint for dependency cycles, single points of failure, and orphaned services.
  • Lives in git — review architecture changes in PRs; the markdown diffs cleanly.

The file is human- and machine-readable

The graph is a single markdown file (default .claude/architecture.md):

## Services
- order-service: Order Service [type: service] [domain: orders] [owner: @orders]
- payment-service: Payment Service [type: service] [domain: payments] [owner: @payments]

## Dependencies
- order-service -> payment-service : "REST /charge"
- order-service -> payment-service : "Kafka payment.requested" [style: dashed]

Edit it by hand or let the AI maintain it — it round-trips losslessly either way.

Just ask your AI

"Map this codebase into the architecture knowledge graph"

"Link the order service to payments over Kafka"

"What depends on the payment service? Render just its neighborhood"

"Render the orders domain as a focused diagram"

"Lint the architecture for cycles and single points of failure"

"Import my existing diagram.excalidraw into the knowledge graph"

"Generate an onboarding guide from the architecture"

See the Knowledge Graph tools for the full tool list.

Use Cases

  • Onboarding onto a new codebase - point it at a microservice and get a high-level architecture diagram without reading a single line of code. Point it to a set of classes for a low-level flow diagram when you need the details.
  • Brainstorming and system design - when you're whiteboarding a new service or debating trade-offs, ask it to visualize the architecture as you go. Iterate by saying "add a cache here" or "swap Kafka for SQS" instead of redrawing from scratch.
  • Documentation that stays alive - drop the .excalidraw file into your repo and update it with natural language as the system evolves. No more stale diagrams from six sprints ago.

Quick Start

Install

pip install excalidraw-architect-mcp

For PNG export support (SVG works out of the box):

pip install excalidraw-architect-mcp[png]

Or run without installing (requires uv):

uvx excalidraw-architect-mcp

Configure MCP in Your IDE

Cursor - Add to .cursor/mcp.json:

{
  "mcpServers": {
    "excalidraw-architect": {
      "command": "excalidraw-architect-mcp",
      "transport": "stdio"
    }
  }
}

Claude Code - Run this one-liner:

claude mcp add-json excalidraw-architect '{"type":"stdio","command":"excalidraw-architect-mcp"}' --scope user

Or add manually to .mcp.json in your project root:

{
  "mcpServers": {
    "excalidraw-architect": {
      "type": "stdio",
      "command": "excalidraw-architect-mcp"
    }
  }
}

Windsurf / Other IDEs - Same pattern; point to the excalidraw-architect-mcp command over stdio.

Install the Diagram Design Skill (recommended)

This repo includes a Diagram Design Skill that teaches the AI how to structure diagrams for the best results - node count limits, topology rules, edge label guidelines, and common patterns.

For Cursor users:

mkdir -p ~/.cursor/skills/excalidraw-diagram-design && \
curl -o ~/.cursor/skills/excalidraw-diagram-design/SKILL.md \
  https://raw.githubusercontent.com/BV-Venky/excalidraw-architect-mcp/main/.skills/excalidraw-diagram-design/SKILL.md

For other IDEs: Download the SKILL.md file and add it to your IDE's prompt context or system instructions.

The AI will automatically pick up the skill and apply it when generating diagrams. Feel free to modify the rules to suit your preferences - tweak node limits, add your own patterns, or adjust styling guidelines.

Install the Knowledge Graph Skill (recommended for the graph workflow)

For the architecture knowledge graph, this repo also includes an Architecture Knowledge Graph Skill. It teaches the AI how to read a codebase well — identify service boundaries, map communication signals (HTTP / gRPC / Kafka / DB) to the right labelled links, match producers and consumers across repos, and keep the graph clean (stable ids, every edge labelled, lint before render).

For Cursor users:

mkdir -p ~/.cursor/skills/architecture-knowledge-graph && \
curl -o ~/.cursor/skills/architecture-knowledge-graph/SKILL.md \
  https://raw.githubusercontent.com/BV-Venky/excalidraw-architect-mcp/main/.skills/architecture-knowledge-graph/SKILL.md

For other IDEs: Download the SKILL.md file and add it to your IDE's prompt context or system instructions.

A note on diagram complexity: As the number of components and connections grows, diagrams inevitably become harder to read - this is true for humans drawing by hand too, not just automated layout. For best results, aim for 6-15 nodes in architecture diagrams and 10-25 nodes in detailed flows. If your system is larger, split it into multiple focused diagrams rather than cramming everything into one.

Use It

Just ask your AI IDE naturally:

"Create a high-level architecture diagram of this codebase"

"Create an architecture diagram for a microservices system with an API Gateway, Auth Service, User Service, Order Service, PostgreSQL, Redis cache, and Kafka event bus"

"Convert this mermaid diagram to excalidraw diagram"

"Add a Caching layer to the Order Service in the High Level architecture diagram"

"Export the architecture diagram to SVG"

"Export the diagram as a PNG at 3x resolution"

The AI calls the MCP tool with the relationship map. The MCP handles layout, styling, and output. Open the resulting .excalidraw file with the Excalidraw VS Code extension or drag it into excalidraw.com.

Features

Auto Layout Engine

Uses the Sugiyama hierarchical layout algorithm with:

  • Adaptive layer gaps - spacing adjusts based on edge label length
  • Hub node stretching - gateways/load balancers stretch to span connected services
  • Obstacle-aware edge routing - arrows curve around intermediate nodes instead of cutting through them
  • Disconnected component stacking - separate subgraphs (e.g., monitoring stack) are placed without overlap

Component Library

50+ technology mappings with automatic visual styling:

CategoryTechnologies
DatabasePostgreSQL, MySQL, MongoDB, DynamoDB, Cassandra, ClickHouse, SQLite, CockroachDB
Message QueueKafka, RabbitMQ, SQS, Redis Streams, NATS
CacheRedis, Memcached, Varnish
Load BalancerNginx, HAProxy, ALB/ELB, Traefik, Envoy
ComputeDocker, Kubernetes, Lambda, ECS, Fargate
StorageS3, GCS, Azure Blob, MinIO
APIREST, GraphQL, gRPC, WebSocket
CDNCloudFront, Cloudflare
MonitoringPrometheus, Grafana, Datadog, ELK
ClientBrowser, Mobile, Desktop, CLI

Stateful Editing

Diagram metadata is embedded in the .excalidraw file. Ask the AI:

"Add a Redis cache in front of the database in the existing diagram"

The MCP reads the current state, applies the modification, and re-renders with proper layout.

Mermaid Conversion

Already have a Mermaid flowchart? Convert it:

"Convert this Mermaid diagram to Excalidraw" (paste your Mermaid syntax)

Image Export

Export any .excalidraw diagram to a portable image — no browser, Excalidraw app, or Node.js required.

  • SVG - zero extra dependencies; uses a pure-Python renderer that handles rectangles, ellipses, diamonds, text (including multiline), and arrows with arrowheads
  • PNG - requires the optional cairosvg package (pip install excalidraw-architect-mcp[png]); supports a configurable resolution multiplier (default 2×)

"Export the architecture diagram as an SVG"

MCP Tools

Diagram tools

ToolDescription
create_diagramCreate a new diagram from structured node/connection data
mermaid_to_excalidrawConvert Mermaid flowchart syntax to .excalidraw
modify_diagramAdd/remove/update nodes and connections on an existing diagram
get_diagram_infoRead current diagram state (call before modifying)
export_diagramExport .excalidraw to SVG or PNG image

Knowledge graph tools (kg_*)

The architecture knowledge graph (default .claude/architecture.md) is the source of truth; diagrams are rendered views of it.

ToolDescription
kg_initCreate a new knowledge graph file
kg_add_service / kg_remove_serviceAdd/update or remove a service (with type, domain, owner, tags, links)
kg_link / kg_unlinkAdd/remove a dependency (parallel edges supported — e.g. REST and Kafka between the same pair)
kg_set_domainGroup a service into a domain / bounded context
kg_infoSummarize services, domains, and topology
kg_renderRender the whole architecture to .excalidraw
kg_render_viewRender a focused diagram of specific services
kg_render_aroundRender everything within N hops of a service
kg_render_domainRender a single domain
kg_importBootstrap the graph from an existing .excalidraw diagram
whats_connected_toImpact analysis — upstream/downstream blast radius
kg_pathTrace the dependency path between two services
kg_lintHealth check: cycles, single points of failure, orphans, dangling refs
kg_exportExport the graph to Mermaid, Graphviz DOT, or JSON
kg_diffShow how the architecture changed since a git ref
kg_onboarding_docGenerate a human onboarding guide from the graph
kg_driftDetect drift between the declared graph and Python imports

Contributing

See CONTRIBUTING.md for details.

License

MIT - see LICENSE.

常见问题

What is excalidraw-architect-mcp?

excalidraw-architect-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by BV-Venky. Turn your architecture into a living, queryable knowledge graph - and render it as beautiful auto-laid-out Excalidraw diagrams. An MCP server for Cursor, Claude Code & Windsurf. Offline, no API keys. It has 144 GitHub stars.

Is excalidraw-architect-mcp safe to use?

Yes. excalidraw-architect-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install excalidraw-architect-mcp?

Clone the repository with "git clone https://github.com/BV-Venky/excalidraw-architect-mcp" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is excalidraw-architect-mcp written in?

excalidraw-architect-mcp is primarily written in Python. It is open-source under BV-Venky on GitHub, so you can review or fork the full source.

Are there alternatives to excalidraw-architect-mcp?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh excalidraw-architect-mcp against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情