Cws

io.github.mikusnuz由 GitHub 账号 mikusnuz 发布v2.0.2更新于 Nov 3, 2026

MCP server for Chrome Web Store — extension upload, publish, status, and rollout

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

在 MCP 客户端中管理 Chrome 网上应用店扩展:上传 ZIP 草稿、发布、查看审核状态、取消提交并设置分批发布比例。

可以做什么
  • 将构建好的 ZIP 作为草稿更新上传到已有的 Chrome 网上应用店项目
  • 发布或提交审核,可设置发布类型、发布比例、跳过审核与警告阻断选项
  • 查看审核状态、版本与部署比例,并取消待审核的提交
  • 为符合条件的扩展设置分批发布比例
  • 通过开发者后台读取并保存草稿商品信息(描述、类别、主页与支持网址)
适用场景
适合需要发布 Chrome 扩展的场景:让助手推送新版本 ZIP、提交审核、跟踪状态、逐步提高分批发布比例,或无需手动打开后台即可修改草稿商品信息。
运行要求
以 npm 包 cws-mcp 在本地运行(npx 或 node),需要 Node.js 20 或更高版本,并已安装 Google Chrome。需要 Chrome 网上应用店 API 的 Google OAuth2 凭据:CWS_CLIENT_ID、CWS_CLIENT_SECRET 和 CWS_REFRESH_TOKEN,通过带 chromewebstore 权限范围的桌面端 OAuth 流程获取。可选 CWS_PUBLISHER_ID、CWS_ITEM_ID 和 CWS_DASHBOARD_PROFILE_DIR。后台相关工具需要已登录的 Chrome 配置文件。
安装前请注意
需要三个 Google 密钥(CWS_CLIENT_ID、CWS_CLIENT_SECRET、CWS_REFRESH_TOKEN),它们拥有扩展的发布权限,应保存在客户端的密钥设置中。发布、取消和调整发布比例会影响线上商品并可能触发审核;请留意跳过审核与警告阻断的默认值。后台工具通过 Playwright 操作已登录的 Chrome 配置文件,会使用该配置文件的会话。商品信息修改只作用于当前后台草稿。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Cws,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

cws-mcp

[npm version]

한국어

[MCP Badge]

MCP server for Chrome Web Store extension management. Upload, publish, and manage Chrome extensions directly from Claude Code or any MCP client.

When to Use

Use this MCP when you need to:

  • "Upload a new version of my Chrome extension" — build your ZIP and use the upload tool to push it as a draft
  • "Publish my extension to the Chrome Web Store" — use publish to submit for review and go live
  • "Check the review status of my extension" — use status to see review state, version, and deploy percentage
  • "Update my extension's description or category" — use update-metadata to save and verify the draft listing
  • "Cancel a pending submission" — use cancel to withdraw a submission under review
  • "Set up staged rollout for my extension" — use publish with staged rollout, then deploy-percentage to ramp up

Tools

ToolDescription
uploadUpload a ZIP file to Chrome Web Store (update existing item draft)
publishSubmit/publish with publish type, rollout percentage, skip-review, and blockOnWarnings
statusFetch the current status including review state, deploy percentage, and version
cancelCancel a pending submission
deploy-percentageSet staged rollout percentage (0-100, must exceed current target)
getAlias of status: v2 publication status, not listing text
get-metadata-uiRead the current draft description, category, homepage URL, and support URL from the dashboard
update-metadataSave those four supported draft fields through the dashboard and verify them after reload
update-metadata-uiAlias of update-metadata

API Coverage

An upload returning IN_PROGRESS is pending: poll status until lastAsyncUploadState is SUCCEEDED before publishing. FAILED is a tool error. A blocked publish retains error.details, including the warnings that need attention.

This MCP server covers all Chrome Web Store API v2 endpoints:

v2 EndpointMCP Tool
media.uploadupload
publishers.items.publishpublish
publishers.items.fetchStatusstatus
publishers.items.cancelSubmissioncancel
publishers.items.setPublishedDeployPercentagedeploy-percentage

All API requests use v2. The public API has no listing-text read/write endpoints; dashboard tools use Playwright and a separate signed-in Chrome profile. Saving listing fields never submits for review. Missing fields, unmatched categories, and unconfirmed saves return errors instead of success.

Setup

Requires Node.js 20 or newer, matching the Playwright runtime requirement.

1. Create OAuth2 Credentials

  1. Go to Google Cloud Console
  2. Create a project (or select existing)
  3. Enable Chrome Web Store API
  4. Create OAuth2 credentials (Desktop app type)
  5. Note your Client ID and Client Secret

