How to Build Sequence Diagrams with Claude

Generate sequence diagrams with Claude and ToolRouter. Visualize service interactions instantly.

Tool
Diagram Generator icon
Diagram Generator

Claude designs sequence diagrams through conversation about your service interactions. Describe the main flow, then add alternative paths, timeout scenarios, and retry logic through follow-ups. The iterative approach ensures the diagram captures real-world complexity including the failure modes that simple descriptions miss.

Connect ToolRouter to Claude

1Go to Settings → Connectors → Add custom connector
2Enter the details below and click Add
Name
ToolRouter
URL
https://api.toolrouter.com/mcp
3Done — works on Claude chat, desktop, and mobile

Steps

Once connected (see setup above), use the Diagram Generator tool:

  1. Ask Claude: "Create a sequence diagram using diagram-generator" and describe the interaction
  2. Claude generates the diagram showing participants, messages, and responses
  3. Download the diagram for your API docs or design review

Example Prompt

Try this with Claude using the Diagram Generator tool
Create a sequence diagram for our OAuth2 flow: user clicks login, browser redirects to auth provider, user authenticates, auth provider redirects back with code, our server exchanges code for token, server creates session, browser receives session cookie.

Tips

  • Name each participant clearly -- "Browser", "API Gateway", "Auth Service" rather than generic labels
  • Ask Claude to add error paths showing what happens when a step fails