Developer & Agent Docs

ProtoFlow AI MCP Server & API

Connect Claude Code, Cursor, Codex, Google Antigravity, and Claude Desktop directly to ProtoFlow AI (formerly Alex) via the Model Context Protocol (MCP) — for live bidirectional canvas authoring or zero-install engineering DDL/TSX handoff.

1. Remote Zero-Install Spec API (POST /api/v1/mcp/<shareId>)

After publishing any prototype to a self-hosted /p/{id} URL, engineers paste one Streamable HTTP block into Cursor, Claude Code, Windsurf, or Antigravity to read normalized ER schemas, PostgreSQL/MySQL DDL, page TSX, and component sticky specs without installing the desktop app:

{
  "mcpServers": {
    "protoflow": {
      "url": "https://protoflow.example.com/api/v1/mcp/<shareId>"
    }
  }
}

Using Claude Code CLI or Codex CLI? Add the remote spec server in one command (or copy the local stdio snippet from the desktop app's MCP Connect dialog):

# Claude Code (remote Streamable HTTP spec access)
claude mcp add --transport http protoflow https://protoflow.example.com/api/v1/mcp/<shareId>

6 Read-Only Specification Tools

  • protoflow_get_project_overview — Project modules, sitemap tree, desktop/mobile pages, and table inventory.
  • protoflow_get_database_schema — Normalized ER tables, foreign keys, unique constraints, sample rows, and PostgreSQL/MySQL DDL.
  • protoflow_get_page_spec — Component hierarchy, TSX source, table bindings, actions, and pinned sticky-note constraints.
  • protoflow_get_docs_and_flows — Project Markdown notes and Mermaid workflow diagrams.
  • protoflow_search_spec — Full-text search across pages, fields, notes, and components.
  • protoflow_get_implementation_checklist — Ordered implementation checklist derived from schemas, flows, and sticky notes.

2. Bidirectional Live Canvas Co-Design (18 Authoring Tools)

Enable MCP → Local → Bidirectional design inside the desktop workbench to expose the authenticated loopback bridge (live.json) with sequential expectedRevision concurrency guards and multi-step Cmd/Ctrl+Z undo. One-click installers inside the modal support Google Antigravity, Claude Desktop (.mcpb), Claude Code, Cursor, and Codex.

Inspect & Plan

  • protoflow_workspace, protoflow_get_contracts, protoflow_get_implementation_guide, protoflow_get_project_overview, protoflow_get_database_schema, protoflow_get_page_spec, protoflow_get_docs_and_flows, protoflow_search_spec, protoflow_get_implementation_checklist

Model ER Schemas & Seed Coherent Rows

  • protoflow_upsert_db_tables — Create or update physical ER tables with foreign keys, single-column unique constraints, and composite unique constraints.
  • protoflow_manage_table_rows — Seed or update relational preview rows aligned with foreign keys and chart bindings.

Author Pages, Sticky Specs, Docs & Visual Checks

  • protoflow_manage_sitemap — Create, rename, move, or organize desktop and mobile menu folders and pages.
  • protoflow_write_page & protoflow_edit_page_block — Write complete <Page> / <MobilePage> TSX trees or patch targeted subtrees (such as the currently selected selectedPfId) without disturbing surrounding layout.
  • protoflow_manage_sticky_notes & protoflow_manage_docs_and_flows — Pin business validation rules onto controls and author Markdown PRDs + Mermaid diagrams.
  • protoflow_audit_project & protoflow_capture_preview — Run closed-loop schema/navigation audits and capture offscreen high-DPI PNG screenshots (waiting for ECharts & Freeform first paint) for layout verification.

Full CLI & stdio options (--project, --mode readwrite --workspace, --desktop-bridge) are documented in packages/protoflow-mcp/README.md.