# Build with AI (/ai)

Every page of these docs is written to be read by people and by the AI tool beside them. Reading the docs needs
no account or key. Connecting a tool to a store needs a Poltura sign-in.

- [Add the MCP server](/ai/install): Add Poltura to Claude, ChatGPT, Cursor, VS Code or Codex and run a first prompt.
- [AI rules](/ai/rules): AGENTS.md and a Cursor rule with the conventions for Poltura code.


## Ask about a page [#ask-about-a-page]

Every page has a **Copy page** button under its title. Its menu also opens the page in ChatGPT, Claude or
Cursor with a prompt that points the tool at the page's Markdown address, so the answer is grounded in the
current text rather than in what the model remembers.

## Markdown for every page [#markdown-for-every-page]

| You want | Ask for |
| --- | --- |
| One page as Markdown | Add `.md` to its address: `/apps/manifest.md` |
| The same, from a tool that sends headers | `Accept: text/markdown` on the normal address |
| An index of every page, one line each | [`/llms.txt`](/llms.txt) |
| The whole site in one file | [`/llms-full.txt`](/llms-full.txt) |

Every HTML page also names its Markdown twin in a `<link rel="alternate" type="text/markdown">` tag.

```bash
curl -H "Accept: text/markdown" -L https://developers.poltura.com/apps/manifest
```

## Rules files [#rules-files]

The [AI rules](/ai/rules) page holds the conventions an agent needs before it writes Poltura code: which
packages are public, how workers and sections are written, how tokens and money are handled. The same text
ships as two files:

```bash
curl -o AGENTS.md https://developers.poltura.com/ai/rules/AGENTS.md
mkdir -p .cursor/rules
curl -o .cursor/rules/poltura.mdc https://developers.poltura.com/ai/rules/poltura.mdc
```

- **Codex, Cursor and other tools that read `AGENTS.md`**: put `AGENTS.md` in the project root.
- **Cursor project rules**: `.cursor/rules/poltura.mdc` applies to the app's and theme's source files.
- **Claude Code** reads `CLAUDE.md`: add the line `@AGENTS.md` to it, or save the file as `CLAUDE.md`.

## Prompts [#prompts]

The tutorials start with a prompt you can copy into your tool, or open in it directly. Each prompt names the
tutorial's Markdown address and the rules file, so the tool follows the same steps you would:

- [Build your first app](/apps/build-your-first-app)
- [Build a theme section](/themes/build-a-section)
- [Make your first API call](/api/app/first-call)

## MCP [#mcp]

Poltura's MCP server lets an AI client look things up and make changes in a store, inside the permissions the
merchant grants. For a connected AI tool, anything that costs money or cannot be undone waits for a person to approve it.

- [MCP server](/ai/mcp): what it offers, and the two modes.
- [Add the MCP server](/ai/install): one-click install, one command per client, sign-in and a first prompt.
- [Connect an AI tool](/ai/connect): the two modes, OAuth in detail and API tokens.
- [How agents act on your store](/ai/agents): read and write, approval, idempotency, dry runs, errors and limits.
- [Tool reference](/ai/reference): every toolset, record type and action.
- [API tokens](/api/tokens): scripts and CI, and how a token differs from a connected agent.
- [Store commands](/ai/store-cli): the same actions from a terminal.
