Connect your store to an AI assistant
Stashq speaks the Model Context Protocol, so an assistant like Claude or Cursor can work on your store directly — read your catalogue, your sales and your earnings, draft a product, restyle your storefront, or answer a buyer’s refund request. Ask it how last month went, or hand it the whole job.
How much it can do is your choice, per key: look but do not touch, prepare changes for you to review, or everything you can do — which includes refunding a buyer. Start with the first one; you can always make another key.
The fast way
Copy this and paste it into your assistant. It will read the setup guide, write its own config, and ask you for a token — including how to create one.
Paste it into your assistant. It reads this guide, writes its own config, and asks you for a token — including how to create one.
Prefer to do it yourself? Set it up by hand — pick your client and paste one block.
Create a token
A token is how Stashq knows the assistant is acting for you. It is a password: treat it like one.
Open Access tokens in your Stashq settings
Settings → Access tokens, or go straight there:
Access tokensName it, then choose how much it can do
The name is so you can tell your keys apart later — “Claude on my laptop” is a good name. Then one choice, and it is the only one that matters:
- Read onlyLook at everything, change nothing.
- Your store, products, offers and store design
- Sales, buyers, reviews and refund conversations
- Earnings, payouts and storage usage
- Read and draftPrepare changes for you to review. Nothing goes live.
- Everything Read only can do
- Create and edit products as drafts
- Create and edit offers as drafts
- Edit your store design as a draft — you still press Publish
- Full accessEverything you can do in the dashboard, including refunding money.
- Everything Read and draft can do
- Publish, unpublish and archive products
- Activate and pause offers
- Publish your store design
- Reply to buyers, and approve or decline refunds — this moves real money
Start with Read only. You can create a second token with more permission the moment an assistant actually needs it, and revoke this one — that costs nothing, and a key that can only look at your store is a key you never have to think about again.
Copy it before you close the dialog
Stashq stores a hash of your token, not the token, so it is shown once and can never be shown again. If you lose it, revoke it and create another — that costs nothing.
Set it up by hand
Every client needs the same two facts — the endpoint, and a bearer token in the Authorization header. What differs is the file and the field names, so pick yours below.
- Endpoint
- https://www.stashq.in/api/mcp
- Transport
- Streamable HTTP (POST)
Run this
claude mcp add --transport http stashq https://www.stashq.in/api/mcp \
--header "Authorization: Bearer sq_live_YOUR_TOKEN_HERE"Or paste this into your config
{
"mcpServers": {
"stashq": {
"type": "http",
"url": "https://www.stashq.in/api/mcp",
"headers": {
"Authorization": "Bearer sq_live_YOUR_TOKEN_HERE"
}
}
}
}Also read from ~/.claude.json.
What an assistant can do
Every tool needs a matching permission, so the level you chose decides which ones exist at all. A tool your token does not cover is not offered to the assistant — it does not fail when called, it is simply not there.
Read only — 12 tools
| Tool | Needs | What it does |
|---|---|---|
| list_products | store.read | Your catalogue, newest first.store.read |
| get_product | store.read | One product by its id — including a draft only you can see, with its description, categories, licence terms and file names.store.read |
| get_storage_usage | store.read | How much of your storage allowance is in use.store.read |
| list_offers | store.read | Your discounts and coupon codes.store.read |
| get_store | store.read | Your store profile and its full design document, plus whether you have an unpublished draft.store.read |
| list_sales | sales.read | What sold, what the buyer paid, and what you keep.sales.read |
| get_buyer | sales.read | One buyer: what they bought, refunded, and whether they collected it.sales.read |
| list_reviews | sales.read | The reviews on one of your products, with their status.sales.read |
| list_refund_requests | sales.read | Refund cases buyers have opened, and what state each is in.sales.read |
| get_refund_request | sales.read | One refund case in full: the conversation, and this buyer’s history with you.sales.read |
| get_earnings | payouts.read | Available, pending, held and already paid out.payouts.read |
| list_earnings_ledger | payouts.read | Per-sale earnings: fees, when it clears, when it was paid out.payouts.read |
Read and draft adds 6
| Tool | Needs | What it does |
|---|---|---|
| create_product | products.write | Create a product as a draft. It cannot publish one.products.write |
| update_product | products.write | Edit a product. Only the fields you pass change, and this never publishes or unpublishes.products.write |
| create_offer | offers.write | Create a discount or coupon as a draft. It takes nothing off until it is activated.offers.write |
| update_offer | offers.write | Change an offer’s usage limit or end date.offers.write |
| update_store_design | store.write | Stage a store design change. Nothing shoppers see changes until you publish.store.write |
| discard_store_draft | store.write | Throw away staged design changes and return to the published design.store.write |
Full access adds 8
| Tool | Needs | What it does |
|---|---|---|
| publish_product | products.publish | Make a draft live. Needs a finished delivery file and a verified payout account; queues itself if the upload is still running.products.publish |
| unpublish_product | products.publish | Take a live product off sale. Existing buyers keep their downloads.products.publish |
| archive_product | products.publish | Archive a product. Not a deletion — restore_product brings it back as a draft.products.publish |
| restore_product | products.publish | Bring an archived product back, as a draft rather than to your storefront.products.publish |
| set_offer_status | offers.publish | Activate or pause an offer. Activating changes what buyers pay.offers.publish |
| publish_store_design | store.publish | Make your staged design live. The first time, this is also what opens your shop to the public.store.publish |
| reply_to_refund_request | refunds.reply | Message a buyer in a refund conversation, under your name. It cannot be unsent.refunds.reply |
| resolve_refund_request | refunds.resolve | Approve or decline a refund. Approving returns real money and revokes the buyer’s access.refunds.resolve |
What full access adds, and why to think before granting it
A full-access token can do everything you can do in Stashq. Some of that spends real money or speaks to a buyer in your name, and none of it can be taken back:
- Approve a refund — real money leaves your balance and the buyer loses access
- Message a buyer in your name, in a refund conversation, and it cannot be unsent
- Publish, unpublish or archive a product, changing what shoppers can buy
- Activate an offer, changing what buyers pay
- Publish your store — the first time, this is what makes your shop public
Every one of those changes is written down before it happens, against the key that made it, and Assistant Activity in your settings shows the list. If Stashq cannot record a change, it refuses to make it.
What no token can ever do
These are not features that are coming. Nothing an assistant does for you needs them, and they are the things you would not be able to undo by revoking a key — so no token, at any level, can:
- Change where your payouts go, or touch your bank details
- Change your plan, buy storage, or cancel a subscription
- Delete anything — a product, a file, a sale, or an offer
- Read or change your account password, email or login
- Open a refund case on a buyer’s behalf, or close one for them
- Upload or replace a delivery file
The permissions behind the levels
A level is a set of these. You do not pick them individually, and you do not need to read this to use the connection — it is here because a token stores the list, and every tool checks its own entry before it touches anything.
| Permission | From | What it allows |
|---|---|---|
| store.read | Read only | Read your store profile, design, products and categoriesRead only |
| sales.read | Read only | Read purchases, buyers, earnings, reviews and refund casesRead only |
| payouts.read | Read only | Read the earnings ledger and payout stateRead only |
| products.write | Read and draft | Create and edit products as draftsRead and draft |
| offers.write | Read and draft | Create and edit offers as draftsRead and draft |
| store.write | Read and draft | Edit your store design as a draftRead and draft |
| products.publish | Full access | Publish, unpublish and archive productsFull access |
| offers.publish | Full access | Activate and pause offersFull access |
| store.publish | Full access | Publish your store designFull access |
| refunds.reply | Full access | Reply to buyers in refund conversationsFull access |
| refunds.resolve | Full access | Approve and decline refundsFull access |
If it does not connect
- Every call fails, and the token looks correct
- Check for a trailing space or newline on the token. Clients use the header exactly as written and most will not trim it, so an invisible newline picked up by hand-selecting the text breaks every request. Use the copy button rather than selecting it.
- The server never appears in your client
- Almost always the missing
"type": "http"— the entry is read as a local command and skipped. - It connects, but a tool says it lacks a permission
- Permissions are fixed when the token is created and cannot be edited afterwards. Create a new token with the permission you need, paste it in, and revoke the old one.
- It worked yesterday and stopped
- Check whether the token was revoked, or reached an expiry date you set. Access tokens shows every key, when it was last used, and whether it is still live.
Keeping a token safe
Anyone holding a token can read whatever you granted it, from anywhere, until you revoke it.
- Put it in your client’s config as a secret. Avoid pasting it into a chat — a credential in a transcript is a credential in a scrollback buffer.
- One token per machine or tool, so revoking one does not break the others.
- Revoke immediately if a device is lost or shared. Revoking takes effect at once, and the record of the key stays so you can see what it was used for.
- A token never carries your password, and cannot change your login or email.
