Gmc Mcp

io.github.kiwoongeom由 GitHub 帳號 kiwoongeom 發布v0.2.6更新於 Nov 6, 2026

MIT-licensed pip-installable MCP for Google Merchant Center on Merchant API v1 (126 tools).

已驗證STDIO僅桌面資料與分析商業與電商

概覽

AI 產生的概覽

以 Merchant API v1 為基礎的自架 Google Merchant Center MCP 伺服器,提供 126 個工具,讓助理管理商品、Feed、庫存、報表與帳戶設定。

可以做什麼
  • 列出、讀取、新增、更新與批次刪除商品,並列出遭拒登的商品
  • 更新區域與在地庫存,批次調整價格或上架狀態
  • 以類 SQL 查詢成效、價格競爭力、熱銷商品與零點擊報表
  • 管理 Feed 與資料來源、促銷活動、退貨政策、地區與首頁認領
  • 管理帳戶設定、使用者、運費、稅務、結帳、評價、轉換,以及全通路與 LFP 資料
  • 檢視稽核記錄、回復已記錄的寫入、匯出全部資料、與 Shopify CSV 比對並切換 dry-run
適用情境
適合經營商品數量龐大的 Google Merchant Center 帳戶、希望用對話方式查看或修改商品、庫存、促銷與報表,而不想用網頁後台或臨時腳本的人。也適合希望憑證留在本機、並重視稽核記錄與批次修改前 dry-run 的自架使用者。
執行需求
以 pip 安裝的 Python 套件形式在本機執行,透過 stdio 啟動。需要 GMC_ACCOUNT_ID 提供 10 位數 Merchant Center 帳戶 ID,並以 GMC_SERVICE_ACCOUNT_KEY 提供服務帳戶 JSON 金鑰路徑,或以 GMC_OAUTH_TOKEN 提供 OAuth 權杖檔案路徑。服務帳戶須在 Merchant Center 中被授予 Admin 權限,需在 Google Cloud 專案中啟用 Merchant API,並完成一次性的 GCP 註冊步驟。需要能連線至 Merchant API 的網路。
安裝前請注意
憑證權限很高:具 Admin 權限的服務帳戶或 OAuth 權杖檔案可以變更線上購物廣告商品、價格、庫存、使用者、運費與稅務設定。許多工具會寫入、刪除或批次修改資料,回復功能取決於稽核記錄是否保存了修改前快照。批次修改前應開啟 GMC_DRY_RUN,破壞性操作應要求明確確認。稽核記錄檔會記錄請求與回應內容,應視為敏感資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Gmc Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Google Merchant Center MCP (gmc-mcp)

[PyPI] [Downloads] [Downloads/month] [GitHub stars] [CI] [Python] [License: MIT] [Ruff]

MCP server for Google Merchant Center, built on Merchant API v1. 126 tools, MIT-licensed, pip install-able. Drive your Google Shopping feed, products, inventory, Reports, promotions, returns, and account configuration in natural language from Claude Desktop, Claude Code, or any MCP-compatible client.

Where this fits in the GMC + MCP landscape

OptionTypeAPILicenseInstallTools
Adzviser / Catchr / Windsor.ai / PipedreamPaid hosted SaaSvariesproprietarysign-upvaries
archpeng/GMC-mcp-serverSelf-hostedContent API v2.1 (deprecated 2026-08)none declaredgit clone34
gmc-mcp (this package)Self-hostedMerchant API v1 (future-proof)MITpip install gmc-mcp126

Pick this if you want: future-proof API, an actual OSS license, PyPI install, a larger toolset, audit log + rollback + dry-run safety, and credentials that never leave your machine.

Built on Merchant API v1 (replaces Content API for Shopping; v1beta was discontinued 2026-02-28). Safe by default: every write is recorded to an append-only audit log with before snapshots, dry-run is one toggle away, and destructive bulk operations require an explicit confirm parameter.

Why this exists

Google Merchant Center (GMC) powers Google Shopping listings, Free Listings, Shopping Ads, Buy on Google checkout, YouTube Shopping, and more. Managing a feed of thousands of products through the GMC web UI is tedious, and writing one-off Python scripts against the Merchant API REST endpoints is slow.

