Four sources of context for the AI
Method 1: Ready template + Claude Code / Cursor (recommended)
1
Create the template
AGENTS.md, CLAUDE.md and .mcp.json; no extra setup is needed.2
Start the assistant in the project folder
AGENTS.md automatically and connects the MCP server from .mcp.json (it may ask for approval the first time).3
Run the dev server
Watch the result live with
npm run dev.4
Write your request
Use one of the sample prompts below.
Sample prompts
Changing the design
Changing the design
“Turn the whole site into a dark purple/neon gaming theme. Redesign the hero section on the home page and make product cards image-focused. Keep data and functionality the same.”
A new page
A new page
“Add a new /ranking page that shows the leaderboards. First check the site config and confirm the leaderboards module is on; if not, return 404.”
Customizing the store
Customizing the store
“On the store home page, move categories to a left sidebar and show the discount rate as a badge on product cards.”
Debugging
Debugging
“After logging in, the account page returns EMAIL_NOT_VERIFIED. Why? Add the right redirect.”
Method 2: An existing or empty project
If you do not use the template, give the assistant:- Add the MCP server:
claude mcp add leaderos -e LEADEROS_URL=... -e LEADEROS_PUBLIC_KEY=... -- npx -y @leaderos/headless-mcp - Point it to the API reference in your first message:
“Read this reference: https://your-site.com/headless/llms-full.txt. We will build a Next.js store with this API. Use @leaderos/headless-sdk.”
Method 3: Chat tools (ChatGPT, Claude.ai, Gemini)
If you cannot use MCP, paste the content ofllms-full.txt into the chat or upload the file, then describe the page you want. This is enough for small components and single pages; for managing a whole project, Method 1 is far more efficient.
What does AGENTS.md say?
The template’s AGENTS.md holds the rules the AI must follow, for example:
- Branch on error codes (
error.code), not messages. - Use
requireAuth()on every page that needs a login. - Do not show a feature whose module is off (
isModuleActive/useModule). - Never keep the token in client state or
localStorage. - Show the
*Formattedfields for money values. - Never remove or hide the
<PoweredBy />component.
Tips for good results
Security warnings
LEADEROS_ALLOW_WRITE=1in MCP should only be used on a test site.- Do not give the AI your admin panel passwords or database credentials; the public key is all the Headless API needs.
- Review generated code before going live, especially form submissions and payment flows.
