Welcome to FlowZap, the App to diagram with Speed, Clarity and Control.

FlowZap MCP Server Documentation

πŸ€– This documentation is optimized for LLM and AI Agent consumption

Version 1.3.0 | Last Updated: February 2026 | Triple-view rendering with Architecture mode

Overview

The FlowZap MCP (Model Context Protocol) Server enables AI agents to create, validate, and share professional workflow diagrams using FlowZap Codeβ€”a domain-specific language designed for machine-readable diagram generation.

What is FlowZap?

PurposeConvert text-based code into visual workflow diagrams
Optimized ForAI-first generation, agentic workflows (n8n, Make.com, Zapier)
Unique FeatureTriple-view rendering - same code renders as workflow, sequence, AND architecture diagrams
SharingInstant shareable URLs without authentication

Security Guarantees

The FlowZap MCP Server implements enterprise-grade security measures to protect users:

Network Security

ProtectionImplementation
SSRF PreventionOnly connects to flowzap.xyz and www.flowzap.xyz via HTTPS
URL ValidationAll returned URLs are verified to originate from FlowZap domains
Request Timeout30-second timeout prevents hanging connections

Input Validation

LimitValuePurpose
Max Code Length50,000 charactersPrevents memory exhaustion
Max Input Length100,000 charactersProtects against payload attacks
Null Byte RemovalAutomaticPrevents injection attacks
Control Character SanitizationAutomaticRemoves non-printable characters

Rate Limiting

ParameterValue
Max Requests30 per minute
Window Duration60 seconds
BehaviorReturns retry-after time when exceeded

Data Privacy

  • No Authentication Required - Public endpoints only
  • No User Data Stored - Playground sessions are ephemeral (15-minute TTL)
  • No Tracking - No cookies or persistent identifiers
  • Logs to stderr only - Security events never exposed to MCP clients

Available Tools

1. flowzap_get_syntax

Purpose: Retrieve complete FlowZap Code syntax documentation.

When to Use: Before generating any FlowZap Code, call this tool to learn the correct syntax.

Input Schema:

{
  "type": "object",
  "properties": {}
}

Output: Complete syntax guide including global constraints, shape types, node syntax, edge syntax, loop syntax, and common mistakes to avoid.

2. flowzap_validate

Purpose: Validate FlowZap Code syntax before creating a diagram.

When to Use: Always validate code before calling flowzap_create_playground. This prevents errors and provides actionable feedback.

Input Schema:

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "FlowZap Code to validate"
    }
  },
  "required": ["code"]
}

Success Output:

βœ… FlowZap Code is valid!

Stats:
- Lanes: 2
- Nodes: 5
- Edges: 4

Failure Output:

❌ Validation failed:
- Line 3: Unknown shape "oval". Valid shapes: circle, rectangle, diamond, taskbox
- Line 5: Edge missing handle syntax. Use: n1.handle(right) -> n2.handle(left)

3. flowzap_create_playground

Purpose: Create a shareable playground URL with the diagram.

When to Use: After validation passes, create a playground to give users an interactive diagram they can view and edit.

Input Schema:

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "FlowZap Code to load in the playground"
    },
    "view": {
      "type": "string",
      "enum": ["workflow", "sequence", "architecture"],
      "description": "Initial view mode. Default: workflow"
    }
  },
  "required": ["code"]
}

Output:

βœ… Playground created!

πŸ”— **View your diagram:** https://flowzap.xyz/playground/abc123?view=architecture

The diagram is ready to view and edit. Share this link with anyone!

View Modes:

ViewBest For
workflowStep-by-step process flows (default)
sequenceMessage exchanges between participants
architectureSystem-level overview showing lanes as systems

Important Notes:

  • Automatically validates code before creating playground
  • Returns validation errors if code is invalid
  • Playground URLs expire after 15 minutes of inactivity
  • No authentication required to view
  • Use view="architecture" for system-level overview of multi-lane diagrams

Validation Rules Reference

The validator performs comprehensive validation checks across multiple categories. Understanding these helps generate valid code on the first attempt.

Error Codes (Block Diagram Creation)

