Skip to main content
Glama
ThinkPro-GZ

shoplazza-mcp

by ThinkPro-GZ

shoplazza-mcp

A Python implementation that wraps Shoplazza OpenAPI (REST) into an MCP (Model Context Protocol) service, enabling MCP-capable clients such as Claude, Cursor, and DSH to directly read and write Shoplazza store data (products, orders, customers, inventory, discounts, webhook subscriptions, etc.).

The endpoint catalog (data/endpoints.json) is automatically scraped from the official documentation by tools/scrape_endpoints.py, covering 311 real endpoints and 46 resource groups for version 2026-01.


Features

Capability

Description

61 curated endpoint tools

Products / variants / orders / fulfillments / customers / addresses / collections / discounts / coupons / inventory / stores / pages / blogs / articles / metafields / webhooks / gift cards / suppliers / data reports / authorization scopes, etc. Input parameters are automatically generated from the official documentation.

Multi-store support

A single service instance can configure multiple stores (SHOPLAZZA_STORES); every API tool accepts an optional shop_domain parameter for per-store routing; shoplazza_list_shops lists configured stores.

Full coverage of 311 endpoints

When SHOPLAZZA_REGISTER_ALL_ENDPOINTS=1 is set, every endpoint in the catalog is registered as a separate tool.

Generic passthrough tool

call_shoplazza_api(method, path, path_params, query, body) can call any endpoint.

Endpoint catalog tools

shoplazza_search_endpoints / shoplazza_get_endpoint let the model discover the correct endpoint and parameters at any time.

Dual transports

stdio (default for local clients) / Streamable HTTP (remote service, --transport http).

Robustness

Automatically handles header-based authentication, the unified response envelope {code,message,data}, cursor pagination, 429 rate-limit retries (Retry-After, per-store rate limiting), path placeholder validation, and passthrough of business errors.


Installation

Requirements: Python ≥ 3.10, uv (recommended) or pip.

cd shoplazza-mcp
uv sync          # 创建 .venv 并安装依赖(mcp、httpx)

Without uv:

python -m venv .venv
.venv\Scripts\activate   # Windows
pip install -e .

Configuration

Provide credentials via environment variables (never hardcode secrets into code or commit them to a repository):

# PowerShell / cmd
set SHOPLAZZA_SHOP_DOMAIN=your-store.myshoplazza.com
set SHOPLAZZA_ACCESS_TOKEN=your-access-token

Variable

Required

Default

Description

SHOPLAZZA_SHOP_DOMAIN

*

Default/single store domain, e.g. your-store.myshoplazza.com (without protocol).

SHOPLAZZA_ACCESS_TOKEN

*

Default/single store access token, corresponding to the Access-Token request header.

SHOPLAZZA_STORES

Optional

Multi-store JSON: {"a.myshoplazza.com":"token-a","b.myshoplazza.com":"token-b"}.

SHOPLAZZA_API_VERSION

2026-01

API version, e.g. 2025-06, 2022-01.

SHOPLAZZA_REGISTER_ALL_ENDPOINTS

0

Set to 1 to register all 311 endpoint tools.

SHOPLAZZA_MAX_RPS

2.0

Maximum client requests per second (leaky bucket, per store).

SHOPLAZZA_MAX_RETRY_WAIT

10.0

Maximum seconds to wait on 429.

SHOPLAZZA_REQUEST_TIMEOUT

60.0

Per-request timeout (seconds).

SHOPLAZZA_DATA_DIR

package data/

Custom endpoint catalog location.

* Choose either the single-store configuration (SHOPLAZZA_SHOP_DOMAIN + SHOPLAZZA_ACCESS_TOKEN) or the multi-store configuration (SHOPLAZZA_STORES); if both are set, SHOPLAZZA_SHOP_DOMAIN is the default store.

See .env.example for a full example.

Multi-store usage

After configuring multiple stores, every API tool in the service gains an optional shop_domain parameter:

export SHOPLAZZA_STORES='{"us.myshoplazza.com":"token-us","de.myshoplazza.com":"token-de"}'
  • Without shop_domain → uses the default store (SHOPLAZZA_SHOP_DOMAIN, or the first entry in STORES).

  • With shop_domain → uses the specified store (unknown stores will error and list the configured stores).

  • shoplazza_list_shops → view all stores configured in the service and the default store.

  • Each store has its own Access-Token and independent rate-limit bucket (in line with the official per-store rate-limiting rules), so multiple stores do not block each other.

Example conversation:

