DEV Community

Davide Conte
Davide Conte

Posted on

I built an MCP server for Shopify and Stripe write operations — the gap nobody filled

Every existing Shopify MCP server has the same problem: read-only.

You can ask your AI agent to show you orders, products, revenue. But you can't tell it to update a price, bulk-edit inventory, cancel an order, or issue a refund. The moment you need to do something, you're back in the dashboard.

I got tired of it. So I built mcp-ecom-hub.

What it does

npx mcp-ecom-hub
Enter fullscreen mode Exit fullscreen mode

A fully typed MCP server that covers what the others don't:

Shopify — write ops:

  • shopify_update_product — update title, price, inventory
  • shopify_bulk_update_prices — update multiple variants at once
  • shopify_fulfill_order — mark orders as fulfilled
  • shopify_cancel_order — cancel + refund in one call
  • shopify_create_discount — generate discount codes

Shopify — read ops:

  • shopify_get_orders — with filters (status, date, customer)
  • shopify_get_products — full product + variant details
  • shopify_get_analytics — revenue, AOV, conversion rate
  • shopify_get_customers — customer list + LTV

Stripe:

  • stripe_get_revenue — MRR, ARR, breakdown by period
  • stripe_list_subscriptions — active subscriptions
  • stripe_cancel_subscription — with proration handling
  • stripe_create_coupon — discount codes
  • stripe_get_payouts — payout history
  • stripe_refund_payment — issue refunds

Multi-store:

  • hub_list_stores — all configured stores
  • hub_get_overview — cross-store revenue summary

The gap it fills

Feature mcp-ecom-hub Shopify MCP (official) pipeboard
Shopify write ops
Bulk price update
Stripe integrated
Subscription mgmt
Multi-store
Self-hosted
Open source

Setup

{
  "mcpServers": {
    "ecom-hub": {
      "command": "npx",
      "args": ["-y", "mcp-ecom-hub"],
      "env": {
        "MCP_ECOM_CONFIG": "/path/to/stores.json"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Config file (stores.json):

{
  "stores": [
    {
      "id": "mystore",
      "name": "My Store",
      "shopify": {
        "domain": "mystore.myshopify.com",
        "accessToken": "shpat_xxx"
      },
      "stripe": {
        "secretKey": "sk_live_xxx"
      }
    }
  ],
  "defaultStore": "mystore"
}
Enter fullscreen mode Exit fullscreen mode

Safety first

Destructive operations (cancel, refund) require explicit confirmation:

User: Cancel order #1234 and refund the customer
Agent: I'll cancel order #1234 ($89.00) and issue a full refund. Confirm? [yes/no]
User: yes
Agent: ✅ Order cancelled. Refund of $89.00 issued — arrives in 5-10 days.
Enter fullscreen mode Exit fullscreen mode

No accidental cancellations.

Multi-store

Running an agency with multiple clients? One config, all stores:

User: Show me revenue across all stores this week
Agent: 
  - Store A: €2,340 (12 orders, AOV €195)
  - Store B: €890 (8 orders, AOV €111)
  - Total: €3,230
Enter fullscreen mode Exit fullscreen mode

Links

Open source, MIT. Built for agencies managing multiple e-commerce clients.

PRs welcome — especially for WooCommerce support (next on the list).

Top comments (1)

Collapse
 
stackedboost profile image
Peter Hallander

The write ops coverage here is solid — bulk price editing and order fulfillment are exactly the operations you'd want to delegate to an AI agent but can't with read-only MCP servers.

One area worth adding for a future PR: blog article management. The Shopify Admin GraphQL API has full CRUD for articles and it's a common agency use case when managing content at scale across stores:

mutation createBlogArticle($blogId: ID!, $article: ArticleInput!) {
  articleCreate(blogId: $blogId, article: $article) {
    article {
      id
      title
      handle
      publishedAt
      tags
    }
    userErrors {
      field
      message
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The read side is also useful — filtering articles by tag, pulling unpublished drafts, checking publication status. For agencies running content campaigns across multiple stores, this is the kind of operation you'd want to automate. Articles also support metafields, so you can update SEO title/description fields programmatically in the same mutation.

The hub_list_stores multi-store pattern is particularly well suited to this — "publish this blog post to all stores" is a real workflow for agencies.

(I work with Shopify's blog article API in WP Simple WordPress Feed — apps.shopify.com/simple-wordpress-post-feed — which syncs WordPress content to Shopify blog articles. Blog article write operations are more capable than people typically expect from the API.)