CodePic

Registre officiel Médias et design

AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images

Que pouvez-vous faire avec CodePic ?

  • 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.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

Remote (streamable-http)
Claude Code
claude mcp add --transport http codepic 'https://codepic.cc/api/mcp/mcp' --header 'Authorization: <Bearer API key from https://codepic.cc/settings/api-keys (format: cpk_...)>'
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "codepic": {
            "type": "http",
            "url": "https://codepic.cc/api/mcp/mcp",
            "headers": {
                "Authorization": "<Bearer API key from https://codepic.cc/settings/api-keys (format: cpk_...)>"
            }
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. CodePic MCP
  2. Quick Start
  3. Available MCP Tools
  4. Iterate on an Existing Diagram
  5. Examples
  6. Useful Links
  7. Community Post Angle
  8. License

CodePic MCP

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.

Quick Start

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.

Cursor

Create .cursor/mcp.json in your project:

{
  "mcpServers": {
    "codepic": {
      "url": "https://codepic.cc/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer cpk_your_api_key_here"
      }
    }
  }
}
Claude Code

Add it with one command:

claude mcp add --transport http codepic https://codepic.cc/api/mcp/mcp \
  --header "Authorization: Bearer cpk_your_api_key_here"
Claude Desktop

Add CodePic to your claude_desktop_config.json:

{
  "mcpServers": {
    "codepic": {
      "type": "streamableHttp",
      "url": "https://codepic.cc/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer cpk_your_api_key_here"
      }
    }
  }
}
VS Code (GitHub Copilot)

Add CodePic to .vscode/mcp.json:

{
  "servers": {
    "codepic": {
      "type": "http",
      "url": "https://codepic.cc/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer cpk_your_api_key_here"
      }
    }
  }
}
Codex CLI

Add CodePic to ~/.codex/config.toml:

[mcp_servers.codepic]
url = "https://codepic.cc/api/mcp/mcp"

[mcp_servers.codepic.headers]
Authorization = "Bearer cpk_your_api_key_here"
Windsurf

Add CodePic to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "codepic": {
      "serverUrl": "https://codepic.cc/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer cpk_your_api_key_here"
      }
    }
  }
}
Cline

Open Cline's MCP settings (cline_mcp_settings.json) and add:

{
  "mcpServers": {
    "codepic": {
      "type": "streamableHttp",
      "url": "https://codepic.cc/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer cpk_your_api_key_here"
      }
    }
  }
}
Other clients

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_....

Available MCP Tools

  • 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.

Iterate on an Existing Diagram

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:

Use get_diagram to inspect document <documentId>, then update the diagram by adding a Redis cache between the API server and Postgres database.

Examples

ExampleWhat It GeneratesPrompt
System architectureNext.js SaaS architecture diagramNext.js + Supabase + Postgres + R2 + Stripe + Vercel
Database ER diagramSaaS billing data modelUsers, teams, subscriptions, invoices, payments
OAuth sequence flowPKCE login sequence diagramBrowser, app server, identity provider, database
CI/CD pipelineGitHub Actions deployment pipelineType-check, lint, build, preview, production
Data pipelineAnalytics pipeline diagramSegment, Snowflake, dbt, Metabase
Iterate existing diagramRead an existing document, then update itget_diagram + update_diagram

Community Post Angle

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.

License

MIT — see LICENSE.

Questions fréquentes

Qu'est-ce que CodePic ?

AI agent draws editable hand-drawn diagrams (flowchart, ER, architecture) via MCP, not static images

Comment installer CodePic ?

Il fonctionne comme serveur distant. Dans Claude Code : claude mcp add --transport http codepic 'https://codepic.cc/api/mcp/mcp' --header 'Authorization: <Bearer API key from https://codepic.cc/settings/api-keys (format: cpk_...)>'. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour CodePic ?

Oui. Il attend Authorization, à renseigner dans sa configuration.

CodePic est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient CodePic ?

Il est publié par abelce. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.