Docs
Build with AI

Build with an AI coding agent.

Give your agent three things: a connection to your workspace that you approve, the docs in a format it reads well, and a rules file that teaches it the SDKs. It writes the code; you decide what it may touch.


1

Connect the MCP server

The MCP server turns your workspace's API into tools an agent can call: look up why an email bounced, approve waitlist entries, check a feature flag, start a web extraction.

terminal
claude mcp add --transport http productcraft 'https://mcp.productcraft.co/mcp'

# then, inside Claude Code:
/mcp        # pick "productcraft" and follow the browser prompt

There is no key in any of these. The client opens a browser, you sign in to ProductCraft, and you approve what the connection may do (step 4 below). Claude Desktop and VS Code connect the same way; see the MCP server docs for those, the rate limits and the full list of what an agent can never do without you ticking it.


2

Point the agent at the docs

Every docs page is also plain Markdown, which an agent reads without the page's navigation, styling and scripts.

AddressWhat it is
/llms.txtThe index: every guide per product with a one-line summary, and the OpenAPI document of every API. It follows the llms.txt convention.
/llms-full.txtEvery guide in one file, for tools that load all the docs at once.
/docs/<page>.mdAny docs page as Markdown: add .md to the address, for example /docs/mail/getting-started.md.
Accept: text/markdownThe same Markdown from the normal address, for agents that ask for it.
terminal
curl https://productcraft.co/llms.txt
curl https://productcraft.co/docs/auth/getting-started.md
curl -H 'Accept: text/markdown' https://productcraft.co/docs/auth/getting-started

The Markdown is made from the same pages you are reading, each time the site is deployed, so the two never disagree.


3

Add a rules file

A rules file is the note a coding agent reads before it starts. Ours tells it how our SDKs work and lists every method they have, so it does not guess at ones that don't exist.

Products
Save as
AGENTS.md
curl -fsS \
  'https://productcraft.co/docs/ai/rules?format=agents' \
  >> AGENTS.md

Or open the file and paste it in yourself.

Each file is built from the README and the method list of the SDK versions on npm today, and our tests check every method it names against the published package. It also sets the habits we want in every integration: keys stay on the server, webhooks are verified on the raw body, retries reuse an idempotency key, and test emails go to a simulator address instead of a real inbox.

Claude Code reads CLAUDE.md, Codex and many other agents read AGENTS.md, and Cursor reads .cursor/rules/*.mdc (it also reads AGENTS.md). The command adds our rules to the end of an existing file, so nothing you already have is overwritten.


4

Give the agent only the access it needs

An agent works with an account or a key that a person set up and can take back. Every call it makes is in the audit log.

An agent in your editor

  • You approve the MCP connection in the browser: one workspace, the products it may use, and a starting preset such as read-only.
  • It can never do more than you can, and losing a permission takes it from the agent at its next call.
  • Creating keys, editing roles, inviting people and emailing outside your domains are never in a preset. You tick each one yourself.
  • The audit log records you as the actor and marks the row as made by an AI client, with the tool and the outcome.
  • Disconnect it from Connected apps in the console; it stops at its next call.

An agent in a pipeline

  • A person creates a workspace API key in the console and binds it to a policy that lists exactly what it may do. A key can never create another key.
  • Nobody can give a key more than they hold themselves.
  • The key is shown once; ProductCraft stores only its hash.
  • platform.apiKeys.self() tells the job which workspace and permissions it has, so a wrong key fails on the first line.
  • Rotate or revoke it from the console at any time.

Step by step: workspace API keys for CI and members, roles and policies. Building an app whose own users connect agents to it? Auth agent access gives your users the same approve-in-the-browser flow.