Skip to content

Add Shopify Admin tools and OAuth client-credentials auth support#1

Open
christophermallory wants to merge 6 commits into
slackermafia:mainfrom
Nextboom-Inc:main
Open

Add Shopify Admin tools and OAuth client-credentials auth support#1
christophermallory wants to merge 6 commits into
slackermafia:mainfrom
Nextboom-Inc:main

Conversation

@christophermallory

Copy link
Copy Markdown

Summary

This PR expands the Shopify MCP server’s Admin API coverage, fixes collection membership behavior, and updates authentication to support Shopify’s OAuth client-credentials flow.

Changes

  • Added OAuth client-credentials authentication using:
    • SHOPIFY_CLIENT_ID
    • SHOPIFY_CLIENT_SECRET
    • POST /admin/oauth/access_token
  • Kept SHOPIFY_ACCESS_TOKEN as a legacy/static-token fallback.
  • Added access-token caching until near expiration.
  • Fixed custom collection product membership by using Shopify’s collects.json API instead of invalid custom-collection product subroutes.
  • Added online store navigation menu tools:
    • list_menus
    • get_menu
    • create_menu
    • update_menu
    • delete_menu
  • Added generic metafield definition tools for owner types like:
    • PRODUCT
    • PRODUCTVARIANT
    • PAGE
    • COLLECTION
  • Added online store page tools with templateSuffix support:
    • list_pages
    • get_page
    • create_page
    • update_page
    • delete_page
  • Updated README setup instructions to use the Shopify Dev Dashboard app flow.
  • Updated README scope guidance and tool count.

Validation

  • Ran node --check src/index.js.
  • Validated new Admin GraphQL operations against Shopify’s schema.
  • Live-tested corrected collection membership endpoints against Shopify Admin REST.

…ens. Update graphql definition for metaobjects.
Use the Collects API when adding products to custom collections.

List collection products through the products endpoint with collection_id filtering.

Make add_product_to_collection idempotent for existing memberships.
Implement list, get, create, update, and delete menu handlers using Admin GraphQL.

Document the online store navigation scopes and update the tool count.
Point credential setup to the Shopify Dev Dashboard instead of the old Admin develop-apps path.

Note that scope changes require installing or reauthorizing the app.
Implement generic metafield definition list/create/update/delete handlers.

Add page list/get/create/update/delete handlers with templateSuffix support.

Document required content and online store page scopes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant