Share a Wish

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.

ServerBinaryFor whomWhat it does
Creator Shopshareawish-creator-mcpCreators, affiliatesCheck 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 Integrationshareawish-wishlist-mcpShop developers, agenciesCreate 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.

VariableNotes
SHAREAWISH_TOKENPersonal access token (saw_pat_…). Recommended for every setup, required for shared or remote machines and CI-like agents.
SHAREAWISH_EMAIL + SHAREAWISH_PASSWORDAlternative 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>.

ToolWhat it does
whoamiVerify credentials and show the signed-in partner (email, number of shops). Call this first.
shops_listList all creator shops of the partner.
shops_getFull shop record: name, handle, description, template, settings, images, markets, publish state.
shops_check_handleCheck whether a shop handle (URL slug, e.g. lenas-picks) is available; returns a slugified suggestion.
shops_createCreate 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_updateUpdate name, description, template, handle, markets or settings. Settings are merged with the existing ones.
shops_publishSet the shop live (public) or back to draft.
shops_upload_imageUpload 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_listLists (collections) of a shop with product counts.
lists_getA list with its products (each with listItemId, offerId and overrides).
lists_createCreate a product list in a shop, optionally public, featured or bound to a market.
lists_updateRename or describe a list, toggle public/featured, or reorder and prune products by passing the full ordered product id array.
lists_deleteDelete a list (products stay in the shop catalog).
products_preview_urlScrape a product page (title, image, price, brand) without adding it. Returns a productId to reuse in products_add_by_url.
products_add_by_urlAdd 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_manualAdd a product with your own data (no scraping) to the shop catalog.
products_add_existingPlace an existing product (e.g. from catalog_search) into a list, optionally with an affiliate link and overrides.
products_update_itemChange the affiliate link, overrides, manual price or availability of a product in a list.
products_remove_itemRemove a product from a list.
catalog_searchSearch the affiliate product catalog (Awin feeds, Amazon, existing products) for products with ready affiliate links.
media_listProduct videos of the partner (optionally filtered by product or shop) plus the plan limit.
media_upload_videoUpload 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_updateChange title, caption, language or position of a video, or hide/show it.
media_deleteDelete a product video and its files.
analytics_kpisShop visits, product clicks, saves and list clicks over a date range (one shop or all).
analytics_top_productsMost clicked and saved products of a shop.
earnings_summaryAffiliate 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_….

ToolWhat it does
whoamiVerify credentials; shows the partner session, API keys and current usage.
usage_getWishlist actions used vs. plan limit for the current calendar month (save / share / list view breakdown, warning level).
usage_keyRate-limit and monthly usage for one public key (authenticates with the key itself).
plans_listShop plans with monthly wishlist-action limits and prices.
keys_listAll public API keys (pk_live_ / pk_test_) with status, allowed domains and monthly usage.
keys_createCreate a public key. Environment test gives pk_test_… (works on localhost without allow-list); prod gives pk_live_… and needs allowed_domains.
keys_rotateIssue a new key value; the old one stays valid for 15 minutes (domains are copied).
keys_revokeRevoke a key immediately.
keys_deleteDelete a key (only unused or revoked keys).
keys_domains_getDomain allow-list of a key.
keys_domains_setReplace the allow-list (hosts without scheme; wildcards like *.example.com allowed; localhost is always allowed).
widget_init_checkSimulate 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_listBasket (wishlist drawer / checkout) configurations of the partner.
baskets_getOne basket configuration by public id.
baskets_createCreate a basket configuration: layout, colours, checkout method (cart URL pattern or webhook), texts.
baskets_updateUpdate fields of a basket configuration.
baskets_deleteDelete a basket configuration.
baskets_test_webhookSend a test payload { "type": "basket.test" } to the configured webhook URL and report the HTTP status.
baskets_public_configWhat the SDK sees for a basket id (no credentials needed).
snippet_save_buttonCopy-paste code for the save-to-wishlist button (html, react, vue, shopify). Uses your key if given, else a placeholder.
snippet_basketCopy-paste code for the wishlist basket / checkout drawer (html, react, shopify, woocommerce). Needs a basket config id.
snippet_hosted_listServer-side example: create a hosted wishlist for a signed-in user and get its share link.
docs_searchSearch the public developer docs (llms.txt index and endpoint summary) and return matching sections with links.
openapi_getFetch 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:

  1. whoami — confirm the account, then shops_check_handle(handle="lenas-picks") — is the URL free?

  2. shops_create(name, handle, template) — the shop is created as a draft.

  3. shops_upload_image(shop_id, type="logo", source="./logo.png") — logo from a local file or URL.

  4. lists_create(shop_id, name="Autumn favourites")

  5. products_add_by_url(shop_id, list_id, source_url, affiliate_url) — the product page is scraped for title, image and price; visitors click affiliate_url.

  6. media_upload_video(product_id, source="./clip.mp4") — MP4/MOV up to 200 MB.

  7. shops_publish(shop_id, status="live") — the shop is public at https://shareawish.shop/lenas-picks.

Integrator: from test key to production

  1. whoami, then keys_create(environment="test") — you get a pk_test_… key.

  2. widget_init_check(public_key, origin="http://localhost:3000") — confirms the handshake works before touching your code.

  3. baskets_create(name, cart_url or webhook_url) — the basket configuration (bkt_…); optionally baskets_test_webhook.

  4. snippet_save_button(framework="react", public_key) and snippet_basket(config_id, framework) — paste the generated code into the shop.

  5. keys_create(environment="prod", allowed_domains=["shop.example.com"]) or keys_domains_set — allow-list the production domain.

  6. Swap in the pk_live_… key and watch usage_get against 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_delete and media_delete.
  • Keep secrets out of files you commit. Prefer the VS Code inputs prompt or your client's secret storage over a plain-text token in mcp.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.