There are existing MCP services for GMC, but they fit different niches:

  • Paid hosted SaaS (Adzviser, Catchr, Windsor.ai, Pipedream) — your data is proxied through their servers; monthly subscription.
  • archpeng/GMC-mcp-server — earliest self-hosted Python option (Feb 2026), but built on the deprecated Content API v2.1 which Google retires in August 2026, has no license declared, and isn't on PyPI.

gmc-mcp was built to fill the gap: a self-hosted package on the new Merchant API v1, MIT-licensed, on PyPI, with audit/rollback/dry-run safety and 126 tools across 19 modules.

The package gives Claude (or any MCP client) 126 tools that map directly onto the Merchant API v1 surface, so you can do things like:

  • "Show me every disapproved product, grouped by issue code."
  • "Bump US prices 5% on these 40 SKUs."
  • "Which products had impressions but zero clicks last week?"
  • "Roll back audit ID 8fc8dc42… — that update broke something."
  • "Compare this Shopify CSV against my GMC feed; what's missing?"

What's exposed

126 tools across 19 modules + 4 meta tools.

ModuleTools
productsgmc_list_products, gmc_get_product, gmc_insert_product, gmc_update_product, gmc_delete_product, gmc_bulk_delete_products, gmc_list_disapproved_products
inventorygmc_update_regional_inventory, gmc_update_local_inventory, gmc_list_regional_inventories, gmc_list_local_inventories
issuesgmc_list_account_issues, gmc_get_product_status, gmc_summarize_product_issues
reportsgmc_query_report, gmc_product_performance, gmc_price_competitiveness, gmc_best_sellers, gmc_zero_click_products, gmc_revenue_by_brand, gmc_category_performance, gmc_competitive_visibility_top_merchants, gmc_price_insights, gmc_demoted_products
promotionsgmc_list_promotions, gmc_get_promotion, gmc_insert_promotion
accountsgmc_get_account, gmc_get_business_info, gmc_update_business_info, gmc_list_users, gmc_add_user, gmc_remove_user, gmc_get_shipping_settings, gmc_update_shipping_settings, gmc_list_programs, gmc_request_program_review, gmc_get_program_review
regionsgmc_list_regions, gmc_get_region, gmc_create_region, gmc_update_region, gmc_delete_region
notificationsgmc_list_subscriptions, gmc_subscribe, gmc_unsubscribe
feedsgmc_list_datasources, gmc_get_datasource, gmc_create_supplemental_feed, gmc_create_primary_feed, gmc_delete_datasource, gmc_fetch_datasource
return_policiesgmc_list_return_policies, gmc_get_return_policy, gmc_create_return_policy, gmc_update_return_policy, gmc_delete_return_policy
homepagegmc_get_homepage, gmc_update_homepage, gmc_claim_homepage, gmc_unclaim_homepage
account_configgmc_get_business_identity, gmc_update_business_identity, gmc_get_checkout_settings, gmc_create_checkout_settings, gmc_update_checkout_settings, gmc_delete_checkout_settings, gmc_get_automatic_improvements, gmc_update_automatic_improvements, gmc_get_autofeed_settings, gmc_update_autofeed_settings, gmc_get_account_tax, gmc_update_account_tax, gmc_get_email_preferences, gmc_update_email_preferences, gmc_get_latest_tos, gmc_list_tos_agreement_states, gmc_accept_tos
quotasgmc_list_quotas
reviewsgmc_list_merchant_reviews, gmc_get_merchant_review, gmc_insert_merchant_review, gmc_delete_merchant_review, gmc_list_product_reviews, gmc_get_product_review, gmc_insert_product_review, gmc_delete_product_review
conversionsgmc_list_conversion_sources, gmc_get_conversion_source, gmc_create_conversion_source, gmc_update_conversion_source, gmc_delete_conversion_source, gmc_undelete_conversion_source
omnichannelgmc_list_omnichannel_settings, gmc_get_omnichannel_settings, gmc_create_omnichannel_settings, gmc_update_omnichannel_settings, gmc_request_inventory_verification, gmc_link_gbp_account, gmc_list_gbp_accounts
lfpgmc_lfp_list_stores, gmc_lfp_get_store, gmc_lfp_insert_store, gmc_lfp_delete_store, gmc_lfp_insert_inventory, gmc_lfp_insert_sale, gmc_lfp_get_merchant_state
mcagmc_list_relationships, gmc_get_relationship, gmc_update_relationship, gmc_create_aggregation, gmc_delete_aggregation, gmc_list_account_services, gmc_propose_account_service, gmc_approve_account_service, gmc_reject_account_service
bulkgmc_bulk_update_regional_prices, gmc_bulk_set_availability
diagnosticsgmc_health_check, gmc_rollback, gmc_export_all, gmc_diff_with_shopify
metagmc_describe_server, gmc_audit_lookup, gmc_audit_tail, gmc_set_dry_run

