Docs
Affinsy in Claude
Connect Claude to your store in Affinsy and ask in plain words what sells together, which customers are slipping away and which test to run next. Claude answers from your own analyses, runs a new one when a question needs it, and changes something only after you agree.
What you can do with it
The connector gives Claude a set of tools over your store in Affinsy. Each tool reads one thing or does one thing, and Claude picks the ones your question needs.
- Read your analyses. Products bought together, pairs to keep apart, each product’s role, customer segments, who comes back after a first order, and what changed between two runs.
- Run a new analysis. A market basket analysis or customer segments, over a date window or with conditions, with the standard segments or your own.
- Set up a test. The customers likely to buy one product, with a holdout that gets nothing. Then tag them in Shopify and read who bought.
Before you connect
- A Shopify store with an active Affinsy subscription.
- A login on www.affinsy.com with access to that store. Claude signs in there. It can be a merchant’s login or the login of an agency that works on the store.
- Orders in Affinsy. After you install the app, the order history loads on its own.
Good to know
Installed Affinsy from the Shopify App Store? Inside the Shopify admin nobody types a login, so make one for the web first: open Affinsy in your admin, go to Team, add your email and accept the invite. Use that email when Claude asks you to sign in.
Connect Claude
- In Affinsy, open Integrations. Under Chat with your data, copy the server URL:
https://www.affinsy.com/api/mcp/mcp - In Claude, on the web or the desktop app, open Settings, then Customize. Under Connectors, click Add custom connector and paste the URL.
- Sign in with your Affinsy login when Claude asks.
- The Authorize Access screen lists what Claude will be able to read and do. If your login has more than one store, pick one under Store. Click Allow.
A connection reaches one store. To work on another store, connect again and pick it.
Other clients
For Claude Code, run this and then /mcp to sign in:
claude mcp add --transport http affinsy https://www.affinsy.com/api/mcp/mcpThe Integrations page has the same steps for Cursor, VS Code and Codex.
What to ask
Ask the way you would ask an analyst. Four questions to start with:
- “Which products are bought together most reliably in my latest basket analysis, and which pairs are substitutes I should not bundle?”
- “Which customer segments are slipping away in my latest segmentation, and which first purchase brings customers back most often?”
- “Which tests should I run next? Preview one for the best product and tell me how many customers it would reach.”
- “How are my saved tests doing? Tell me which ones brought extra buyers and what to do next.”
The connector also brings six ready-made starting points that your client can list: Store health check, Find opportunities, Summarize products, Prepare a test, Review my tests and Weekly review.
What Claude can read and do
Tools that read
get_data_status- The orders in Affinsy: how many, how many customers, and when the last ones arrived.
list_reportsget_report- Your analyses, and one analysis in short: its main figures, the revenue outlook and, for customer segments, each segment.
list_report_rulesget_rule_detail- The rules of a market basket analysis, strongest first, and one rule in full.
list_substitutes- Pairs of products that customers treat as alternatives, to keep out of bundles.
list_product_roleslookup_product- Each product’s role in the store, and one product’s own figures: orders, buyers, revenue.
get_cohort_retentionget_first_product_retention- Who keeps ordering, by the month of a customer’s first order and by the product they bought first.
compare_runs- What changed between two runs of the same analysis.
list_segmentations- Your own segment definitions.
propose_tests- Up to three products most worth a test, each with the rule it rests on, the customers to reach and the reason.
list_audiencesget_audience- Your saved tests, and one test’s result.
Tools that change something
create_report- Starts a new market basket analysis or customer segments. It is usually ready in 30 to 120 seconds.
save_segmentationdelete_segmentation- Saves or deletes one of your own segment definitions. Analyses that used a deleted one keep their results.
create_test- Saves a test, after a preview and your yes.
tag_in_shopify- Adds a tag to a test’s customers in your Shopify store, after a preview and your yes.
Saving a test and tagging
Saving a test and tagging customers both take two steps: a preview that writes nothing, then the write once you agree.
- Saving a test
- The preview shows how many customers are on the list, the rules it comes from and the ones left out, the substitutes whose buyers are left out, the proposed holdout and a suggested length. Nothing is stored until you agree. A saved test has no fixed end: it is counted until you click Finish on its page in Affinsy, 60 days at most.
- Tagging in Shopify
- The preview says how many customers get which tag in which store. After you agree, the test group gets its tag; the holdout gets a tag of its own only if you ask for it. Tags are only added, so a customer’s other tags and details stay as they are.
Ask how a test is doing and Claude reads it the way its page shows it: the status or the verdict, both groups’ figures and the extra buyers above the holdout. How a result is counted.
What Claude does not get
- No customer names, emails or addresses. The tools return product names, figures and counts, never a list of customers.
- No import, schedule, export or email. Claude cannot load data, schedule an analysis, export customers or send anything.
- No more of your conversation than a tool needs. Affinsy receives what Claude passes to a tool, and keeps a record of which tool ran and how long it took.
The Privacy Policy covers the connector under AI Features and Connected Assistants.
When something goes wrong
- “No store on this login yet”
- The login you signed in with has no store. Open Affinsy from Apps in your Shopify admin, add this email on its Team page, then sign in with it and connect again.
- “Chat with your data needs an active plan”
- The store’s plan is not active, so the connection cannot be made. Reactivate the plan, then connect again from Claude.
- “Your Affinsy plan is inactive, so these tools are paused”
- The plan lapsed after you connected. The connection stays, and the tools answer again once the plan is active.
- Claude cannot reach the server
- Check the address. It is
https://www.affinsy.com/api/mcp/mcp, with www. - A new analysis is not ready
- It usually takes 30 to 120 seconds. Ask Claude to check again.
- Claude says there is no data or no analysis
- The connected store has no orders in Affinsy yet, or no finished analysis. Open the store in Affinsy and look at its data first.
- Tagging is refused for a missing permission
- Affinsy asks for permission to tag customers the first time you tag. Claude passes on a link to grant it in Shopify. After that, tag from the test’s page in Affinsy.
- Claude answers about the wrong store
- A connection reaches one store. Connect again and pick the other one under Store.
Disconnect
In Affinsy, open Integrations. Under Connected apps, click Revoke next to the connection.
Still stuck? Write to hello@affinsy.com.