diff --git a/AGENTS.md b/AGENTS.md index b383f49..d934666 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,5 +40,5 @@ This is a TypeScript CommonJS MCP server for the Shopify Admin API. Keep changes ## Validation Notes -- As of this file's creation, `npm test` reports 87 passing tests and 6 existing failures in [tests/auth.test.ts](tests/auth.test.ts) and [tests/config.test.ts](tests/config.test.ts). The failures reflect stale expectations around client-credentials auth and required credential errors; do not treat them as caused by unrelated changes. -- [tests/shopify-client.test.ts](tests/shopify-client.test.ts) and [tests/tools.test.ts](tests/tools.test.ts) currently pass and are useful focused checks for client behavior and tool-registration changes. +- `npm test` should pass fully; treat any failure as caused by your change until proven otherwise. +- [tests/shopify-client.test.ts](tests/shopify-client.test.ts) and [tests/tools.test.ts](tests/tools.test.ts) are useful focused checks for client behavior and tool-registration changes; [tests/graphql-helpers.test.ts](tests/graphql-helpers.test.ts) covers the shared helpers. diff --git a/README.md b/README.md index 7f84814..166a573 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,8 @@ Then point your MCP client to the built output: |------|-------------| | `list_product_images` | List all images for a product | | `get_product_image` | Get a specific product image | -| `create_product_image` | Add an image to a product (by URL or base64) | -| `update_product_image` | Update image alt text or position | +| `create_product_image` | Add an image to a product by URL, with optional position and variant assignment | +| `update_product_image` | Update image alt text, position, or variant assignments | | `delete_product_image` | Remove an image from a product | ### Variants (5) @@ -308,7 +308,7 @@ Modern Shopify GraphQL discount API for automatic discounts (applied without a c | `list_webhooks` | List all registered webhooks | | `get_webhook` | Get a webhook by ID | | `create_webhook` | Register a new webhook | -| `update_webhook` | Update a webhook URL or topic | +| `update_webhook` | Update a webhook callback URL (topic cannot be changed after creation) | | `delete_webhook` | Remove a webhook | ### Menus (5) @@ -316,7 +316,7 @@ Modern Shopify GraphQL discount API for automatic discounts (applied without a c | Tool | Description | |------|-------------| | `list_menus` | List navigation menus | -| `get_menu` | Get a navigation menu by ID | +| `get_menu` | Get a navigation menu by handle, including nested items | | `create_menu` | Create a navigation menu | | `update_menu` | Update a navigation menu | | `delete_menu` | Delete a navigation menu | diff --git a/docs/index.html b/docs/index.html index 82274cb..9635a8b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,9 +4,9 @@
An MCP server that connects AI agents to the Shopify Admin API. Manage products, orders, customers, inventory, and more — using REST and GraphQL under the hood.
+An MCP server that connects AI agents to the Shopify Admin API. Manage products, orders, customers, inventory, discounts, themes, and more — powered by the Admin GraphQL API.
80 tools across 12 categories covering the full Shopify Admin API surface.
+136 tools across 18 categories covering the full Shopify Admin API surface.
list_products — List with filters and paginationlist_product_images — List all imagesget_product_image — Get a specific imagecreate_product_image — Add by URL or base64update_product_image — Update alt text or positioncreate_product_image — Add by URL, set position and variantsupdate_product_image — Update alt text, position, or variant linksdelete_product_image — Remove an imagelist_custom_collections — List manual collectionslist_smart_collections — List automated collectionsget_custom_collection — Get by IDget_smart_collection — Get by IDcreate_custom_collection — Create manual collectionupdate_custom_collection — Update collectionget_custom_collection / get_smart_collection — Get by IDcreate_custom_collection / create_smart_collection — Create collectionsupdate_custom_collection / update_smart_collection — Update collectionsdelete_custom_collection — Delete collectionadd_product_to_collection — Add a productremove_product_from_collection — Remove a productreorder_collection_products — Reorder manual collectionslist_collection_products — List products in collectionlist_price_rules — List all price rulesget_price_rule — Get by IDcreate_price_rule — Create rule (%, fixed, shipping)update_price_rule — Update ruledelete_price_rule — Delete rulelist_discount_codes — List codes for a rulecreate_discount_code — Create a codedelete_discount_code — Delete a codelist_code_discounts / list_automatic_discounts — List discountsget_code_discount / get_automatic_discount — Get by IDcreate_code_discount_basic|bxgy|free_shipping — Create code discountscreate_automatic_discount_basic|bxgy|free_shipping — Create automatic discountsupdate_*_discount_* — Update any discount typeactivate_* / deactivate_* / delete_* — Manage discount lifecycle*_price_rule, *_discount_code — Legacy-named compatibility wrappers (GraphQL under the hood)list_webhooks — List all webhooksget_webhook — Get by IDcreate_webhook — Register a webhookupdate_webhook — Update URL or topicupdate_webhook — Update callback URLdelete_webhook — Remove a webhooklist_pages — List online store pages with filtersget_page — Full details with body HTMLcreate_page — Create a pageupdate_page — Update content, handle, publish statedelete_page — Permanently deletelist_menus — List navigation menusget_menu — Get full nested item tree by handlecreate_menu — Create with nested itemsupdate_menu — Replace title, handle, itemsdelete_menu — Delete non-default menuslist_files — List files in Content → Filescreate_file — Upload from an external URLupdate_file — Rename or update alt textdelete_files — Delete one or more filesstage_upload — Create staged upload targetslist_themes / get_theme — Inspect installed themescreate_theme — Install from a ZIP URLupdate_theme — Rename a themepublish_theme — Make a theme livedelete_theme — Remove a themelist_theme_files / get_theme_files — Browse and read filesupsert_theme_files — Create or update filesdelete_theme_files — Delete filescreate_bundle — Create a fixed product bundleupdate_bundle — Update bundle componentsget_bundle — Get bundle with componentsget_bundle_operation — Poll async bundle operationslist_app_installations — List installed appsget_app_installation — Get install details and scopes.myshopify.com domain)SHOPIFY_ACCESS_TOKENshpat_...) — works for any app typeSHOPIFY_CLIENT_IDSHOPIFY_CLIENT_SECRETSHOPIFY_API_VERSIONUses Shopify's client_credentials OAuth grant. No browser auth needed.
+Two ways to authenticate: a direct Admin API access token, or the client_credentials OAuth grant for store-created custom apps.
Set SHOPIFY_ACCESS_TOKEN to an Admin API token. For Partner Dashboard apps, run npx shopify-mcp-get-token to complete browser OAuth once and obtain a token.
For custom apps created in the Shopify admin, set SHOPIFY_CLIENT_ID and SHOPIFY_CLIENT_SECRET. Tokens are fetched and refreshed automatically — no browser auth needed.
Configure in Shopify Admin → Apps and sales channels → Develop apps → API access.
+Configure in Shopify Admin → Apps and sales channels → Develop apps → API access. Grant only the scopes for the tool groups you plan to use.