CLI also exposes: gmc-mcp run, auth-init, register-gcp, webhook, describe, version.

Install

bash
pip install gmc-mcp

For development:

bash
git clone https://github.com/kiwoongeom/gmc-mcpcd gmc-mcppip install -e ".[dev,test]"pre-commit install

Quick start

1. Enable the Merchant API and create a service account

  1. console.cloud.google.com → create / pick a project.
  2. APIs & Services → Library → enable Merchant API.
  3. IAM & Admin → Service Accounts → Create service account named gmc-mcp.
  4. Open the new service account → Keys → Add key → Create new key → JSON. Save it somewhere safe.

2. Add the service account to your Merchant Center

  1. merchants.google.com → top-right gear → Account access → People.
  2. Add user → enter the [email protected] email → grant Admin.
  3. Note the 10-digit Merchant Center ID in the top-right.

3. Configure

bash
cp .env.example .env# edit:#   GMC_ACCOUNT_ID=1234567890#   GMC_SERVICE_ACCOUNT_KEY=/abs/path/to/service-account.json

4. One-time GCP registration

Required before any v1 Merchant API call works for a new project.

bash
gmc-mcp register-gcp --developer-email [email protected]

5. Smoke-test

bash
gmc-mcp describe              # prints the resolved configpython examples/quickstart.py  # makes one read against the Merchant API

6. Wire into Claude

Drop this into %APPDATA%/Claude/claude_desktop_config.json (Desktop) or ~/.claude/settings.json (Code):

json
{  "mcpServers": {    "gmc": {      "command": "gmc-mcp",      "args": ["run"],      "env": {        "GMC_ACCOUNT_ID": "1234567890",        "GMC_SERVICE_ACCOUNT_KEY": "/abs/path/to/service-account.json"      }    }  }}

Restart Claude. Ask: "What account am I connected to?" — it should call gmc_describe_server.

OAuth instead of a service account

For acting on behalf of an end user (e.g. multi-tenant SaaS):

bash
# 1. In GCP, create OAuth client credentials (type: Desktop), download client_secret.json.gmc-mcp auth-init --client-secrets ./client_secret.json# follow the browser flow; a token JSON is saved to secrets/oauth-token.json.
# 2. Use itexport GMC_OAUTH_TOKEN=./secrets/oauth-token.jsongmc-mcp run

Transports

bash
gmc-mcp run                              # stdio (Claude Desktop default)gmc-mcp run --transport sse --port 8000  # SSE / HTTP (remote, Docker, hosted)

Or via Docker:

bash
docker build -t gmc-mcp .docker run --rm -p 8000:8000 \    -e GMC_ACCOUNT_ID=1234567890 \    -v $PWD/secrets:/secrets \    -e GMC_SERVICE_ACCOUNT_KEY=/secrets/service-account.json \    gmc-mcp

Audit log + rollback

GMC_DRY_RUN=true blocks writes, but still sends read requests, including the read-only Reports API POST reports:search. Report tools return real data; Merchant API errors are surfaced to the caller rather than reported as zero rows.

Every write logs a JSONL entry to GMC_AUDIT_LOG (default: ./logs/audit.jsonl). Each entry contains:

  • audit_id — UUID for lookup
  • op, method, url, request_body, response_status, response_body
  • before — pre-write snapshot when the tool fetched it (used by update_* and delete_*)
  • dry_run — whether the request was actually sent

