Skip to main content

Read-only MCP server for Shopify analytics with client credentials or static token auth.

Project description

flin-shopify-analytics-mcp

Read-only MCP Server fuer Shopify Analytics, verteilbar ueber PyPI.

Ziel: alle wichtigen Shop-Daten abfragen und insbesondere beantworten koennen:

  • wer gekauft hat
  • was gekauft wurde
  • wie viel gekauft wurde
  • wie viel Umsatz je Kunde entstanden ist

Features (v1, nur read)

  • shopify_list_orders: Orders mit Kunde, Betrag und Line-Items
  • shopify_list_customers: Kunden mit Bestellanzahl und Amount Spent
  • shopify_list_products: Produkte/Varianten mit SKU, Preis, Bestand
  • shopify_customer_purchase_summary: Zusammenfassung pro Kunde
  • shopify_sales_by_customer_product: Aggregation "wer hat was wie viel gekauft"

Der Server blockiert GraphQL mutation-Operationen explizit.

Voraussetzungen

  • Python 3.10+
  • uv (empfohlen fuer uvx) oder pip
  • Shopify App mit mindestens diesen Scopes:
    • read_orders
    • read_customers
    • read_products

Nutzung

Option A: Direkt ueber PyPI mit uvx (empfohlen)

uvx -q --from flin-shopify-analytics-mcp flin-shopify-analytics-mcp \
  --domain your-store.myshopify.com \
  --clientId your_client_id \
  --clientSecret your_client_secret \
  --apiVersion 2026-04

Option B: Lokal entwickeln

python -m venv .venv
source .venv/bin/activate
pip install -e .
flin-shopify-analytics-mcp --domain your-store.myshopify.com --clientId your_client_id --clientSecret your_client_secret

Auth-Optionen

Option 1: Client Credentials (neue Dev Dashboard Apps)

export SHOPIFY_STORE_DOMAIN="your-store.myshopify.com"
export SHOPIFY_CLIENT_ID="your_client_id"
export SHOPIFY_CLIENT_SECRET="your_client_secret"
export SHOPIFY_API_VERSION="2026-04"

Option 2: Legacy Static Access Token

export SHOPIFY_STORE_DOMAIN="your-store.myshopify.com"
export SHOPIFY_ADMIN_ACCESS_TOKEN="shpat_xxx"
export SHOPIFY_API_VERSION="2026-04"

Hinweis:

  • Bei client_credentials wird das Access Token automatisch angefordert und kurz vor Ablauf erneuert.
  • Wenn sowohl SHOPIFY_ADMIN_ACCESS_TOKEN als auch SHOPIFY_CLIENT_ID/SHOPIFY_CLIENT_SECRET gesetzt sind, gewinnt der statische Token-Modus.

MCP Client Konfiguration (Beispiel)

Claude Desktop mit uvx

{
  "mcpServers": {
    "shopify-analytics": {
      "command": "uvx",
      "args": [
        "-q",
        "--from",
        "flin-shopify-analytics-mcp@0.2.3",
        "flin-shopify-analytics-mcp",
        "--domain",
        "your-store.myshopify.com",
        "--clientId",
        "your_client_id",
        "--clientSecret",
        "your_client_secret",
        "--apiVersion",
        "2026-04"
      ]
    }
  }
}

Alternative mit ENV

{
  "mcpServers": {
    "shopify-analytics": {
      "command": "uvx",
      "args": ["-q", "--from", "flin-shopify-analytics-mcp@0.2.3", "flin-shopify-analytics-mcp"],
      "env": {
        "SHOPIFY_STORE_DOMAIN": "your-store.myshopify.com",
        "SHOPIFY_CLIENT_ID": "your_client_id",
        "SHOPIFY_CLIENT_SECRET": "your_client_secret",
        "SHOPIFY_API_VERSION": "2026-04"
      }
    }
  }
}

Entwicklung

Python Tests:

python -m unittest discover -s py_tests -v

Release auf PyPI

  1. Version in pyproject.toml und flin_shopify_analytics_mcp/__init__.py hochziehen.
  2. Commit + Push nach main.
  3. GitHub Release mit Tag vX.Y.Z erstellen.
  4. Workflow .github/workflows/release.yml published automatisch auf PyPI (Trusted Publisher oder PYPI_API_TOKEN).

Hinweis:

  • Fuer Trusted Publishing muss das PyPI-Projekt einmalig mit diesem GitHub-Repo/Workflow verknuepft sein.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flin_shopify_analytics_mcp-0.2.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flin_shopify_analytics_mcp-0.2.3-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file flin_shopify_analytics_mcp-0.2.3.tar.gz.

File metadata

File hashes

Hashes for flin_shopify_analytics_mcp-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bf0995da1ff2b59749a9cc28f2a1c82e92b6a942b985928be17170b8ab47ba3b
MD5 afa56aa1a150416a2ff5894c2feeaad1
BLAKE2b-256 51765384b4198bcc8abe05d4c2872788c47661af5094f07d9a7cd22365f3da33

See more details on using hashes here.

Provenance

The following attestation bundles were made for flin_shopify_analytics_mcp-0.2.3.tar.gz:

Publisher: release.yml on flin-agency/flin-shopify-analytics-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flin_shopify_analytics_mcp-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for flin_shopify_analytics_mcp-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 00f4350e9ee3aecd963c704abf821005a079cccede0aa3d1c6080d3af78f171d
MD5 29c75a767d05f497142848aed82fd544
BLAKE2b-256 be378f85f59fa192258ef8a7e6af982bc41198961406e40af8d6feaf777183ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for flin_shopify_analytics_mcp-0.2.3-py3-none-any.whl:

Publisher: release.yml on flin-agency/flin-shopify-analytics-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page