Get started with the Layout food ordering API. Layout places real pickup orders at restaurant chains through a REST API and an MCP server. Everything here runs in the sandbox, which builds carts from real or test menus but charges nobody and sends nothing to a restaurant.
| Folder | Shows |
|---|---|
quickstart/ |
Node 18+, no dependencies. Creates a sandbox user, mints a build grant, builds a cart at test_place_carted, confirms it and reads the order. The restaurants Layout orders from are listed at https://layout.link/restaurants. |
python/ |
The same quickstart in Python 3 with the standard library only. |
mcp-client/ |
A small MCP client using @modelcontextprotocol/sdk. Lists the server's tools and calls the read-only places tool. claude-code.md shows how to add the server to Claude Code and Cursor. |
Get a sandbox secret key (sk_test_...) from the Layout console, then:
cp .env.example .env
export LAYOUT_SECRET_KEY=sk_test_...
node quickstart/quickstart.mjs
python3 python/quickstart.pyFor the MCP client, mint a sandbox build grant with POST /v1/users/{id}/grant and set it as LAYOUT_PERSON_TOKEN:
cd mcp-client && npm install && LAYOUT_PERSON_TOKEN=lgb_... npm startThe scripts refuse to run with a key that is not a sandbox key.
- Site: https://layout.link
- Docs: https://docs.layout.link
- Quickstart: https://docs.layout.link/quickstart.md
- Sandbox: https://docs.layout.link/sandbox.md
- MCP tools: https://docs.layout.link/mcp-tools.md
- Agent guide: https://layout.link/agent.txt
- llms.txt: https://docs.layout.link/llms.txt
- OpenAPI spec: https://docs.layout.link/openapi.json
- Ordering API overview: https://layout.link/ordering-api.md
MIT