Let Claude, ChatGPT, Cursor, and other AI assistants generate sequence diagrams directly through the standard Model Context Protocol.
The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools and services. When you connect an AI agent to the WebSequenceDiagrams MCP server, the agent can generate professional sequence diagrams as part of a conversation — no copy-pasting required.
Our MCP server exposes two tools:
generate_sequence_diagram — render diagram text into a PNG, SVG, or PDF imagelist_diagram_styles — enumerate all available rendering styles.well-known
WebSequenceDiagrams also publishes $HOSTURL/.well-known/mcp.json
following the draft
.well-known MCP discovery specification.
Clients can discover the MCP endpoint there and then connect to $HOSTURL/mcp
using the normal MCP protocol flow.
$HOSTURL/mcp.
The server renders the diagram and returns the result to the client. The protocol
follows the MCP 2025-03-26 specification.
Point your MCP client at $HOSTURL/mcp.
"Draw a sequence diagram of the OAuth2 authorization code flow."
The AI calls generate_sequence_diagram and shows you the result.
Each AI assistant has its own way of registering MCP servers. Below are setup instructions for the most popular clients.
Open Claude Desktop → Settings → Developer → Edit Config, paste the snippet above, and restart Claude.
Create or edit .cursor/mcp.json in your project root (or
~/.cursor/mcp.json for global config), paste the snippet,
and restart Cursor.
Create .vscode/mcp.json in your workspace. GitHub Copilot
Chat will discover the server and surface its tools automatically.
For any MCP-compatible client, set the server URL to
$HOSTURL/mcp using the
Streamable HTTP transport. The endpoint accepts
JSON-RPC 2.0 POST requests.
apikey parameter when calling
generate_sequence_diagram. Get your key at
websequencediagrams.com/users/getapikey.
Render a sequence diagram from text notation and return the generated diagram inline, typically as a base64-encoded image result that MCP clients can display directly.
message (string, required) — the diagram source text in WebSequenceDiagrams notation. Use \n for newlines.style (string, optional) — rendering style. Default: modern-blue. See styles below.format (string, optional) — output format: png, svg, or pdf. Default: png. SVG/PDF require a premium API key.apikey (string, optional) — your premium API key for premium styles and formats.Returns a list of all available rendering styles. Takes no parameters.
The WebSequenceDiagrams MCP server implements the MCP 2025-03-26 specification using the Streamable HTTP transport.
GET $HOSTURL/.well-known/mcp.json
This discovery document follows the draft
.well-known MCP specification
and advertises the same server and tool list exposed by POST $HOSTURL/mcp.
POST $HOSTURL/mcp
All requests use Content-Type: application/json and follow JSON-RPC 2.0.
initialize — handshake; returns server capabilities and infonotifications/initialized — client acknowledgement (no response body)tools/list — enumerate available toolstools/call — invoke a toolping — health check
Pass these text patterns as the message parameter.
For the full language reference, see the
complete documentation.
Any MCP-compatible client can use the WebSequenceDiagrams server. Here are some that have been tested:
Anthropic's desktop app has native MCP support. Add the server URL to your config and Claude can generate diagrams on request.
The AI-powered code editor supports MCP servers through .cursor/mcp.json. Great for generating architecture diagrams while coding.
Configure via .vscode/mcp.json to let Copilot Chat generate sequence diagrams in your workspace.
Codeium's AI IDE supports MCP. Add the server in the MCP configuration panel.
Build your own using the MCP SDK in Python, TypeScript, or any language with HTTP support.
Use a bridge tool or custom GPT action to connect ChatGPT to any MCP server, including this one.