CodeDescriptionFix
CONTAINS_EMOJIEmoji characters detectedUse UTF-8 plain text only
NESTED_LANELane defined inside another laneFlatten lane structure
UNMATCHED_BRACEClosing } without opening {Check brace balance
UNCLOSED_BRACEMissing closing }Add closing brace
DUPLICATE_NODE_IDSame node ID used twiceUse unique IDs: n1, n2, n3...
INVALID_SHAPEUnknown shape typeUse: circle, rectangle, diamond, taskbox
MISSING_LABELNode without label (except taskbox)Add label:"Text"
NODE_OUTSIDE_LANENode defined outside any laneMove inside a lane block
MISSING_HANDLESEdge without handle syntaxUse n1.handle(right) -> n2.handle(left)
INVALID_EDGE_SYNTAXMalformed edge definitionCheck arrow syntax ->
INVALID_DIRECTIONUnknown handle directionUse: left, right, top, bottom
EDGE_OUTSIDE_LANEEdge defined outside any laneMove inside a lane block
UNDEFINED_LANE_REFCross-lane ref to non-existent laneCheck lane name spelling
INVALID_LOOP_SYNTAXMalformed loop definitionUse loop [condition] n1 n2
LOOP_OUTSIDE_LANELoop defined outside any laneMove inside a lane block
MISPLACED_COMMENTComment in wrong locationComments only after lane {
COMMENT_OUTSIDE_LANEComment outside any laneMove inside lane after {
UNDEFINED_NODEEdge references undefined nodeDefine node before referencing
NON_SEQUENTIAL_NUMBERINGGap in node numberingUse n1, n2, n3... sequentially
EMPTY_DIAGRAMNo nodes definedAdd at least one node
WRONG_DSL_FORMATMermaid/PlantUML detectedUse FlowZap syntax only

Warning Codes (Best Practice Violations)

CodeDescriptionRecommendation
NON_PRINTABLE_CHARSControl characters detectedUse plain text only
DUPLICATE_LANESame lane defined twiceMerge into single block
MISSING_LANE_LABELLane without # Display NameAdd display label
NON_STANDARD_NODE_IDID not in n1, n2, n3 formatUse standard numbering
WRONG_LABEL_SYNTAXlabel="Text" instead of label:"Text"Use colon for node attributes
TASKBOX_MISSING_PROPSTaskbox without owner/descriptionAdd required properties
WRONG_EDGE_LABEL_SYNTAX[label:"Text"] instead of [label="Text"]Use equals for edge labels
LOOP_TOO_FEW_NODESLoop with only 1 nodeInclude at least 2 nodes
ORPHAN_NODENode not connected to any edgeConnect or remove
UNKNOWN_ATTRIBUTENon-standard attribute usedUse: label, owner, description, system
LABEL_TOO_LONGLabel exceeds 50 charactersKeep labels concise

FlowZap Code Syntax Quick Reference

Global Constraints

βœ“ UTF-8 plain text only (no emojis)
βœ“ Node IDs: n1, n2, n3... (globally unique, sequential, no gaps)
βœ“ Shapes: circle, rectangle, diamond, taskbox
βœ“ Attributes: label, owner, description, system
βœ“ Comments: Only "# Display Label" after lane opening brace
βœ— No Mermaid, PlantUML, or other DSL syntax

Basic Structure

laneName {
  # Lane Display Name
  n1: circle label:"Start"
  n2: rectangle label:"Process"
  n1.handle(right) -> n2.handle(left)
}

Shape Types

ShapePurposeExample
circleStart/End eventsn1: circle label:"Start"
rectangleTasks/Activitiesn2: rectangle label:"Process Order"
diamondDecision gatewaysn3: diamond label:"Valid?"
taskboxAssigned tasksn4: taskbox owner:"Alice" description:"Deploy"

Edge Syntax

# Basic edge
n1.handle(right) -> n2.handle(left)

# Edge with label
n2.handle(bottom) -> n3.handle(top) [label="Yes"]

# Cross-lane edge (prefix with lane name)
n3.handle(right) -> fulfillment.n4.handle(left) [label="Send"]

Handle Directions

DirectionPosition
leftLeft side of node
rightRight side of node
topTop of node
bottomBottom of node

Loop Syntax

loop [retry up to 3 times] n1 n2 n3
  • Must be inside a lane block
  • Cannot be nested
  • Should reference at least 2 nodes

Complete Example

sales {
  # Sales Team
  n1: circle label:"Order Received"
  n2: rectangle label:"Validate Order"
  n3: diamond label:"Valid?"
  n1.handle(right) -> n2.handle(left)
  n2.handle(right) -> n3.handle(left)
  n3.handle(right) -> fulfillment.n4.handle(left) [label="Yes"]
  n3.handle(bottom) -> n6.handle(top) [label="No"]
  n6: rectangle label:"Reject Order"
}

fulfillment {
  # Fulfillment
  n4: rectangle label:"Process Order"
  n5: circle label:"Complete"
  n4.handle(right) -> n5.handle(left)
}

Recommended Workflow for AI Agents

  1. Step 1: Learn Syntax
    {"name": "flowzap_get_syntax", "arguments": {}}}
  2. Step 2: Generate Code
    Based on user request, generate FlowZap Code following the syntax rules.
  3. Step 3: Validate
    {"name": "flowzap_validate", "arguments": {"code": "..."}}
  4. Step 4: Fix Errors (if any)
    Parse error messages and correct the code.
  5. Step 5: Create Playground
    {"name": "flowzap_create_playground", "arguments": {"code": "..."}}
  6. Step 6: Present to User
    Share the playground URL with the user.

Common Mistakes to Avoid

MistakeIncorrectCorrect
Lane comment on separate linelaneName {
# Label
laneName { # Label
Abbreviated shapesn1: rectn1: rectangle
Missing handlesn1 -> n2n1.handle(right) -> n2.handle(left)
Wrong node attribute syntaxlabel="Text"label:"Text"
Wrong edge label syntax[label:"Text"][label="Text"]
Emojis in labelslabel:"Start πŸš€"label:"Start"
Unknown attributespriority:"high"(remove - not supported)
Non-sequential IDsn1, n3, n5n1, n2, n3
Undefined lane refsundefined.n5Use actual lane name

API Endpoints (Direct Access)

For agents that prefer direct HTTP calls instead of MCP:

POST /api/validate

URL: https://flowzap.xyz/api/validate

Rate Limit: 30 requests/minute per IP

Request:

{
  "code": "process { # P n1: circle label:\"Start\" }"
}

Response:

{
  "valid": true,
  "errors": [],
  "warnings": [],
  "stats": {
    "lanes": 1,
    "nodes": 1,
    "edges": 0,
    "loops": 0
  }
}

POST /api/playground/create

URL: https://flowzap.xyz/api/playground/create

Rate Limit: 5 requests/minute, 50/day per IP

Request:

{
  "code": "process { # P n1: circle label:\"Start\" }"
}

Response:

{
  "url": "https://flowzap.xyz/playground?session=abc123"
}

Installation

The FlowZap MCP Server works with any tool that supports the Model Context Protocol (MCP). Here is the complete list of compatible tools:

All Compatible Coding Tools

ToolHow to Configure
Claude DesktopAdd to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Claude CodeRun: claude mcp add --transport stdio flowzap -- npx -y flowzap-mcp
Or add to .mcp.json in your project root.
CursorOpen Settings β†’ Features β†’ MCP Servers β†’ Add Server. Use the same JSON config.
Windsurf IDEAdd to ~/.codeium/windsurf/mcp_config.json
OpenAI CodexAdd to ~/.codex/config.toml:
[mcp_servers.flowzap]
command = "npx"
args = ["-y", "flowzap-mcp"]
Or run: codex mcp add flowzap -- npx -y flowzap-mcp
Warp TerminalSettings β†’ MCP Servers β†’ Click "+ Add" β†’ Paste the JSON config.
Zed EditorAdd to settings.json:
{"context_servers": {"flowzap": {"command": "npx", "args": ["-y", "flowzap-mcp"]}}}
Cline (VS Code)Open Cline sidebar β†’ MCP Servers icon β†’ Edit cline_mcp_settings.json
Roo Code (VS Code)Add to .roo/mcp.json in project or global settings.
Continue.devCreate .continue/mcpServers/flowzap.yaml with:
name: FlowZap
mcpServers:
- name: flowzap
command: npx
args: ["-y", "flowzap-mcp"]
Sourcegraph CodyAdd to VS Code settings.json via openctx.providers configuration.

Not Compatible: Replit and Lovable.dev only support remote MCP servers via URL. They cannot use the FlowZap MCP npm package directly. Use the Public API instead.

JSON Configuration

All tools use the same JSON configuration format:

{
  "mcpServers": {
    "flowzap": {
      "command": "npx",
      "args": ["-y", "flowzap-mcp"]
    }
  }
}

Windows Users: If tools don't appear, use the absolute path: "command": "C:\\Program Files\\nodejs\\npx.cmd". Find your npx path with: where.exe npx

Support & Resources

Version History

VersionDateChanges
1.2.0Jan 2026Added new validation rules, comprehensive test coverage
1.1.0Dec 2025Security hardening, rate limiting
1.0.0Nov 2025Initial release

This documentation is optimized for LLM consumption. For human-readable guides, visit flowzap.xyz/flowzap-code