How to Build Sequence Diagrams with Claude
Generate sequence diagrams with Claude and ToolRouter. Visualize service interactions instantly.
ToolDiagram GeneratorClaude 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
ToolRouterURL
https://api.toolrouter.com/mcp3Done — works on Claude chat, desktop, and mobile
Steps
Once connected (see setup above), use the Diagram Generator tool:
- Ask Claude: "Create a sequence diagram using diagram-generator" and describe the interaction
- Claude generates the diagram showing participants, messages, and responses
- 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