“Check today’s order count for the US store, then look at the top 5 selling products in the DE store.” → The model will call shoplazza_orders / shoplazza_products with shop_domain=us.myshoplazza.com and shop_domain=de.myshoplazza.com respectively.

Claude Desktop configuration example (multi-store):

{
  "mcpServers": {
    "shoplazza": {
      "command": "uv",
      "args": ["run", "--directory", "D:/projects/DSH-projects/shoplazza-mcp", "shoplazza-mcp"],
      "env": {
        "SHOPLAZZA_STORES": "{\"us.myshoplazza.com\":\"token-us\",\"de.myshoplazza.com\":\"token-de\"}"
      }
    }
  }
}

Required API permissions (scopes)

When creating/installing an app in the Partner Center or authorizing a store, follow the principle of least privilege and only request the scopes you need. Use read_* for reading data; add the corresponding write_* only when you need to modify data:

Data you want to access

Requested scope

Store information

read_shop

Products / variants / inventory

read_product

Categories / collections

read_collection

Orders / payment information

read_order

Refunds / after-sales

read_order (includes after-sales records) + read_data

Customers

read_customer

Discount codes / coupons / price rules

read_price_rules

Gift cards

read_gift_cards

Pages / blogs / articles / redirects

read_shop_navigation

Comments

read_comments

Webhook management

Requires the corresponding resource scope with write_* (e.g. write_product / write_order)

Shoplazza Pay fund data

read_finance

Data analytics reports

read_data

Recommended combination for read-only operations: read_shop, read_product, read_order, read_customer, read_price_rules, read_gift_cards, read_shop_navigation, read_data. After authorization, you can call the shoplazza_oauth_access_scopes tool to verify the scopes actually granted for this installation. See the official mapping at Access Scopes.

How to get an Access Token

  • Public app: Follow the OAuth 2.0 Authorization Code flow and exchange the code for an access_token (valid for 1 year, refreshable with refresh_token).

  • Private / internal integration: Generate the corresponding access tokens for the app and store in the Shoplazza admin.

Running

stdio (local MCP client, default)

uv run shoplazza-mcp

HTTP (remote service)

uv run shoplazza-mcp --transport http --host 0.0.0.0 --port 8765

The endpoint path defaults to /mcp and can be changed with --http-path.

Connecting to MCP clients

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "shoplazza": {
      "command": "uv",
      "args": ["run", "--directory", "D:/projects/DSH-projects/shoplazza-mcp", "shoplazza-mcp"],
      "env": {
        "SHOPLAZZA_SHOP_DOMAIN": "your-store.myshoplazza.com",
        "SHOPLAZZA_ACCESS_TOKEN": "your-access-token"
      }
    }
  }
}

Cursor: Add the server in Settings → MCP; see examples/mcp-cursor.json.

Remote HTTP (any client): Point the url to http://host:8765/mcp.

You can also run it directly (debug to view the tool list and JSON-RPC interaction):

uv run mcp dev shoplazza-mcp

Usage examples (Claude / Cursor conversations)

  • “List the latest 10 orders in the store.”

  • “Check the inventory of product abcd-1234.”

  • “Cancel order order-xxx with reason customer requested.”

  • “Create a new discount: 20 off when spending 100.”

  • “What APIs are available for refunds? Search the endpoints.” → The model will call shoplazza_search_endpoints("refund") and then automatically call the corresponding endpoint.

All responses return the raw API envelope: {code, message, data, api_call_limit}; list-type responses include cursor / pre_cursor in data, used with page_size / per_page for pagination.

Development and maintenance

  • tools/scrape_endpoints.py: scrapes the official endpoint documentation page and generates data/endpoints.json (including each endpoint's method / path / parameters / request body fields / response structure).

  • Maintenance: to add or remove “curated tools”, just modify the CURATED_SLUGS list in shoplazza_mcp/tools.py.

  • scripts/smoke_test.py: offline smoke test (stdio); scripts/http_smoke_test.py: HTTP smoke test.

Security notes

  • Access Tokens should only be injected via environment variables / client configuration; never write them into a code repository.

  • The service only uses HTTPS (the official requirement is that all endpoints are HTTPS-only).

  • When exposing the service as an HTTP endpoint to the public internet, place it in a trusted internal network or add your own authentication (e.g., gateway, firewall).

License

MIT

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Manage your NanoCart store from any AI agent: products, orders, coupons, subscribers, reports.

  • Shopify MCP Pack — wraps the Shopify Admin REST API (2024-01)

  • Manage your Savanto store from your AI: catalog, content, prompts, and analytics, by chat.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ThinkPro-GZ/shoplazza-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server