MCP Servers
Let Claude, Cursor, Copilot and other AI assistants work with Share a Wish directly. The @shareawish/mcp package ships two Model Context Protocol servers: one for creators who build affiliate shops, one for developers who integrate the wishlist into a store. Source on GitHub: github.com/shareawish/mcp.
1. What it is
MCP is the open standard AI clients use to call external tools. Each Share a Wish server runs locally as a stdio process, receives tool calls from your assistant and forwards them to the same Share a Wish endpoints the Partner Portal uses — with your credentials, on your machine.
| Server | Binary | For whom | What it does |
|---|---|---|---|
| Creator Shop | shareawish-creator-mcp | Creators, affiliates | Check handles, create and publish shops, upload logo and cover, manage lists, add products by URL (scraped) or manually with affiliate links and overrides, search the affiliate catalog, upload product videos, read analytics and earnings. |
| Wishlist Integration | shareawish-wishlist-mcp | Shop developers, agencies | Create and rotate API keys, manage domain allow-lists, simulate the widget handshake, configure the basket (wishlist drawer and checkout) and test its webhook, generate save-button and basket embed snippets, check usage against plan limits, search the docs and the OpenAPI spec. |
Both servers are available to every Partner Portal account, the free plan included. There is no separate MCP plan or fee. Plan limits — wishlist actions per month, number of shops, ready product videos per shop — apply exactly as they do in the portal, because the servers call the same endpoints.
The servers are single-file bundles without runtime dependencies and need Node.js 18 or newer. Tool names use snake_case (shops_create, keys_domains_set) for maximum client compatibility.
2. Install
The package is published on npm as @shareawish/mcp and exposes two binaries, shareawish-creator-mcp and shareawish-wishlist-mcp. You do not need a global install — every client below starts the server through npx:
npx -y -p @shareawish/mcp shareawish-creator-mcp
npx -y -p @shareawish/mcp shareawish-wishlist-mcp
Replace saw_pat_… in the examples with your personal access token (see Authentication).
Claude Code
claude mcp add shareawish-creator -e SHAREAWISH_TOKEN=saw_pat_… -- npx -y -p @shareawish/mcp shareawish-creator-mcp
claude mcp add shareawish-wishlist -e SHAREAWISH_TOKEN=saw_pat_… -- npx -y -p @shareawish/mcp shareawish-wishlist-mcp
Cursor, Claude Desktop, Windsurf
Add the servers to the mcpServers object of the client configuration (Cursor: .cursor/mcp.json or Settings → MCP; Claude Desktop: claude_desktop_config.json; Windsurf: ~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"shareawish-creator": {
"command": "npx",
"args": ["-y", "-p", "@shareawish/mcp", "shareawish-creator-mcp"],
"env": { "SHAREAWISH_TOKEN": "saw_pat_…" }
},
"shareawish-wishlist": {
"command": "npx",
"args": ["-y", "-p", "@shareawish/mcp", "shareawish-wishlist-mcp"],
"env": { "SHAREAWISH_TOKEN": "saw_pat_…" }
}
}
}
VS Code with GitHub Copilot
Create .vscode/mcp.json in your project. The inputs entry makes VS Code prompt for the token once and store it in its secret storage instead of the file:
{
"inputs": [
{ "type": "promptString", "id": "shareawish-token", "description": "Share a Wish personal access token", "password": true }
],
"servers": {
"shareawish-creator": {
"type": "stdio",
"command": "npx",
"args": ["-y", "-p", "@shareawish/mcp", "shareawish-creator-mcp"],
"env": { "SHAREAWISH_TOKEN": "${input:shareawish-token}" }
},
"shareawish-wishlist": {
"type": "stdio",
"command": "npx",
"args": ["-y", "-p", "@shareawish/mcp", "shareawish-wishlist-mcp"],
"env": { "SHAREAWISH_TOKEN": "${input:shareawish-token}" }
}
}
}
Only add the server you need: creators usually want just shareawish-creator, integrators just shareawish-wishlist. Start with whoami in your client to confirm the connection.
3. Authentication
Recommended: personal access token. Set SHAREAWISH_TOKEN to a token that starts with saw_pat_. Create it in the Partner Portal under Account Settings → Access tokens & AI agents. The token is shown once when you create it, can be revoked at any time and expires after 365 days by default. It grants the same rights as your portal login, scoped to the partner account it was created in.
| Variable | Notes |
|---|---|
SHAREAWISH_TOKEN | Personal access token (saw_pat_…). Recommended for every setup, required for shared or remote machines and CI-like agents. |
SHAREAWISH_EMAIL + SHAREAWISH_PASSWORD | Alternative for local use only: your Partner Portal login. The server signs in on first use and refreshes the session automatically. |
The docs, snippet and plan tools of the Wishlist Integration server (docs_search, openapi_get, plans_list, snippet_*, baskets_public_config) work without credentials. Everything else calls whoami-level authentication first and returns unauthorized if the token is missing, expired or revoked.
Tokens and passwords are read from the environment only. The server never writes them — or any session it derives from them — to disk.
4. Creator Shop server tools
Started with shareawish-creator-mcp. Ids are the numeric ids returned by the list/get tools; the public shop URL is https://shareawish.shop/<handle>.
| Tool | What it does |
|---|---|
whoami | Verify credentials and show the signed-in partner (email, number of shops). Call this first. |
shops_list | List all creator shops of the partner. |
shops_get | Full shop record: name, handle, description, template, settings, images, markets, publish state. |
shops_check_handle | Check whether a shop handle (URL slug, e.g. lenas-picks) is available; returns a slugified suggestion. |
shops_create | Create a creator shop as a draft. The handle becomes the public URL; publish later with shops_publish. Templates: classic-grid, minimal, hero-rows, magazine-cards. |
shops_update | Update name, description, template, handle, markets or settings. Settings are merged with the existing ones. |
shops_publish | Set the shop live (public) or back to draft. |
shops_upload_image | Upload a logo or cover image from a local file path or an http(s) URL (max 10 MB; jpg/png/webp) and attach it to the shop. |
lists_list | Lists (collections) of a shop with product counts. |
lists_get | A list with its products (each with listItemId, offerId and overrides). |
lists_create | Create a product list in a shop, optionally public, featured or bound to a market. |
lists_update | Rename or describe a list, toggle public/featured, or reorder and prune products by passing the full ordered product id array. |
lists_delete | Delete a list (products stay in the shop catalog). |
products_preview_url | Scrape a product page (title, image, price, brand) without adding it. Returns a productId to reuse in products_add_by_url. |
products_add_by_url | Add a product to a list from its shop URL. The page is scraped for title, image and price; affiliate_url is the link visitors click. Optional overrides for title, image, description and price. |
products_add_manual | Add a product with your own data (no scraping) to the shop catalog. |
products_add_existing | Place an existing product (e.g. from catalog_search) into a list, optionally with an affiliate link and overrides. |
products_update_item | Change the affiliate link, overrides, manual price or availability of a product in a list. |
products_remove_item | Remove a product from a list. |
catalog_search | Search the affiliate product catalog (Awin feeds, Amazon, existing products) for products with ready affiliate links. |
media_list | Product videos of the partner (optionally filtered by product or shop) plus the plan limit. |
media_upload_video | Upload an MP4/MOV (max 200 MB) for a product from a local path or URL, optionally with a poster image, and publish it. Creator Free: 5 ready videos per shop. |
media_update | Change title, caption, language or position of a video, or hide/show it. |
media_delete | Delete a product video and its files. |
analytics_kpis | Shop visits, product clicks, saves and list clicks over a date range (one shop or all). |
analytics_top_products | Most clicked and saved products of a shop. |
earnings_summary | Affiliate earnings, clicks, conversions and payouts of a shop (70/30 revenue share on Awin conversions). |
5. Wishlist Integration server tools
Started with shareawish-wishlist-mcp. Key ids are the ids shown in the portal; basket configuration ids look like bkt_….
| Tool | What it does |
|---|---|
whoami | Verify credentials; shows the partner session, API keys and current usage. |
usage_get | Wishlist actions used vs. plan limit for the current calendar month (save / share / list view breakdown, warning level). |
usage_key | Rate-limit and monthly usage for one public key (authenticates with the key itself). |
plans_list | Shop plans with monthly wishlist-action limits and prices. |
keys_list | All public API keys (pk_live_ / pk_test_) with status, allowed domains and monthly usage. |
keys_create | Create a public key. Environment test gives pk_test_… (works on localhost without allow-list); prod gives pk_live_… and needs allowed_domains. |
keys_rotate | Issue a new key value; the old one stays valid for 15 minutes (domains are copied). |
keys_revoke | Revoke a key immediately. |
keys_delete | Delete a key (only unused or revoked keys). |
keys_domains_get | Domain allow-list of a key. |
keys_domains_set | Replace the allow-list (hosts without scheme; wildcards like *.example.com allowed; localhost is always allowed). |
widget_init_check | Simulate the widget handshake (POST /widget/init) for a key and origin. Shows whether the origin is allowed, the plan usage headers and any error (origin_not_allowed, allowlist_required, subscription_required). |
baskets_list | Basket (wishlist drawer / checkout) configurations of the partner. |
baskets_get | One basket configuration by public id. |
baskets_create | Create a basket configuration: layout, colours, checkout method (cart URL pattern or webhook), texts. |
baskets_update | Update fields of a basket configuration. |
baskets_delete | Delete a basket configuration. |
baskets_test_webhook | Send a test payload { "type": "basket.test" } to the configured webhook URL and report the HTTP status. |
baskets_public_config | What the SDK sees for a basket id (no credentials needed). |
snippet_save_button | Copy-paste code for the save-to-wishlist button (html, react, vue, shopify). Uses your key if given, else a placeholder. |
snippet_basket | Copy-paste code for the wishlist basket / checkout drawer (html, react, shopify, woocommerce). Needs a basket config id. |
snippet_hosted_list | Server-side example: create a hosted wishlist for a signed-in user and get its share link. |
docs_search | Search the public developer docs (llms.txt index and endpoint summary) and return matching sections with links. |
openapi_get | Fetch the public OpenAPI 3.1 spec (YAML), or just one path item such as /widget/init. |
6. Example sessions
Creator: from idea to live shop
A prompt such as "Create a shop called Lena's Picks with an autumn favourites list, add these three products with my affiliate links, upload the clip and publish it" typically results in this tool sequence:
whoami— confirm the account, thenshops_check_handle(handle="lenas-picks")— is the URL free?shops_create(name, handle, template)— the shop is created as a draft.shops_upload_image(shop_id, type="logo", source="./logo.png")— logo from a local file or URL.lists_create(shop_id, name="Autumn favourites")products_add_by_url(shop_id, list_id, source_url, affiliate_url)— the product page is scraped for title, image and price; visitors clickaffiliate_url.media_upload_video(product_id, source="./clip.mp4")— MP4/MOV up to 200 MB.shops_publish(shop_id, status="live")— the shop is public athttps://shareawish.shop/lenas-picks.
Integrator: from test key to production
whoami, thenkeys_create(environment="test")— you get apk_test_…key.widget_init_check(public_key, origin="http://localhost:3000")— confirms the handshake works before touching your code.baskets_create(name, cart_url or webhook_url)— the basket configuration (bkt_…); optionallybaskets_test_webhook.snippet_save_button(framework="react", public_key)andsnippet_basket(config_id, framework)— paste the generated code into the shop.keys_create(environment="prod", allowed_domains=["shop.example.com"])orkeys_domains_set— allow-list the production domain.Swap in the
pk_live_…key and watchusage_getagainst the plan limit.
Test keys hit the same live API as production keys; there is no sandbox, so the data you save is real. Details: Wishlist API, Save Button.
7. Security notes
- Least privilege. Create a separate personal access token per machine and per agent, name it after where it lives, and revoke it in the Partner Portal as soon as you are done. A token grants the same rights as your login; treat it like a password.
- Only Share a Wish endpoints. The server talks exclusively to Share a Wish hosts (the public API, the partner API and, for product scraping and image or video fetches, the URLs you pass in). It does not phone home, collect telemetry or contact any third party.
- Nothing on disk. Credentials, sessions and uploaded files are held in memory only; the server writes nothing to disk. Removing the server from your client configuration leaves no residue.
- Approve destructive calls. Keep your client's per-call approval on for
shops_publish,keys_create(prod),keys_revoke,keys_delete,lists_delete,baskets_deleteandmedia_delete. - Keep secrets out of files you commit. Prefer the VS Code
inputsprompt or your client's secret storage over a plain-text token inmcp.json; if you must use a file, add it to.gitignore.
FAQ
Does the MCP integration cost anything, and which plan do I need?
Nothing extra. Both servers are available to every Partner Portal account, the free plan included. The servers call the same endpoints as the portal, so your plan limits (wishlist actions per month, number of shops, ready product videos per shop) apply exactly as they do in the portal.
Which AI clients work with the Share a Wish MCP servers?
Any client that speaks the Model Context Protocol over stdio: Claude Code, Claude Desktop, Cursor, Windsurf, GitHub Copilot in VS Code (agent mode), Zed, Cline and others. The servers are single-file Node.js bundles (Node 18 or newer) started with npx.
Can Claude publish a shop without me seeing it?
Not silently. shops_create always creates a draft; going live is a separate, explicit shops_publish call, and MCP clients ask you to approve each tool call unless you have turned that off. Keep approval prompts on for shops_publish, keys_create with environment prod, keys_revoke and the delete tools, and review the draft at https://shareawish.shop/<handle> before you say yes.
How do I revoke access?
Open the Partner Portal, go to Account Settings → Access tokens & AI agents and click Revoke on the token. Revocation is immediate; the next tool call fails with unauthorized. The server never writes the token to disk, so removing the SHAREAWISH_TOKEN entry from your client configuration completes the cleanup.
Source
The servers are open source (MIT). Source on GitHub: github.com/shareawish/mcp — issues and pull requests welcome. npm: @shareawish/mcp.