StorePolicyCheck 如何構建零誤報的 Shopify ProductGroup JSON-LD、插件指紋及 500x500 GMC 圖片驗證器,並開源 MCP Server
How We Built a Zero-False-Positive Shopify ProductGroup JSON-LD, Plugin Fingerprint & 500x500 GMC Image Verifier (+ Open-Source MCP Server)
StorePolicyCheck 為公開的美國/美元 Shopify 網店構建唯讀驗證器,並開源免憑證 MCP Server,讓 Claude Desktop、Cursor 及 AI agents 呼叫 4 項唯讀診斷工具。
Most Shopify Google Merchant Center (GMC) "Misrepresentation" checkers either install an invasive Shopify Admin OAuth app or run shallow regex checks that drown healthy stores in false positives.
When we built StorePolicyCheck — a 100% read-only verifier for public US/USD Shopify storefronts — we ran into four surprisingly subtle HTML & structured-data engineering traps that break naive parsers:
1. Why Cheerio .text() Glues Emails Into Adjacent Sentences
On real Shopify policy pages (<p>Contact hello@brand.com</p><p>Phone: 555-0199</p>), calling .text() directly concatenates adjacent block tags into hello@brand.comPhone, corrupting email domain verification.
-
Fix: Normalize block-level tags (
p,div,li,br,td,h1–h6) with explicit whitespace boundaries before extractingmailto:and plaintext emails, and guard against trailing sentence-period run-ons likehello@brand.com.Our.
2. Why Multi-Pack ProductGroup.hasVariant Schemas Trigger False Price Mismatches
Modern Shopify themes emit nested ProductGroup.hasVariant JSON-LD arrays (for example, Single Unit $10 + 4-Pack $35). Naive parsers read the last Offer in the array and falsely flag $35 != $10 on the active single-unit ?variant= URL.
-
Fix: Aggregate all candidate
Offernodes acrossProductGroupandProductblocks, resolve the active?variant=ID explicitly, and verify bothpriceandpriceCurrency === "USD". - Free read-only tester: Shopify Variant JSON-LD Price Checker
3. Fingerprinting 8 Shopify App Families That Break GMC Parity Silently
Bundle apps (Kaching Bundles, WideBundle, Vitals), subscription widgets (Recharge, Seal Subscriptions, Appstle), auto-currency switchers (Transcy, Weglot), and page builders (PageFly, GemPages) frequently modify the visible buy-box price without updating raw JSON-LD. Fingerprinting their public script/DOM signatures lets merchants see which exact app caused the mismatch before clicking GMC "Request Review".
4. Sweeping 250 SKUs for Google's January 31, 2027 500×500 px Image Rule
Google Merchant Center enforces a 500×500 px minimum product image size starting January 31, 2027. Public Shopify stores expose image width & height metadata cleanly via /products.json?limit=250, allowing a 5-second read-only CSV audit with zero API tokens: Free 500×500 Image Checker.
Open-Source Zero-Credential MCP Server (Claude Desktop / Cursor)
Unlike Shopify Admin MCP bridges that require private API tokens, we open-sourced a zero-dependency Node.js MCP server (storepolicycheck-mcp) that lets Claude Desktop, Cursor, or AI agents invoke all 4 read-only diagnostic tools against public storefronts:
- GitHub Repo & 2026 PDF Whitepaper: https://github.com/woodfuturebj-boop/storepolicycheck-mcp
- OpenAPI 3.1 Spec: https://storepolicycheck.com/openapi.json
- 2026 Tool Comparison (AdNabu vs. ClearCheck vs. ShieldKit vs. ShopMCP vs. StorePolicyCheck): https://storepolicycheck.com/compare/shopify-gmc-audit-tools?utm_source=devto
- Live 2026 Empirical Benchmark: https://storepolicycheck.com/research/shopify-gmc-misrepresentation-benchmark-2026?utm_source=devto
- Public 15-Point Pre-Appeal Checklist (Google Docs): https://docs.google.com/document/d/e/2PACX-1vR5GDFF4N1VhgAX4EcMTX734laW1dWUxxPEEDYTTLbae2nrvNbLL6FdQxhq4k-yjY6lu1lckxppDVWx/pub
{
"mcpServers": {
"storepolicycheck": {
"command": "node",
"args": ["/path/to/storepolicycheck-mcp/index.mjs"]
}
}
}
(Disclosure: I built StorePolicyCheck. It is an independent read-only verification tool not affiliated with Google LLC or Shopify Inc.)
來源:DEV Community · dev.to