2. Get Refresh Token

Follow Google's OAuth flow for desktop apps using a local loopback redirect URI, PKCE, and the scope https://www.googleapis.com/auth/chromewebstore. Request offline access (access_type=offline; use prompt=consent when you need a new refresh token). Exchange the authorization code using the same redirect URI and keep the refresh token in your MCP client's secret/environment settings. The former copy-and-paste OOB redirect is no longer supported by Google.

3. Configure MCP

Add to your Claude Code MCP settings (~/.claude/settings.local.json):

json
{  "mcpServers": {    "cws-mcp": {      "command": "node",      "args": ["/path/to/cws-mcp/dist/index.js"],      "env": {        "CWS_CLIENT_ID": "xxxxx.apps.googleusercontent.com",        "CWS_CLIENT_SECRET": "GOCSPX-xxxxx",        "CWS_REFRESH_TOKEN": "1//xxxxx",        "CWS_PUBLISHER_ID": "me",        "CWS_ITEM_ID": "your-extension-id"      }    }  }}

Or install globally via npm:

json
{  "mcpServers": {    "cws-mcp": {      "command": "npx",      "args": ["-y", "cws-mcp"],      "env": { ... }    }  }}

Environment Variables

VariableRequiredDescription
CWS_CLIENT_IDYesGoogle OAuth2 Client ID
CWS_CLIENT_SECRETYesGoogle OAuth2 Client Secret
CWS_REFRESH_TOKENYesOAuth2 Refresh Token
CWS_PUBLISHER_IDNoPublisher ID (default: me)
CWS_ITEM_IDNoDefault extension item ID
CWS_DASHBOARD_PROFILE_DIRNoBrowser profile path for UI automation (default: ~/.cws-mcp-profile)

Usage Examples

Check extension status

Use the cws-mcp status tool

Upload and publish

1. Use cws-mcp upload with zipPath="/path/to/extension.zip"2. Use cws-mcp publish

Hold publication until after approval

Use cws-mcp publish with:- publishType="STAGED_PUBLISH"

Publish with skip-review

Use cws-mcp publish with skipReview=true

STAGED_PUBLISH holds an approved submission for a later publication; it is not the rollout percentage. Use deployPercentage separately for an eligible extension's gradual rollout.

Stop publishing on validation warnings

Use cws-mcp publish with blockOnWarnings=true

The default is false, matching the API. Inspect returned warningInfo.warnings even when publishing succeeds.

Read or save listing fields without submitting for review

Use cws-mcp get-metadata-ui with headless=falseUse cws-mcp update-metadata with:- description="..."- category="Developer Tools"- homepageUrl="https://example.com"- supportUrl="https://example.com/support"

Notes:

  • category must match the visible option label exactly in the current dashboard language; English and Korean field labels are supported.
  • These tools read/save the current dashboard draft, not the published listing or an arbitrary locale. Select the intended localization in the dashboard first; ambiguous fields fail safely.
  • Change title, summary, and default locale in manifest.json / localized messages, rebuild, and upload the ZIP. Use the dashboard directly for icons and screenshots.
  • First run with headless=false if login is required.
  • Browser profile path defaults to ~/.cws-mcp-profile (override with CWS_DASHBOARD_PROFILE_DIR).
  • Google Chrome must be installed. Dashboard UI changes can require selector updates; unverified saves return errors. Verify the dashboard before retrying an ambiguous failure.

Staged rollout

1. Use cws-mcp publish with deployPercentage=102. Monitor approval/publication with status3. Use cws-mcp deploy-percentage with percentage=504. Use cws-mcp deploy-percentage with percentage=100

Note: deploy-percentage is only available for extensions with 10,000+ seven-day active users. The new percentage must always be higher than the current target.

Migrating from 1.x to 2.0

Google shuts down API v1 on October 15, 2026. Version 2.0 no longer calls it:

  • get now returns v2 status. Its old projection argument is rejected; use get-metadata-ui for draft listing text. Published listing text is not exposed by v2.
  • update-metadata now uses the same dashboard workflow as update-metadata-ui and therefore needs Chrome login, not just an API token.
  • Raw metadata, title, summary, and defaultLocale inputs are rejected with guidance; unsupported inputs are never silently ignored.
  • storeIconPath is no longer accepted as a working upload. The previous generic file-input approach could not verify which asset it changed; upload the icon in the Developer Dashboard instead.

License

MIT

来源:README.md,提交 a10f5f7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v2.0.2最新Oct 19, 2026
  2. v2.0.0Oct 8, 2026
  3. v1.4.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分