Skip to content

Build with an AI agent

View .mdllms.txt

mongrl is built to be built on by coding agents. Everything an agent needs is machine-readable, in one place, and kept in sync with the API by the build.

The quickest: the docs MCP server. It’s public, with nothing to sign in to, and your agent searches the guides and looks up any API operation with its types:

Terminal window
claude mcp add --transport http mongrl-docs https://api.mongrl.com/mcp/docs

For Cursor, VS Code and other clients, add https://api.mongrl.com/mcp/docs as a remote MCP server (Streamable HTTP). Its tools are search_docs, read_doc, list_docs, list_operations and get_operation, and a build_storefront_page prompt plans a page against the real API.

The same material as files:

Resource Use it for
/llms.txt The entry point: what mongrl is, the rules, and links to every page as Markdown.
/llms-full.txt Every guide and the full API reference in one file, for agents with a big context.
/llms-small.txt The same, trimmed, for smaller contexts.
/openapi.json The public API spec. Generate the client from it.
/AGENTS.md Rules to keep in the storefront repo, so every session follows them.
Any page + .md One topic as Markdown, e.g. /guides/checkout.md.
Terminal window
curl -o AGENTS.md https://dev.mongrl.com/AGENTS.md
curl -o openapi.json https://dev.mongrl.com/openapi.json

If your agent reads CLAUDE.md rather than AGENTS.md, add a CLAUDE.md that says @AGENTS.md.

Then put the keys in your environment, never in the repo:

Terminal window
MONGRL_API_URL=https://api.staging.mongrl.com
MONGRL_SECRET_KEY=sk_test_…
STRIPE_PUBLISHABLE_KEY=pk_test_… # the marketplace's Stripe account

Your coding agent can also look at the marketplace it’s building for: its real currencies and languages, catalogue terms, shipping sizes and listings. Connect it to mongrl’s MCP server with a console account:

Terminal window
claude mcp add --transport http mongrl https://api.staging.mongrl.com/mcp

This is the console’s MCP server, not the docs one: it needs a console account. Then /mcp in Claude Code to sign in (for Cursor and others, see Run your marketplace from Claude). Now “use our real term kinds and shipping sizes” just works. The MCP server is for looking and for running the marketplace; the storefront’s code still calls the API with its keys.

Read https://dev.mongrl.com/llms.txt and AGENTS.md. We're building the storefront
for our marketplace on mongrl, with <your stack, e.g. TanStack Start / Next.js>.
1. Generate a typed client from openapi.json with @hey-api/openapi-ts.
2. Add a server-only mongrl client (secret key from MONGRL_SECRET_KEY, the
user's session from an HttpOnly cookie as X-User-Session).
3. Build the shop page: search with q, category and brand filters, sort, and
cursor paging, showing display_price in the visitor's currency.
4. Build the listing page from getListing.
Use only endpoints and fields from openapi.json. Show problem `detail`s from
errors to people. Stop and show me the shop page before going further.

Then go area by area, one guide per step, so the agent loads only what it needs:

  1. Accounts: “Follow https://dev.mongrl.com/guides/accounts.md: sign-up, sign-in with password and with emailed links, confirm email, reset password.”
  2. Checkout: “Follow https://dev.mongrl.com/guides/checkout.md and https://dev.mongrl.com/guides/delivery.md.”
  3. Selling: “Follow https://dev.mongrl.com/guides/selling.md and https://dev.mongrl.com/guides/payouts.md.”
  4. Messages and the pages emails link to: “Follow https://dev.mongrl.com/guides/messages.md and https://dev.mongrl.com/guides/storefront-pages.md.”
  • One spec, generated from code. The spec on this site is built from the API’s own code on every release. An agent coding against it codes against what the API does.
  • Types, not guesses. With a generated client, a wrong field or path fails to compile instead of failing in production.
  • Errors that say how to fix them. Validation errors name the field (body.price.amount) and the problem, so an agent can correct its own request.
  • Safe retries. Idempotency keys make a repeated write run once, so an agent (or a flaky network) can’t buy twice.
  • Real data while it builds. Through the MCP server, the agent checks its work against the marketplace’s real settings and listings.
  • Test keys. sk_test_… keys and Stripe test cards let an agent run the whole flow without touching real orders or money.