Skip to main content
Glama

App Factory MCP

CI

An orchestrator MCP server that takes a plain-language app description all the way to a deployed, audited application. It guides the host agent (Cursor, Devin, Claude Desktop - any MCP client) and its parallel subagents through a strict quality workflow - the MCP owns the state machine, memory, checklists, design gallery and audit/deploy pipelines; the agent writes the code.

The workflow

intake -> interview -> design -> blueprint -> build -> audit -> deploy
  1. Intake - start_project + enhance_prompt: your description becomes a production-grade master prompt (goal, flows, non-goals, acceptance criteria, architecture sketch, threat model lite, UX principles, success metrics) plus a gap list against the checklist, with prior lessons injected when relevant.

  2. Interview - get_next_questions / record_answer: a checklist-driven planning interview (auth, data, UX empty/loading/error states, migrations, rate limits, observability, payments, offline, accessibility, legal, deployment...). Core questions are always asked; others appear only when relevant.

  3. Design - launch_design_gallery: a local web page opens in your browser - a full design studio. Required sections: sixteen live UI mockups of your app (each inspired by famous products - Spotify, Notion, Linear, Stripe, Airbnb, Netflix, Duolingo, Apple and more), eight real font pairings, six icon sets and four animation levels. Optional sections: card style (flat / outlined / elevated / frosted glass), background treatment (solid / subtle gradient / vivid gradient / aurora blur), an interactive color wheel (pick your own accent, optionally a two-color gradient), and a drag-and-drop layout designer where you arrange Navbar, Sidebar, Hero, Card Grid and more on a 12x8 grid to design the main screen yourself. Everything flows back through get_design_choices. For even broader direction, get_design_inspiration serves the design languages of 100 of the world's most famous apps (palettes and patterns as inspiration - never logos or brand assets).

  4. Blueprint - generate_blueprint: design choices become a precise designImplementation (tokens, component rules, a11y, motion budget) and parallelizable work packages (foundation, frontend, backend, tests, polish) with ownsPaths / mustNotTouch, contracts-first foundation, and verifiable done criteria. Scaffold targets: Next.js PWA, Expo, Tauri, Docker.

  5. Build - get_work_package / report_package_done coordinate subagents; ranked lessons are binding rules in every package spec.

  6. Audit - run_audit: typecheck, lint, tests, dependency vulnerability scan, secret scan, semgrep (if installed) and Lighthouse (if given a running URL). Fix root causes (not suppresses); failed audits journal audit-failed and recovery journals a refine-candidate. Gate: score >= configurable minScore (default 80) with zero critical findings.

  7. Deploy - get_deploy_options / deploy: Vercel, Netlify, Docker, local, Expo EAS or Tauri bundles. Failures journal deploy-failed; success nudges refine + preference memory.

Plus:

  • The brain - every tool call is journaled automatically; the agent records decisions, problems and milestones with log_event, and get_context reconstructs what is happening, what has happened and what to do next - across sessions. Long journals are compacted automatically into digest entries so recaps stay sharp on big projects.

  • Portable brain (handoff across agents) - each app with a workspacePath also gets an in-repo brain (AGENTS.md, CLAUDE.md, .app-factory/BRAIN.md, state.json, journal.jsonl, …) so Cursor, Claude Code, Codex, Devin, or any agent can resume mid-stream without App Factory MCP. Synced automatically on major tools; also init_portable_brain / sync_portable_brain / read_portable_brain / write_portable_brain.

  • Self-improvement - refine reviews the journal (errors, open problems, failed audits, deploy failures, repeated/error-prone tools) with an explicit quality bar and anti-patterns. Near- duplicate lessons are rejected. Surviving lessons are ranked by relevance and injected into get_context, get_project_state, work packages, and the portable brain (BRAIN.md), so behavior actually changes. Server instructions steer every host agent into this loop by default.

  • Self-evolution (gated) - App Factory can improve its own codebase from what it learns in use. A tool that keeps failing is automatically flagged as a self-improvement-candidate in the journal. The agent files a proposal (propose_self_improvement) with evidence, and then the gate applies: the proposal must be justified twice (justify_self_improvement) with independent reasoning - near-duplicate justifications are rejected by a similarity check, and the second justification must include measured evidence. Only then does apply_self_improvement unlock, and the final commit_self_improvement re-runs build + unit tests + smoke itself and refuses to git commit/push unless everything passes - "definite improvement" is enforced by the machine, not claimed by the agent. Weak proposals get reject_self_improvement, with the reasoning preserved.

  • Persistent goals - set_goal / update_goal keep an objective and measurable success criteria alive across sessions, so any future session knows exactly what "done" means.

  • Memory - remember / recall (SQLite): global user preferences persist across projects, so every new project starts smarter.

  • Existing apps - analyze_app understands any codebase (frameworks, capabilities, issues), import_app adopts it as a maintenance-mode project for the improve/fix loop, and test_app verifies it builds, passes tests and actually responds over HTTP.

  • Improvement engine - suggest_improvements proposes upgrades on two levels: the app (UX, performance, retention, quality gaps) and the idea itself (positioning, differentiation, monetization).

  • GitHub scout - search_github finds supporting repos/libraries with license and maintenance signals.

  • Legal & compliance - generate_legal_docs produces tailored Privacy Policy, Terms of Service and Cookie Policy templates plus a region-aware compliance checklist (GDPR, CCPA/CPRA, DPDP, COPPA, PCI-DSS), and the interview asks where your users live so the right regulations apply. Templates, not legal advice - the tool says so too.

  • Instant websites - instant_site: skips the deep interview, auto-fills sensible answers, jumps straight to the design gallery, then scaffold-audit-deploy.

  • Internet - web_search / fetch_url for research during any phase.

  • Standalone audits - run_audit works on any codebase, no project required.