Inspect from inside Claude:

> Show me my last 5 GMC writes.[gmc_audit_tail(limit=5) → ...]
> Look up audit ID abc123.[gmc_audit_lookup(audit_id="abc123") → ...]
> Roll back audit ID abc123, that update was wrong.[gmc_rollback(audit_id="abc123", confirm="ROLLBACK") → ...]

Dry-run

Two ways to enable:

bash
GMC_DRY_RUN=true gmc-mcp run
> Set dry-run on and update the price of SKU1 to $19.99.[gmc_set_dry_run(enabled=True) → ok][gmc_update_regional_inventory(...) → {"_dry_run": true, ...}]

Reads always go through; only writes are skipped.

Reports query examples

Paste into gmc_query_report:

sql
-- Top 50 by clicks last 7 daysSELECT offer_id, title, clicks, impressions, ctrFROM product_performance_viewWHERE date BETWEEN '2026-04-23' AND '2026-04-30'ORDER BY clicks DESC LIMIT 50
-- Disapproved products with reason codesSELECT id, offer_id, title, item_issuesFROM product_viewWHERE aggregated_reporting_context_status = 'NOT_ELIGIBLE_OR_DISAPPROVED'
-- You're priced higher than the benchmarkSELECT offer_id, title, price, benchmark_priceFROM price_competitiveness_product_viewWHERE price > benchmark_price LIMIT 100

Configuration reference

All config is via env vars (or .env). CLI flags --transport, --host, --port, --env override.

VarRequiredDefaultNotes
GMC_ACCOUNT_IDyes—10-digit Merchant Center ID
GMC_SERVICE_ACCOUNT_KEYone of—Path to service-account JSON
GMC_OAUTH_TOKENone of—Path to OAuth token JSON
GMC_SUBACCOUNT_IDno—When using an MCA
GMC_AUDIT_LOGno./logs/audit.jsonlAppend-only JSONL
GMC_PAGE_SIZEno100Default list page size
GMC_TIMEOUTno30Per-request seconds
GMC_DRY_RUNnofalseWrites go to audit only
GMC_LOG_LEVELnoINFODEBUG/INFO/WARNING/ERROR
GMC_TRANSPORTnostdiostdio or sse
GMC_HOSTno127.0.0.1SSE only
GMC_PORTno8000SSE only

Architecture

Claude (any MCP client)    │  JSON-RPC over stdio or SSE    ▼gmc-mcp server  ──►  audit.jsonl    │    │  HTTP + Bearer token    ▼merchantapi.googleapis.com  ──►  Google Merchant Center
  • auth.py — ServiceAccountAuth and OAuthUserAuth share an Auth protocol.
  • client.py — single MerchantClient with retries (5x w/ jitter), pagination helper, and write-audit hook.
  • tools/*.py — each module exposes a register(mcp, client) that registers @mcp.tool() functions.
  • audit.py — append-only JSONL, lookup by ID, supports before snapshots.
  • cli.py — gmc-mcp run | auth-init | register-gcp | webhook | describe | version.

Testing

bash
pytest                       # 100% offline; uses respx to mock HTTPpytest --cov=gmc_mcp         # with coverageruff check src testsmypy src/gmc_mcp

Roadmap

  • v0.3: webhook handler scaffolding (auto-respond to gmc_subscribe callbacks)
  • v0.3: native Merchant API v1 GA migration when Google releases it
  • v0.4: BigQuery export of Reports queries
  • v0.4: rule-based auto-fixers ("on disapproval, retry with corrected attribute")

Contributing

See CONTRIBUTING.md. PRs and issues welcome — this is the first open-source MCP for Google Merchant Center, so there's a lot of room for community input on which workflows deserve dedicated tools.

License

MIT — see LICENSE.


Search keywords: Google Merchant Center MCP, GMC MCP, Merchant API MCP, Google Shopping MCP, Shopping Ads MCP, free listings MCP, Claude Desktop Google Merchant Center, MCP for ecommerce, Shopify Google Merchant Center automation.

來源:README.md,提交 11b15e3

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

2
  1. v0.2.6最新Nov 6, 2026
  2. v0.2.5Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分