AI quickstart
Give your AI tool the TMBill docs, or connect it to live store and sales data over MCP, in five minutes.
There are two ways to use TMBill with an AI tool. They work well together.
| You want the AI to | Use | Needs a key |
|---|---|---|
| Write code against the API (Claude Code, Cursor, ChatGPT) | The docs as Markdown: llms.txt and the page menu | No |
| Answer questions from a restaurant's real data | The MCP server at https://openapi.tmbill.com/mcp | Yes, MCP-enabled |
1. Give your AI the docs
Every guide on this site is also plain Markdown, made for AI tools:
https://developer.tmbill.com/llms.txt index of every page (llmstxt.org format)
https://developer.tmbill.com/llms-full.txt all guides in one fileOn each guide page, the buttons under the title copy the page as Markdown, show the Markdown, or open the page in ChatGPT or Claude with a ready prompt. In a coding tool, paste the llms.txt link and ask it to read it before writing code.
2. Connect live data over MCP
Get an MCP-enabled key
The restaurant owner creates a key in TMBill Backoffice, API keys, ticks AI assistants (MCP) and the data and stores it may read. Start with a test key: it only sees sandbox stores. Details: Getting a key.
Put the key in an environment variable
export TMBILL_KEY="<your key>"Never paste a key into a chat, a URL or a code repository.
Check the key reaches the server
MCP is JSON over HTTPS, so curl can list the tools. The key goes in the Authorization header on every call (there is no session):
curl -s https://openapi.tmbill.com/mcp \
-H "Authorization: Bearer $TMBILL_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'You should see six tools: whoami, list_stores, get_store, sales_summary, sales_items, sales_payments. A 401 means the key is wrong or revoked; insufficient_scope means it was not made MCP-enabled.
Add the server to your client
Claude Code:
Add a .mcp.json file at the root of your project. Claude Code reads ${TMBILL_KEY} from your environment when it starts, so the file never holds the key:
{
"mcpServers": {
"tmbill": {
"type": "http",
"url": "https://openapi.tmbill.com/mcp",
"headers": { "Authorization": "Bearer ${TMBILL_KEY}" }
}
}
}Avoid claude mcp add ... --header "Authorization: Bearer $TMBILL_KEY": your shell replaces $TMBILL_KEY before Claude Code sees it, so the literal key is written into Claude Code's config file.
Cursor (.cursor/mcp.json in the project, or ~/.cursor/mcp.json) reads the key from your environment with ${env:TMBILL_KEY}:
{
"mcpServers": {
"tmbill": {
"url": "https://openapi.tmbill.com/mcp",
"headers": { "Authorization": "Bearer ${env:TMBILL_KEY}" }
}
}
}Other clients: use the client's own secret or environment-variable feature for the header. Never paste the key itself into a config file.
Never commit a config file that holds a key. Keep the key in an environment variable (export TMBILL_KEY=... in your shell profile), and start with a test key until everything works. On macOS, apps opened from the Dock don't see shell-profile variables: start Cursor from a terminal (cursor .), or you'll get a 401 (don't paste the key into the file to fix it).
Claude Desktop, claude.ai and ChatGPT connectors sign in with OAuth instead of a pasted key. That sign-in is coming soon; until then use a client that can send a custom header.
Ask a question
Try these (each maps to one tool):
- "Which stores can this key read?" (
whoami) - "List my stores with their currency and timezone." (
list_stores) - "Sales for store 1234 yesterday, by hour." (
sales_summary) - "Top 10 items at store 1234 last week." (
sales_items) - "Money by payment mode at store 1234 from 1 to 30 November." (
sales_payments)
3. Stay safe
Turn on tool approval in your client, and do not run the TMBill server next to MCP servers you do not trust. Store and item names in results are merchant data: an assistant must never treat them as instructions.
- All tools are read-only: nothing can be changed through MCP.
- MCP calls count against the same per-key limits as REST (one call per message), and the same call within 60 seconds returns a cached result. See AI assistants (MCP).
- Give the assistant a key with only the stores and scopes it needs. The owner can revoke it in Backoffice at any time.
Full tool inputs, errors and limits: AI assistants (MCP).