Skip to content
Get API key

AI assistants

Connect Claude or ChatGPT with MCP

Sansflow runs an MCP server, so an AI assistant can read one business's sales, tables, staff and stock and answer questions about them. You create a personal token, paste one URL into the assistant, and ask.

See what MCP can do for an owner, with example questions. This page is the setup.

What it is

  • One URL per token: https://pos.sansflow.com/api/mcp/<your-token>. The token sits in the path because Claude and ChatGPT connectors cannot send a header.
  • Acts as you: every tool runs with the rights of the person who created the token, inside the database. If that person leaves the business, the token stops working.
  • Read-only by default: write tools exist only on tokens created with write access, and the server tells the assistant to confirm each write with you first.
  • Guest data is opt-in: names, phone numbers and emails of guests come only from tokens with guest data access, which only an owner can grant.

Create a token

  1. Open AI tokens In Sansflow, open Developers → AI tokens (MCP) and create a token.
  2. Choose its reach Name it. Pick when it expires (never, 30 days, 90 days or a date). Limit it to some outlets, or leave it on all. Reading analytics is always on; tick Write operations or Guest data only if you need them.
  3. Copy the URL The token starts with sfmcp_ and is shown once, inside the full MCP URL. Treat the URL like a password.

You can revoke a token at any time from the same tab; the assistant loses access on its next call.

Connect Claude

  1. Add a custom connector In Claude, open Settings → Connectors → Add custom connector.
  2. Name and URL Name it Sansflow POS and paste your MCP URL as the server URL. Leave authentication empty: the token is in the URL.
  3. Turn it on in a chat Enable the connector in the chat composer and ask, for example, "What were yesterday's sales by payment method?"

Claude Desktop can also read it from claude_desktop_config.json:

claude_desktop_config.json
{
  "mcpServers": {
    "sansflow": {
      "type": "streamable-http",
      "url": "https://pos.sansflow.com/api/mcp/<your-token>"
    }
  }
}

Connect ChatGPT

  1. Turn on developer mode In ChatGPT, open Settings → Connectors → Advanced and enable developer mode.
  2. Add the server In a chat, choose + → Add sources → Connect more, and paste your MCP URL. No auth header: the token is in the URL.
  3. Use it Save, then attach the Sansflow connector to a new chat.

Other clients

Config
{
  "mcpServers": {
    "sansflow": { "url": "https://pos.sansflow.com/api/mcp/<your-token>" }
  }
}

Tools

Dates are YYYY-MM-DD in the business's timezone, inclusive, at most 400 days apart. Money is whole rupiah: 45000 means Rp 45.000. List tools return at most 100 rows a call, newest first, with a next_cursor for the next page.

Read (every token)

list_locationsThe outlets this token may read.
get_sales_summarySales totals for a date range: gross, refunds, net, discounts, tax, fees, orders, average ticket.
get_sales_trendSales per day, or per hour for ranges up to 7 days.
get_sales_breakdownSales grouped by product, category, payment method, sale type, order source, cashier, outlet or customer.
get_location_performancePer-outlet sales, cost of goods, labour and expenses.
get_table_analyticsTable turns, occupancy and revenue per table, zone, hour and server (up to 92 days).
get_staff_laborHours worked and labour cost per employee.
get_inventory_variance_summaryTheoretical against actual cost of goods, waste, staff meals and count coverage.
get_kitchen_prep_statsKitchen preparation times (median, trimmed mean, p90) by station, product or daypart.
list_orders · get_orderOrders, newest first, and one order in full with items and payments.
list_reservationsReservations by reserved time.
list_open_billsBills open right now: table, party size, total, cashier.
list_invoicesInvoices with status, totals, balance and due date.
list_productsThe catalogue: price, cost, category, stock, availability.
list_shiftsCashier shifts with opening and closing cash (cash figures need the right permission).
list_staffThe staff roster: name, role, status, dates. No contact or HR data.
list_refund_requestsRefund requests and their status.
list_audit_logWho did what, when.

Guest data (tokens with guest data access)

list_customers · get_customerGuests with contact details, loyalty points and tier; one guest with lifetime spend and recent orders.

Write (tokens with write access, confirmed with you first)

create_ticketOpen an internal ticket for the team.
post_platform_messageSend a bug report or feature request to the Sansflow team.
approve_refund_requestApprove a pending refund request (needs the refund approval permission).

Limits and errors

  • 60 calls a minute per token; a write counts as two. Over it, the tool answers rate_limited with retry_after_seconds.
  • A question that runs too long answers timeout: ask again with a shorter range or one outlet.
  • Tool errors carry structuredContent.error.reason, such as missing_scope, location_required or forbidden.
Connection errorJSON-RPC codeMeaning
invalid-32001The token is not recognised.
revoked-32003The token was revoked.
expired-32004The token passed its expiry date.
not_a_member-32006The person who created it left the business.
payment_required-32007The business's plan does not include AI integrations (HTTP 402).
unavailable-32603Sansflow could not be reached. Try again in a minute.

Questions

Which AI assistants can connect to Sansflow?

Any client that speaks MCP over Streamable HTTP: Claude (web and desktop), ChatGPT with developer mode connectors, Cursor, Codex CLI, Windsurf and others. Each connects with the same token URL.

Can the assistant change anything in Sansflow?

Only if the token was created with write access. Then it can open a ticket, send feedback to Sansflow or approve a pending refund, it must confirm with you first, and it can never do more than the person who created the token.

Which plan do I need for MCP?

Connecting AI assistants via MCP is part of Sansflow Premium.

Stuck? Quote the request_id from the response and write toSansflow support.Checked against API v1 on .