Run PHP Point of Sale sales reports in ChatGPT

· PHP Point of Sale

You can ask ChatGPT, Claude or Cursor for the sales totals and the best-selling items of your PHP Point of Sale store. The AI runs two of your store's reports, the sales summary and the top sellers, for the dates you give. Add https://php-point-of-sale.usefulapi.io/mcp as an MCP server, then ask in plain words.

Which prompt do I start with?

Show my PHP Point of Sale sales totals and best-selling items for last week.

You can also name a location or a category, ask to compare with the week before, or ask for another report, for example low inventory or profit and loss.

What does the AI do, step by step?

  1. It finds the two reports with phppos_list_reports. It searches for each report separately, for example for summary_sales and for top_sellers, because one search word can miss a report. The reply gives each matching report with the inputs that it accepts. A search gives 10 matches per page by default. If the report is not on the page and the reply gives a next offset, the AI repeats the same search with that offset. If a search reply says that it was shortened, the AI first repeats the search at the same offset with a smaller limit.
  2. It changes "last week" into a start date and an end date. Each report accepts its own inputs. If a report accepts a location or a category and you named one, the AI gets its id with phppos_list_locations or phppos_list_categories. If a report does not accept a filter that you asked for, the AI should tell you.
  3. It runs each report with phppos_run_report. It puts the report inputs in params, with the input names from the report list. Paging is not part of params: the AI sends limit and offset as separate values. For a report with detail rows, one call asks for 25 rows by default and at most 500. If more rows remain, the reply gives a next offset: in its paging part, or at the top level when the report comes back as a list. The AI must then run the report again with the same inputs and that offset. If no total is given, a full page can be followed by an empty page. If a reply says that it was shortened, the AI should ask again for the same offset with a smaller limit, so that it does not skip rows.
  4. If you ask for a comparison, it runs the same reports for the earlier dates with the same filters.
  5. If you ask about one item, it reads the item with phppos_get_item: prices, category, supplier, tags, variations and settings per location. This tool needs the item id. If the report does not give the item id, the AI first searches for the item with phppos_list_items, by its item number or by its name. If more than one item matches, the AI uses the item number that you gave, or asks you which item you mean.
  6. It shows the sales totals from the sales summary and the best-selling items from the top sellers, with the data that PHP Point of Sale gives for those dates. If you asked for a comparison, it shows the two periods side by side. If you asked about an item, it also shows the details of that item.

If your API key is tied to an employee, that employee needs the Reports module and the permission to view each report that the AI runs. To find a location by name, the employee also needs access to locations.

PHP Point of Sale allows 60 API requests per minute for each API key, and this limit includes all integrations that use the same key. The server tells the AI when the limit is reached. Then all integrations that use the key must stop for a full minute after the last rejected request: each rejected request starts the minute again. A separate key for this connection gives it its own limit.

UsefulAPI counts the PHP Point of Sale tool calls toward your monthly plan. If a counted call fails, UsefulAPI tries to give that call back to your plan.

Can it change my sales or stock?

Running a report only reads data. It does not change sales, stock or prices.

The server also has tools that write: phppos_create_customer, phppos_update_customer, phppos_create_item, phppos_update_item and phppos_create_expense. When you connect, you can choose Read only: the server then hides these five tools and refuses them. With Full access, PHP Point of Sale accepts writes only from a Read/Write API key, and only within the employee permissions of the key. No tool on this server deletes data, creates a sale, charges a card or changes stock quantities. The server tells the AI to ask you before it changes store data. Your AI client can also ask you to approve each tool call; this depends on the client and its settings.

The UsefulAPI account tools are separate, and they stay available with Read only. phppos_usage_status shows your usage and plan. phppos_upgrade gives plan options or a payment link; a change from Pro to Pro+ requires confirmation. phppos_cancel_subscription also requires confirmation and ends the subscription at the end of the current period. phppos_request_feature sends us a feature request. These tools do not change PHP Point of Sale data.

What do I need?

A PHP Point of Sale cloud store and an API key. In the POS, go to Store Config → API Settings → Add API Key and choose Read if you only want reports. Copy the key when it is shown, because it is shown only once. On the connection page, paste the key and enter your store name: the part before .phppointofsale.com in your store address.

See the PHP Point of Sale setup steps for ChatGPT, Claude, Cursor and other MCP clients.

Try it

Connect PHP Point of Sale

Add this URL to Claude, ChatGPT, Cursor or any MCP client, then log in. Setup steps, tools and pricing →

https://php-point-of-sale.usefulapi.io/mcp