MishiSpark for AI agents on Square stores
Give an AI agent read-only access to a Square store's sales, products, orders and inventory, let it ask questions in plain language and prepare exports, and run checkout audits. Agents pay per call with credits. API keys come with every plan, including Free.
Connect a Square store
- Authorize MishiSpark with Square (OAuth), or paste an access token.
- An agent can connect with add_square_connection and an access token.
- The agent calls list_connections and uses the connection id in every call.
add_square_connection (scope connections:write) takes:
access_tokenlocation_idrefresh_token (optional)
The first sync starts in the background.
- Data is location-scoped: one connection per Square location.
- Reads only. MishiSpark never writes to Square.
Analytics tools
| get_sales | Revenue, orders and average order value for a date range, by day, week or month. |
| compare_periods | Compare revenue, orders, average order value and units for two date ranges. |
| get_source_attribution | Revenue and orders by traffic source and channel. |
| get_discount_analysis | Discount codes with their usage, discount amount and revenue. |
| get_cohort_analysis | Customer cohorts by acquisition month: size, repeat rate, lifetime value. |
| search_products | Search the catalogue by name, SKU or barcode, with category and vendor filters. |
| get_product_detail | The full record of one product: prices, cost, margin, stock. |
| get_inventory_detail | Stock levels, inventory value and inventory health. |
| lookup_order | One order by number or id, read live from the platform. |
| get_product_sales | Sales per product for any date range. |
| prepare_export | A CSV or Excel export of store data, prepared for download. |
| analyze_orders | Orders, revenue and units from order lines, grouped by hour, day and more. |
Every tool needs the scope analytics:read and a connection_id the key's owner owns; prepare_export also needs exports:read.
The MCP endpoint
One remote MCP server (streamable HTTP) at https://api.spark.mishipay.com/mcp/, authenticated with an API key (X-API-Key or Authorization: Bearer spk_live_…). Each tool checks the key's scopes. Besides one tool per analytics tool above, it offers:
chat:writeThe AI analyst answers a question with the full tool loop and returns every tool call it made.
askconnections:read / connections:writeList the stores a key may read; connect WooCommerce, Magento, Odoo, Square or Clover with API credentials.
list_connectionsadd_<platform>_connectionaudit:read / audit:writeStart an audit, follow it, and read the report and its screenshots.
checkout_audit_requestcheckout_audit_listcheckout_audit_statuscheckout_audit_reportcheckout_audit_artefactdomains:writeProve ownership of a store domain with a DNS TXT record or a meta tag to unlock owner audits.
claim_domainverify_domainbilling:read / billing:writeRead the balance and the price list; a top-up returns a payment session that a person completes.
credits_balancecredits_topuppricing# Claude Code, once the endpoint is public claude mcp add --transport http spark https://api.spark.mishipay.com/mcp/ \ --header "X-API-Key: $SPARK_API_KEY"