AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Let your AI coding agent draw editable diagrams β not another Mermaid snippet you have to paste.
Generate editable hand-drawn diagrams from Cursor, Claude Desktop, and other MCP clients.
CodePic MCP lets an AI coding agent create diagrams directly in CodePic instead of returning static images, Mermaid snippets, or JSON that you have to paste manually. The result opens in the CodePic editor, where you can still move shapes, edit labels, adjust connectors, share a read-only link, and export PNG or JSON.
It's a remote Streamable HTTP server β no local install. First create a free API key (the cpk_... token) at https://codepic.cc/settings/api-keys (sign in β New API key β copy), then add the config for your client and replace cpk_your_api_key_here.
Create .cursor/mcp.json in your project:
Add it with one command:
Add CodePic to your claude_desktop_config.json:
Add CodePic to .vscode/mcp.json:
Add CodePic to ~/.codex/config.toml:
Add CodePic to ~/.codeium/windsurf/mcp_config.json:
Open Cline's MCP settings (cline_mcp_settings.json) and add:
Any MCP client that supports remote Streamable HTTP works β point it at the endpoint https://codepic.cc/api/mcp/mcp with header Authorization: Bearer cpk_....
list_templates - list available diagram templates.create_from_template - create a new diagram from a template.create_diagram - create a custom diagram with nodes and edges.get_diagram - fetch the current diagram structure by documentId before making targeted follow-up edits.update_diagram - update an existing diagram by replacing, adding, or removing nodes and edges.Use get_diagram when you already have a CodePic document and want the AI agent to inspect it before changing it. This keeps the workflow grounded in the current diagram instead of guessing from memory.
Example prompt:
| Example | What It Generates | Prompt |
|---|---|---|
| System architecture | Next.js SaaS architecture diagram | Next.js + Supabase + Postgres + R2 + Stripe + Vercel |
| Database ER diagram | SaaS billing data model | Users, teams, subscriptions, invoices, payments |
| OAuth sequence flow | PKCE login sequence diagram | Browser, app server, identity provider, database |
| CI/CD pipeline | GitHub Actions deployment pipeline | Type-check, lint, build, preview, production |
| Data pipeline | Analytics pipeline diagram | Segment, Snowflake, dbt, Metabase |
| Iterate existing diagram | Read an existing document, then update it | get_diagram + update_diagram |
If you share this project, lead with the workflow:
I connected Cursor to a diagram editor through MCP, so it can generate editable architecture diagrams instead of Mermaid text.
Avoid generic product claims like "best diagram tool". Developer communities respond better to a concrete workflow and real examples.
MIT β see LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/codepic)<a href="https://allmcps.com/mcp/codepic"><img src="https://allmcps.com/api/badge/codepic?style=directory" alt="CodePic on AllMCPs" /></a>