Skip to content

How It Works

Mistflow is built on a simple principle: your AI editor is smart enough to build apps — it just needs the right tools.

┌──────────────────┐ MCP (stdio) ┌──────────────────┐
│ AI Editor │ ◄──────────────────► │ Mistflow MCP │
│ (Claude Code, │ JSON-RPC 2.0 │ Server (local) │
│ Cursor, etc.) │ └────────┬─────────┘
└──────────────────┘ │ HTTPS
┌──────────────────┐
│ Mistflow API │
│ (cloud) │
├──────────────────┤
│ Build + Deploy │
│ Pipeline │
├──────────────────┤
│ Cloudflare │
│ Pages (hosting) │
└──────────────────┘

The MCP server runs on your machine as a Node.js process, started by your editor. It:

  • Receives tool calls from your AI editor via JSON-RPC 2.0 over stdio
  • Validates inputs against schemas
  • Forwards requests to the Mistflow API
  • Returns structured results back to the editor

The MCP server never calls an LLM. It has no AI of its own. It’s a tool provider.

The Mistflow API (FastAPI + PostgreSQL) handles:

  • Project and org management
  • Build execution and artifact storage
  • Deployment to Cloudflare Pages
  • Domain management and DNS verification
  • Provenance tracking (which prompt built which feature)

When you describe an app to your AI editor, here’s the typical sequence:

  1. Planning — The AI calls plan-app with your description. Mistflow returns a structured plan: features to build, tech stack, file structure, and implementation order.

  2. Scaffolding — The AI calls init-project with the plan. Mistflow creates the project, selects a template, and returns the initial file tree.

  3. Building — For each step in the plan, the AI calls implement-step. This is where the AI writes actual code. Mistflow tracks each step’s output and validates it builds correctly.

  4. Deploying — The AI calls deploy. Mistflow bundles the code, pushes it to Cloudflare Pages, and returns the live URL.

  5. Iterating — When you ask for changes, the cycle repeats from step 3. The AI calls implement-step for the change, then deploy again.

MCP is a standard protocol that AI editors already support. By exposing tools via MCP, Mistflow works with any compatible editor — today and in the future — without building separate integrations.

Every AI editor already has an LLM. Adding another one would mean:

  • Extra latency (double the AI calls)
  • Extra cost (you’d pay for Mistflow’s tokens)
  • Conflicts (two AIs disagreeing)

By staying tool-only, Mistflow is fast, cheap, and always aligned with your editor’s reasoning.

When an AI builds your app, you lose the “why” behind decisions. Provenance tracking means every file, every feature, and every deploy links back to the prompt that created it. This is essential for teams and for debugging.

  • Auth: Clerk-based authentication. The MCP server authenticates via your API key (stored locally after first login).
  • Isolation: Each org’s projects are fully isolated. No cross-org access.
  • Code ownership: Your code is yours. Connect GitHub and push it to your own repo at any time.
  • No secrets in transit: The MCP server communicates with the API over HTTPS. Build artifacts are stored encrypted at rest.