Related MCP server: MCP Director

Install

Requires Node.js >= 22.5 (uses the built-in node:sqlite).

From source:

npm install
npm run build

Register in Cursor's ~/.cursor/mcp.json:

{
  "mcpServers": {
    "app-factory": {
      "command": "node",
      "args": ["<absolute path to this folder>/dist/server.js"]
    }
  }
}

Then reload Cursor and say e.g. "Use app-factory to build me a recipe manager app".

State is stored in ~/.app-factory (or ./data when running from a clone that already has one); override with the APP_FACTORY_DATA_DIR environment variable.

Beyond Cursor: Devin and other MCP clients

App Factory speaks standard MCP over stdio, so any MCP-capable agent can run it:

  • Devin (cloud): Settings -> MCP Marketplace -> Add a custom MCP -> transport STDIO, command node, args <path>/dist/server.js.

  • Devin CLI: devin mcp add app-factory -- node <path>/dist/server.js

  • Claude Desktop / others: add the same command/args to their MCP config.

Notes for headless/VM environments (like Devin's workspace): set APP_FACTORY_NO_BROWSER=1 so launch_design_gallery serves the page without trying to open a browser (fetch the URL or use set_design_choice as the no-UI fallback), and set GITHUB_TOKEN for higher search_github rate limits. The SQLite brain, goals and lessons live in the data dir, so the same project can be advanced from Cursor one day and Devin the next. The portable brain in the app repo is the handoff layer when MCP is unavailable (see below).

Portable brain / handoff across agents

When a project has a workspacePath (set on start_project, import_app, generate_blueprint, or init_portable_brain), App Factory keeps a durable, AI-readable context store inside the app repo:

<app>/
  AGENTS.md                 # entrypoint: how to resume
  CLAUDE.md                 # Claude Code pointer (same brain)
  .app-factory/
    BRAIN.md                # always-current narrative recap
    state.json              # machine-readable state
    journal.jsonl           # append-only event log
    decisions.md            # decisions made
    open-problems.md        # unresolved issues

Secrets are scrubbed before write. Sync is idempotent and runs automatically after start/import, answers, design choices, blueprint/build progress, audits, goals, refine, and log_event. state.json includes lessonsRanked (id, scope, relevance, rankReason) and lessonsLearned (formatted lines); AGENTS.md / BRAIN.md surface the top ranked lessons prominently so outside agents obey the same binding rules as get_context.

Agent

How it picks up

Cursor

Opens AGENTS.md / .app-factory/BRAIN.md (agents often auto-read AGENTS.md). With MCP: get_context + auto-sync.

Claude Code

Reads CLAUDE.md and AGENTS.md at session start; follow links into .app-factory/.

Codex

Start from AGENTS.md then BRAIN.md + state.json; append journal lines when deciding/fixing.

Devin

Same files in the workspace; with MCP configured, prefer get_context / sync_portable_brain.

Explicit tools: init_portable_brain, sync_portable_brain, read_portable_brain, write_portable_brain. Outside agents without MCP can still continue from disk alone.

Optional audit tools

The audit uses what it finds and skips the rest gracefully:

  • gitleaks - deeper secret scanning (built-in regex scan is the fallback)

  • osv-scanner - dependency CVEs (npm audit is the fallback)

  • semgrep - static security analysis (pip install semgrep)

  • Lighthouse - runs via npx lighthouse when you pass a running app url

Development

npm run build   # compile TypeScript
npm test        # unit tests (store, lessons ranking, evolve gate, portable brain, blueprint quality, catalog)
npm run smoke   # end-to-end test of the whole workflow over real stdio MCP

CI runs build + unit tests + smoke on Ubuntu and Windows, Node 22 and 24, for every push and PR.

Layout:

  • src/server.ts - MCP entry point

  • src/state/ - SQLite store (projects, memory, answers, choices, packages, audits) + checklist loader

  • src/portable-brain/ - in-repo AGENTS.md / .app-factory/* writer for cross-agent handoff

  • src/learning/ - lesson ranking / refine quality helpers

  • src/phases/ - one module per workflow phase (tools live here)

  • src/learning/ - lesson ranking, quality bar, duplicate detection for the always-learning loop

  • src/portable-brain/ - in-repo AGENTS.md / .app-factory sync for cross-agent handoff

  • src/gallery/ - the design gallery: option data, HTML renderer, local HTTP server

  • src/audit/ - audit runners and scoring

  • checklists/ - the "everything an app needs" knowledge base (edit to extend the interview/audit)

  • templates/ - scaffold guides per target (nextjs-pwa, expo, tauri, docker)

Available Tools

32 tools
analyze_appAnalyze an existing app codebaseA

Understand an existing app: detects frameworks, language, dependencies, capabilities (tests, auth, database, payments, PWA, CI, error tracking...), folder structure and issues. Use this FIRST when asked to understand, improve, fix or extend an app that already exists. Complements (does not replace) reading the actual source code.

Inputs: appPath (required).

deployDeploy the appA

Deploys the finished app. With execute=false it only generates deployment config files (Dockerfile/compose for docker) and returns the exact commands. With execute=true it runs the deployment. Only available once the audit has passed. Marks the project done on success.

Inputs: target (required), appPath (required), projectId (required), execute.

enhance_promptEnhance the app description into a master promptA

Phase 1 of the App Factory workflow. Analyzes the project description against the 'everything an app needs' checklist, returns a structured master prompt skeleton plus a gap list of topics the description does not cover, and advances the project to the interview phase.

Inputs: projectId (required).

fetch_urlFetch a web pageA

Fetch a URL and return its readable text content (HTML stripped). Use for reading documentation pages, API references or content the user linked.

Inputs: url (required), maxChars.

generate_blueprintGenerate the build blueprintA

Phase 4 of the App Factory workflow. Compiles the description, interview answers and design choices into a build blueprint with parallelizable work packages. Launch one parallel subagent per work package within the same parallelGroup (group 0 first, then 1, then 2), passing each subagent the full spec from get_work_package. Advances the project to the build phase.

Inputs: projectId (required), workspacePath.

get_contextGet full situational context (the brain's recap)A

Reconstructs context: what is happening, what has happened, and what to do next. With a projectId: the project's full state plus its journal timeline (tool calls, decisions, problems, milestones) and related memories. Without: a global recap of all projects and recent activity. Call this at the START of any session that continues earlier work, after context loss, or whenever unsure what already happened.

Inputs: projectId, eventLimit.

get_deploy_optionsGet deployment optionsA

Phase 6 of the App Factory workflow. Lists deployment targets with requirements and steps. Present the relevant options to the USER (respecting their interview answer about deployment) and ask which they want, then call deploy.

Inputs: projectId (required).

get_design_choicesGet the user's design choicesA

Reads the selections the USER made in the design gallery. If the user has not finished choosing, returns waiting=true - ask the user to finish in the browser, then call again. When all four choices exist the project advances to the blueprint phase.

Inputs: projectId (required).

get_design_inspirationGet design inspiration from famous appsA

A library of the design languages of ~100 of the world's most famous apps (palette directions and publicly observable UI patterns). Use it to offer the USER broader design directions than the gallery presets, to answer 'make it look like X', or to build a custom theme: pick an inspiration, derive design tokens from its palette/traits, and confirm with the user. IMPORTANT: palettes and layout patterns are fair inspiration; never copy logos, trademarks, brand assets or exact trade dress. Filter by query (name/traits) and/or category: social, communication, entertainment, music, productivity, dev tools, design, travel, commerce, food, finance, education, health, utilities.

Inputs: limit, query, category.

get_next_questionsGet the next planning interview questionsA

Phase 2 of the App Factory workflow. Returns the next batch of unanswered planning questions. Present them to the USER (ideally as multiple-choice where options are given), then save each reply with record_answer. When no questions remain the project advances to the design phase. The USER may answer 'skip' or 'use your judgment' - record that verbatim.

Inputs: projectId (required).

get_project_stateGet project stateA

Full state of an App Factory project: phase, interview answers, design choices, work packages, recent audits, and exactly what to do next. Call this whenever unsure how to proceed.

Inputs: projectId (required).

get_work_packageGet a work package specA

Returns the full spec for one work package: instructions, done criteria, relevant interview answers, design choices, and the scaffold template (for the foundation package). Give this spec verbatim to the subagent responsible for the package.

Inputs: packageId (required), projectId (required).

import_appImport an existing app into App FactoryA

Adopt an already-built app as an App Factory project in maintenance mode: analyzes the codebase, creates the project (phase=audit) and journals the baseline. From there the improve/fix loop is: suggest_improvements -> make changes -> test_app -> run_audit -> deploy. All brain/journal/memory tools work on it like any other project.

Inputs: goal (required), appPath (required).

instant_siteInstant website creationA

Shortcut flow for creating a website fast from available data. Skips the deep planning interview: answers are auto-filled from the description and remembered user preferences. Opens the design gallery immediately for the USER to pick a look, then continue with get_design_choices -> generate_blueprint -> build -> run_audit -> deploy as usual. Pass all content the user provided (business info, texts, links, images) in the description.

Inputs: name (required), description (required), workspacePath.

list_projectsList projectsA

List all App Factory projects with their current phase.

Inputs: no named parameters.

log_eventRecord an observation in the project journalA

Write to App Factory's journal (its brain). Use it for things worth remembering mid-build: decisions ('chose Postgres over SQLite because...'), problems ('build fails on Windows paths'), milestones ('frontend package complete'), or notes ('user prefers fewer questions'). Tool calls are journaled automatically - log the reasoning and events between them.

Inputs: kind (required), name (required), detail (required), projectId.

recallRecall memoriesA

Search stored memories. Call with no arguments to list recent memories, or filter by query text, scope, and projectId. Always recall global memories at the start of a new project.

Inputs: query, scope, projectId.

record_answerRecord an interview answerA

Save the USER's answer to a planning interview question. Record the user's actual words; if they said 'skip' or 'you decide', record that so the blueprint marks it as an agent decision.

Inputs: answer (required), projectId (required), questionId (required).

refineSelf-improve: distill lessons from the journalA

The self-improvement loop (inspired by continual-harness agents). Call it in two steps. Step 1 - call WITHOUT lessons: it returns review material (recent errors, open problems, failed audits, repeated tool patterns, existing lessons). Study it and distill what should be done differently next time. Step 2 - call WITH lessons: each lesson must be small, actionable and evidence-backed (cite the journal events that prove it). Lessons are injected into future get_context recaps and work packages, so they actually change behavior. Use scope 'global' for lessons that apply to all future projects (e.g. 'Windows needs taskkill for process trees'), project scope for project-specific ones. Do NOT record duplicates of existing lessons. Good moments to refine: after a failed audit was fixed, after a tricky bug, at project completion.

Inputs: lessons, projectId, deactivateLessonIds.

rememberStore a memoryA

Persist a fact for future sessions. Use scope 'global' for lasting user preferences (favorite styles, fonts, stacks, deploy targets) and scope 'project' for project-specific facts. Global memories personalize every future project.

Inputs: key (required), value (required), scope, projectId.

report_package_doneReport a work package as doneA

Mark a work package complete with a short summary of what was built. When every package is done the project advances to the audit phase.

Inputs: summary (required), packageId (required), projectId (required).

run_auditRun the one-step quality & security auditA

Phase 5 of the App Factory workflow. Runs the full audit pipeline against the app: typecheck, lint, tests, dependency vulnerability scan, secret scan, semgrep static security analysis (if installed) and Lighthouse (if a running app url is provided). Returns a scored report with a concrete fix list. Fix EVERYTHING in fixList and re-run until passed=true (score >= minScore, default 80, with zero critical findings) - only then does the project advance to deploy. Also self-verify the manualChecklist items the tools cannot measure. This tool can also audit any codebase standalone: pass appPath without projectId.

Inputs: appPath (required), url, minScore, projectId.

search_githubSearch GitHub for supporting reposA

Search GitHub for libraries, starter kits, components or reference implementations that can support the app being built (e.g. 'react drag and drop kanban', 'nextjs stripe subscription starter'). Returns repos sorted by stars with license and maintenance signals. Prefer permissive licenses (MIT/Apache-2.0/BSD/ISC) for code you'll incorporate; flag anything GPL to the user before using it. Set GITHUB_TOKEN in the MCP env to raise the rate limit.

Inputs: query (required), limit, language, minStars.

set_design_choiceSet a design choice directlyA

Fallback for when the browser gallery cannot be used (e.g. headless environment) or the USER stated their preference in chat. Sets one design category choice directly. Valid choiceIds: uiStyle: clean-minimal | bold-vibrant | dark-professional | soft-organic | paper-workspace | player-dark | purple-glass | fintech-gradient | travel-coral | chat-blurple | cinema-dark | messenger-fresh | playful-learning | frosted-premium | material-you | fintech-mint. fontPairing: modern-neutral | elegant-editorial | techy-grotesk | friendly-rounded | startup-modern | material-friendly | luxe-editorial | terminal-dev. iconSet: lucide | heroicons-solid | phosphor-light | tabler | phosphor-duotone | material-symbols. animation: none | subtle | smooth | playful. cardStyle (optional): flat | outlined | elevated | glass. background (optional): solid | subtle-gradient | vivid-gradient | aurora. For categories 'colors' or 'layout' pass the value as JSON in customValue instead of choiceId (colors: {"primary":"#hex","gradient":bool,"second":"#hex"}; layout: {"grid":[12,8],"items":[{"type":"Navbar","x":0,"y":0,"w":12,"h":1}]}).

Inputs: category (required), projectId (required), choiceId, customValue.

set_goalSet a persistent goalA

Keep an objective and its success criteria active across sessions until done (inspired by long-running-agent design). Set one at the start of substantial work, e.g. goal: 'Ship the recipe app to Vercel', criteria: 'audit >= 80, deployed URL responds, user confirmed design'. get_context and get_project_state surface active goals, so any future session knows what 'done' means. Update progress with update_goal as work advances.

Inputs: goal (required), projectId (required), successCriteria (required).

start_projectStart a new app projectA

Begin the App Factory workflow for a new app. Provide the user's raw description verbatim. Returns the project id and the first step of the guided workflow (intake -> interview -> design -> blueprint -> build -> audit -> deploy).

Inputs: name (required), description (required), workspacePath.

suggest_improvementsSuggest improvements for the app and its ideaA

Generates improvement suggestions on two levels: the APP (missing capabilities, quality gaps, UX, performance, retention) and the IDEA (positioning, differentiation, monetization). Works with a projectId (uses stored context), an appPath (analyzes the codebase), or both. Present the relevant suggestions to the USER as a menu - never implement them unasked. Treat the returned ideas as a starting point and ADD your own suggestions specific to this app's domain.

Inputs: focus, appPath, projectId.

test_appTest that an app builds, passes tests and runsA

One-step app verification: runs the test suite (if any), the production build (if any), then starts the app and checks it actually responds over HTTP without server errors, and cleanly stops it. Use after building or changing an app. For visual/UX verification, follow up by opening the returned URL with browser tools while running the dev server yourself.

Inputs: appPath (required), url, skipBuild, skipTests, +1 more.

update_goalUpdate goal progress or statusA

Record progress on a goal ('3 of 5 packages built, audit pending') or change its status: 'done' when ALL success criteria are verifiably met, 'paused' if the user shelves it, 'active' to resume. Update progress at meaningful milestones so a fresh session can pick up instantly.

Inputs: goalId (required), status, progress.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 32 tools

    Disambiguation5/5

    Each tool maps to a distinct phase or supporting function (intake, interview, design, blueprint, build, audit, deploy, memory, research). Even similar-sounding tools like get_context and get_project_state have clearly different scopes, so an agent can reliably select the right one.

    Naming Consistency4/5

    The vast majority of tools follow a clear verb_noun pattern (e.g., start_project, get_next_questions, generate_blueprint). A few single-word verbs (deploy, remember, refine) are minor exceptions but remain unambiguous and fit the action-oriented style.

    Tool Count2/5

    At 32 tools, this is a very large surface for an agent to navigate. While each tool has a role in the comprehensive workflow, the sheer number exceeds the typical range and increases selection overhead, making it feel heavy.

    Completeness5/5

    The toolset covers the entire app lifecycle—from initial prompt enhancement and interview, through design and blueprint generation, to build, audit, and deployment—plus supporting utilities for memory, context, research, and legal compliance. No obvious dead ends or major gaps exist.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      An intelligent orchestration server that routes user requests to appropriate specialized MCP servers and manages complex workflows.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that enables AI agents to run a deterministic orchestration loop with decomposition, subagent execution, and review feedback across multiple LLM backends.
      61
      MIT