Skip to main content
Glama
Jeanivy

Shopify MCP

by Jeanivy
README.md
# Shopify MCP

Read-only Shopify Admin API MCP server for Codex business reporting.

The server exposes business-level tools for Codex instead of a raw GraphQL
passthrough:

- `get_shop_summary`
- `list_recent_orders`
- `get_sales_report`
- `list_low_inventory_products`
- `search_products`

Secrets are intentionally not stored in this repository. Each machine must
provide its own Shopify Admin API token through `SHOPIFY_SECRETS_FILE`.

## Install

```bash
git clone <repo-url> shopify-mcp
cd shopify-mcp
npm install
```

Create the local secrets file:

```bash
mkdir -p ~/.codex/secrets
chmod 700 ~/.codex/secrets
cp .env.example ~/.codex/secrets/hholove-shopify.env
nano ~/.codex/secrets/hholove-shopify.env
chmod 600 ~/.codex/secrets/hholove-shopify.env
```

Required values:

```bash
SHOPIFY_STORE_DOMAIN=64f8b1.myshopify.com
SHOPIFY_ADMIN_ACCESS_TOKEN=<Admin API access token>
SHOPIFY_API_VERSION=2026-04
SHOPIFY_REPORT_TIME_ZONE=Asia/Shanghai
```

## Verify

Run local tests:

```bash
npm test
```

Run live Shopify sanity:

```bash
SHOPIFY_SECRETS_FILE="$HOME/.codex/secrets/hholove-shopify.env" \
node scripts/shopify-query.mjs sanity
```

Run a Shanghai-time daily order check:

```bash
SHOPIFY_SECRETS_FILE="$HOME/.codex/secrets/hholove-shopify.env" \
node scripts/shopify-query.mjs recent-orders --today --time-zone Asia/Shanghai
```

## Register With Codex

```bash
/Applications/Codex.app/Contents/Resources/codex mcp add hholove-shopify \
  --env SHOPIFY_SECRETS_FILE="$HOME/.codex/secrets/hholove-shopify.env" \
  -- node "$PWD/mcp/hholove-shopify-server.mjs"
```

Inspect the registration:

```bash
/Applications/Codex.app/Contents/Resources/codex mcp get hholove-shopify
/Applications/Codex.app/Contents/Resources/codex mcp list
```

Restart Codex after changing MCP registration.

The Git repository is named `shopify-mcp`; the Codex MCP registration name is
currently `hholove-shopify` so it stays paired with the existing store secrets
file and local Codex configuration.

## Development

```bash
npm run test:hholove-shopify-mcp
npm run test:shopify-query
npm run mcp:hholove-shopify
```

Implementation notes live in `mcp/README.md`. Target-Mac setup details live in
`docs/hholove-shopify-mcp-transfer.md`.

Maintenance

ActivityInactive
ResponsivenessNo issues