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 --from flin-shopify-analytics-mcp shopify-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 .
shopify-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": [
        "--from",
        "flin-shopify-analytics-mcp",
        "shopify-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": ["--from", "flin-shopify-analytics-mcp", "shopify-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.1.tar.gz (22.5 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.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for flin_shopify_analytics_mcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 735cbc61ec02ef70302ae07b49d1e5ff142d9e61878c87cffdc303ea70e30abd
MD5 62585737ecad837bf942c3201f9ace6e
BLAKE2b-256 cd56ae199f9db2033fe6b299b3806d9eb66db33855e7b7562cc5e106e9d44960

See more details on using hashes here.

Provenance

The following attestation bundles were made for flin_shopify_analytics_mcp-0.2.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flin_shopify_analytics_mcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90698a121e67fb062e09854e097003fbc5e6201c3f4f0edf48298b618b8894cc
MD5 847bd7fdce52b42b2a1a6a3762a0039e
BLAKE2b-256 5910e5c79fdde5cdfea823411f4c7ca2936f8b15a19cc2a4f4bfef2c82d59e06

See more details on using hashes here.

Provenance

The following attestation bundles were made for flin_shopify_analytics_mcp-0.2.1-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