| name | scaffold-project |
| description | Scaffold a new fullstack project using scaffold-mcp. Use when the user wants to create a new Strapi+React project or start building a fullstack application. |
Project Initialization
Use scaffold-mcp to scaffold a fullstack monorepo from a template.
When to Use
- User asks to "create a new project", "scaffold a fullstack app", "start a new Strapi project"
- User is starting a new feature and no project exists yet
- Before any backend-schema or frontend-page work
Prerequisites
- Node.js >= 18
- npm >= 9
- GitNexus CLI (
npx gitnexus) — for initial indexing
Process
Step 1: Check available templates
Call scaffold-mcp scaffold_list to show the user what templates are available.
Step 2: Choose template
Ask the user which template to use (from scaffold_list output).
Step 3: Scaffold
Call scaffold-mcp scaffold_init with template and cwd (the current working directory).
The tool creates the directory structure and returns a steps array. You must execute each step in order using the appropriate tool, using the params from each step:
./
├── package.json (workspaces: backend, frontend)
├── backend/ (Strapi app)
│ └── .env.local
└── frontend/ (React + Vite + shadcn)
└── src/
For each step returned, call the specified tool with the given params.
User-input steps: When a step's params contain placeholder values like <TOKEN_FROM_USER> or <FROM_REGISTER_ADMIN>, you must resolve them before calling the tool:
<FROM_REGISTER_ADMIN> — use the adminEmail, adminPassword, strapiUrl returned by the previous strapi_register_admin step
<TOKEN_FROM_USER> — prompt the user to provide the value
For the scaffold_write_env step specifically:
- Take
STRAPI_BASE_URL, STRAPI_ADMIN_EMAIL, STRAPI_ADMIN_PASSWORD from the strapi_register_admin response
- Tell the user: "请在浏览器中访问 http://localhost:1337/admin,进入 Settings → API Tokens → Create new API Token,选择 Full access 权限,复制生成的 token。"
- Wait for the user to submit the token
- Call
scaffold_write_env with all four values filled in
Step 4: Verify
After scaffolding completes:
- Start the Strapi dev server:
cd backend && npm run develop
- Verify admin panel loads at
http://localhost:1337/admin
- Start the frontend dev server:
cd frontend && npm run dev
- Verify React app loads at
http://localhost:5173
- Check shadcn is initialized:
ls frontend/src/components/ui/
Step 5: Create checkpoint
git add -A
git commit -m "checkpoint:scaffold"
File Protection
All files under backend/ and frontend/src/components/ui/ are MCP-managed. The Agent must not edit them directly. Changes to these paths must go through the corresponding MCP.
GitNexus
After scaffold, npx gitnexus analyze runs automatically. Ensure the index is created successfully. If it fails, the skill warns but does not block — the project can still be used without GitNexus.