@dodopayments/opencode-plugin

中文文档
0.8.0发布于 2026/11/09MITES Module零依赖构建来源已验证近 30 天下载 2890

Dodo Payments agent skills and MCP servers for OpenCode.

原始使用文档
文档目录22 节
  1. What you get
  2. Install
  3. Claude Code
  4. Codex CLI
  5. Cursor
  6. Kiro
  7. Gemini CLI
  8. VS Code / GitHub Copilot
  9. OpenCode
  10. Included Skill
  11. Included MCP Server
  12. Sign-in and access
  13. Dodo CLI
  14. Enable / disable the MCP server
  15. OpenCode
  16. Claude Code, Codex CLI, Cursor
  17. A prompt to try first
  18. Local development
  19. Repository layout
  20. For maintainers
  21. Resources
  22. License

Dodo Payments Agent Plugin

License Version npm Discord

The official Dodo Payments plugin for AI coding agents. Installs the Dodo Payments integration skill and MCP server across Claude Code, Codex CLI, Cursor, VS Code / GitHub Copilot, Grok Build, Meta Muse Code, Gemini CLI, Antigravity, Junie, OpenCode, and more, from a single source of truth.

This plugin conforms to the Agent Plugins 1.0.0 specification: a root plugin.json, skills as immediate children of skills/, and MCP servers in mcp.json. Clients with native Agent Plugins support load it directly; the provider-specific manifests in this repo are generated compatibility shims for clients that do not.

What you get

  • Dodo Payments MCP server (dodopayments) - Documentation search plus live API access (payments, subscriptions, customers, products, refunds, licenses, usage). Authenticates via browser OAuth, no local credentials required.
  • Agent skill - One dodo-payments skill (listed below), written as a SKILL.md index with reference files your agent loads on demand when a task calls for them.

Install

ClientSkillsMCPHow
Claude Code✅✅Marketplace
Codex CLI / ChatGPT✅✅Marketplace
Cursor (and Grok Bot)✅✅Clone
VS Code / GitHub Copilot✅✅Plugins view · Copilot CLI
Grok Build✅✅grok plugin install
grok.com, xAI API—✅Connector / API tool
Meta Muse Code✅✅muse plugins install
Gemini CLI✅✅Extension
Google Antigravity✅✅agy plugin install
JetBrains Junie✅✅Extension
Kiro✅✅Power
OpenCode✅✅npm
Qwen Code, Devin, Goose, Factory Droid, Augment, OpenHands, OpenClaw, Hermes✅✅More clients
Cline, Kilo, Zed, Warp, Amp, Continue, Kimi, …✅✅npx skills + npx add-mcp
Claude.ai, ChatGPT, Perplexity, Mistral—✅Custom connector

Claude Code

claude plugins marketplace add dodopayments/dodo-agent-plugin
claude plugins install dodopayments@dodopayments

The MCP server signs in with OAuth, so there is no API key to paste. Your client starts the sign-in when the server is added or connected (run /mcp if it doesn't), and a Dodo Payments consent page opens in your browser: pick the business, mode and permissions. See Sign-in and access.

Codex CLI

Register the marketplace, then install the plugin:

codex plugin marketplace add dodopayments/dodo-agent-plugin
codex plugin add dodopayments@dodopayments

Verify:

codex plugin list     # dodopayments  installed, enabled
codex mcp list        # dodopayments
codex mcp login dodopayments    # browser OAuth

You can also install from inside the TUI: run codex, type /plugins, select the Dodo Payments marketplace and the dodopayments plugin, then choose Install plugin.

If you added the marketplace previously and the plugin doesn't appear, refresh it:

codex plugin marketplace upgrade dodopayments

Cursor

Manual install:

git clone https://github.com/dodopayments/dodo-agent-plugin.git ~/.cursor/plugins/local/dodo-agent-plugin

Restart Cursor. The plugin loads skills from skills/ and MCP servers from .mcp.json, as declared in .cursor-plugin/plugin.json.

Cursor 3.14.27 also recognises Agent Plugins 1.0.0 directly: its agent host carries both spec schema URLs and the spec's own name regex, and accepts either .cursor-plugin/marketplace.json or .claude-plugin/marketplace.json as a marketplace source. The generated .cursor-plugin/plugin.json is kept as belt-and-braces for older builds.

Prior to v0.5.0 this clone produced a plugin with no working skills: skills/ contained symlinks into a git submodule that a plain git clone does not fetch. Skills are now vendored as real files, so the command above works as documented. If you installed an earlier version, re-clone.

Kiro

Kiro reads the Agent Plugins manifest natively and loads this as a Power:

git clone https://github.com/dodopayments/dodo-agent-plugin.git

Point Kiro at the cloned folder. Skills load from skills/, MCP servers from mcp.json, and Kiro-specific presentation comes from the dev.kiro extension namespace in plugin.json.

Gemini CLI

gemini extensions install https://github.com/dodopayments/dodo-agent-plugin

gemini-extension.json at the repo root is the manifest, and Gemini auto-discovers the skills/ directory next to it. Verified on Gemini CLI 0.63.0: gemini skills list shows the skill and gemini mcp list shows the server.

VS Code / GitHub Copilot

git clone https://github.com/dodopayments/dodo-agent-plugin.git

Then open the Chat view, go to Plugins, and add the cloned folder. Skills load from skills/, and the MCP server loads from .mcp.json.

VS Code 1.125.1 does not key off the Agent Plugins $schema - the string appears nowhere in its bundle. Its loader picks a manifest by probing, in order, .plugin/plugin.json, then .claude-plugin/plugin.json, then a root plugin.json, and defaults MCP to .mcp.json rather than mcp.json. Because this repo ships a generated .claude-plugin/plugin.json, VS Code loads it through that branch. Everything works, the skill and the MCP server, via the compatibility manifests rather than the spec ones.

OpenCode

OpenCode distributes via npm. Add the plugin to your opencode.json:

{
    "$schema": "https://opencode.ai/config.json",
    "plugin": ["@dodopayments/opencode-plugin"]
}

Restart OpenCode. The MCP server (dodopayments) is registered automatically via the plugin's config hook as a native remote server. No manual mcp block required. Run opencode mcp auth dodopayments to open the Dodo Payments consent page.

The skill needs the package installed locally plus one extra line. OpenCode does not scan installed packages for skills, so point it at the package's skills/ directory yourself. skills.paths entries resolve against the project directory, so the package must be present in the project's node_modules - OpenCode's own plugin cache is not the same location:

npm install --save-dev @dodopayments/opencode-plugin
{
    "$schema": "https://opencode.ai/config.json",
    "plugin": ["@dodopayments/opencode-plugin"],
    "skills": {
        "paths": ["node_modules/@dodopayments/opencode-plugin/skills"]
    }
}

An absolute path works too, and avoids the local-install requirement.

Verify with opencode run "List every skill available to you by name." - you should see dodo-payments (see Included Skill). A skills path that does not exist is ignored silently, so check rather than assume.

Versions before 0.5.0 documented the skills as auto-discovered. They were not: nothing in OpenCode scans an installed package, so OpenCode users had the MCP servers but no skills. Setting config.skills from the plugin's config hook does not fix this either - the skill index is built before config hooks run, so it never registers anything.

Included Skill

One skill, dodo-payments. Its SKILL.md is a short index; the details live in reference files that your agent loads only when the task needs them.

ReferenceCovers
checkoutCheckout Sessions, payment links, and overlay checkout
mobile-checkoutIn-app checkout for React Native, Flutter, iOS, and Android
subscriptionsSubscription lifecycle, trials, plan changes, proration, on-demand charges
webhooksReceiving and verifying webhooks via the Standard Webhooks spec
usage-billingMeters, event ingestion, aggregation, and per-unit pricing
creditsCredit entitlements, balances, ledger, rollover, overage, meter-based deduction
license-keysLicense key activation, validation, and instance management
productsProducts, pricing, add-ons, collections, images, digital delivery
discountsDiscount codes, eligibility, stacking, subscription-cycle limits
localized-pricingLocalized pricing, adaptive currency, and purchasing power parity
customersCustomers, self-service portal, payment methods, wallets
refunds-disputesRefunds, disputes and chargebacks, access reconciliation
framework-adaptersOfficial @dodopayments/* handlers for Next.js, Express, Hono, Astro, Remix, SvelteKit, Nuxt, Fastify, TanStack, Bun, Convex
better-authThe @dodopayments/better-auth plugin for customer sync, checkout, portal
billing-sdkBillingSDK React components for pricing tables and billing UI
testing-go-liveTest mode, test payment methods, webhook testing, production launch checklist
mcpUsing the MCP server, test-mode safety rules, auth, troubleshooting

Skill source: dodopayments/skills (dodo-payments/dodo-payments), vendored into skills/ as real files. Provenance (upstream commit and applied transforms) is recorded in .skills-source.json.

Included MCP Server

ServerPurposeAuth
dodopaymentsDocumentation search and live API accessOAuth (browser)

Tools:

ToolWhat it does
search_docsSearches the guides
read_docs_pageReturns a docs page as markdown
searchFinds SDK and API methods
executeRuns TypeScript SDK code against the signed-in account, in a sandbox
feedbackSends a note to Dodo, with emails, IDs and keys removed first

The server speaks Streamable HTTP over HTTPS, and every manifest dials it natively - no npx mcp-remote bridge and no Node dependency. The canonical mcp.json uses the spec's type: "streamable-http"; the generated .mcp.json (Claude Code, Cursor, VS Code, Grok Build, Devin, Goose, Droid) uses the same endpoint spelled type: "http", the name that dialect uses; Muse, Antigravity, Junie and Gemini get their own spellings from the generator.

Sign-in and access

The MCP server signs in with OAuth. No config in this plugin holds an API key, and no step asks you to paste one.

  1. The server returns 401 until the client signs in, so the client starts OAuth when the server is added or connected and opens a Dodo Payments consent page in your browser. Some clients start it from a command: /mcp in Claude Code, codex mcp login dodopayments, opencode mcp auth dodopayments, muse mcp login dodopayments, or devin mcp login dodopayments.
  2. Sign in, then pick the business, the mode (test or live) and the permissions to grant.
  3. The client stores the token. To switch to another business or mode, sign out of the server in your client and sign in again.

To review or revoke access, open the Dodo Payments dashboard at Settings > Connected Apps.

Every client config in this repo dials https://mcp.dodopayments.com/mcp directly, sets no headers, and lets the client run OAuth discovery itself. A host that cannot run MCP OAuth can use https://mcp.dodopayments.com/mcp?auth=optional: search_docs, read_docs_page, search and feedback work without an account, and execute returns 401. Today that is the xAI API (see Grok).

Dodo CLI

The skills use the Dodo CLI for local webhook testing. It uses the same OAuth sign-in:

npm i -g dodopayments-cli   # browser sign-in needs v3.7.0 or later
dodo login                  # sign in with the browser
dodo whoami                 # show the stored sign-in

Over SSH or with no browser, run dodo login --device in place of dodo login, and enter the code on another device. To sign out when you finish, run dodo logout all.

Enable / disable the MCP server

The MCP server ships enabled by default. You can turn it off.

OpenCode

The npm plugin reads an environment variable before registering the MCP server:

Env varEffect
DODO_DISABLE_API_MCP=1Skips registering dodopayments

DODO_DISABLE_KNOWLEDGE_MCP is still accepted and does nothing.

Truthy values: 1, true, yes, on (case-insensitive). Export the var in your shell profile or set it inline:

DODO_DISABLE_API_MCP=1 opencode

Claude Code, Codex CLI, Cursor

These clients load MCPs from the static .mcp.json shipped with the plugin. To disable the server, override its entry in your own project-level config and set "enabled": false.

Claude Code - edit .mcp.json at your project root (or run claude mcp disable dodopayments):

{
    "mcpServers": {
        "dodopayments": {
            "type": "http",
            "url": "https://mcp.dodopayments.com/mcp",
            "enabled": false
        }
    }
}

Run /reload-plugins to apply.

Codex CLI / Cursor - the same enabled: false pattern works in any project-level .mcp.json that overrides the plugin's bundled file. Restart the client after editing.

Per-server toggles inside the Claude Code /plugin UI are tracked upstream in anthropics/claude-code#27105 and #46373. Until those land, the enabled: false override above is the supported path.

A prompt to try first

Once the plugin is active, try:

Set up Dodo Payments webhook handlers in my Next.js app for payment.succeeded and subscription.active events.

Your agent will load the dodo-payments skill's webhooks reference, use the server's search_docs tool to pull the latest payload shapes, and write a handler with signature verification following the Standard Webhooks spec.

Local development

git clone https://github.com/dodopayments/dodo-agent-plugin.git
cd dodo-agent-plugin

No submodules, no build step - skills/ is vendored as real files.

Validate the Claude Code plugin and marketplace:

claude plugin validate .

Load the plugin directly for a dev session:

claude --plugin-dir ./dodo-agent-plugin

Verify everything before pushing:

npm run verify     # generated artifacts in sync + Agent Plugins conformance

Repository layout

PathRole
plugin.jsonCanonical. Agent Plugins v1.0.0 manifest and the version source of truth
mcp.jsonCanonical. Agent Plugins v1.0.0 MCP config
skills/Canonical. Skills, vendored as real files; the declared set lives in .skills-source.json
overlays/*.jsonHand-authored provider extras the closed spec schema cannot express
.claude-plugin/, .cursor-plugin/, .codex-plugin/, .muse-plugin/, .agents/, .mcp.json, gemini-extension.json, plugins/dodopayments/, providers/Generated. Do not hand-edit - run npm run build
scripts/build.mjsThe single generator (--check for drift)
scripts/conformance.mjsAgent Plugins conformance validator
.skills-source.jsonUpstream provenance for the vendored skills

Skills are authored in dodopayments/skills and vendored here. A weekly workflow re-syncs them and opens a PR; run it on demand with the Sync skills from upstream workflow dispatch.

For maintainers

The repo is configured to publish the OpenCode npm package on every GitHub Release.

One-time setup (already done for this repo):

  • npm scope @dodopayments exists and is owned by Dodo Payments.
  • npm Trusted Publishing (OIDC) is configured for @dodopayments/opencode-plugin against publish-opencode.yml. No npm token is stored in the repo.

Release workflow:

  1. Bump version in plugin.json (the single source of truth).
  2. Run npm run build to propagate it to every generated manifest.
  3. Run npm run verify, then commit and tag.
  4. Create a GitHub Release - the Publish @dodopayments/opencode-plugin workflow publishes to npm with provenance.

Manual dry-run:

  • Workflow dispatch with dry_run: true to validate the release pipeline without publishing.

CI checks:

  • Verify runs on every pull request and push to main: artifact drift, Agent Plugins conformance, live JSON Schema validation, an "every declared skill, zero symlinks" assertion, per-client manifest checks (Muse, Antigravity, Junie, Gemini), and an npm payload check.
  • The release workflow re-runs the same gates before publishing.

Resources

License

MIT - see LICENSE.

版本与发布记录

@dodopayments/opencode-plugin 共发布 16 个版本,首次发布于 2026/04/23;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.8.0latest2026/11/093 天前
0.7.02026/11/0211 天前
0.6.52026/10/091 个月前
0.6.42026/10/091 个月前
0.6.32026/10/081 个月前
0.6.22026/10/081 个月前

关于 @dodopayments/opencode-plugin 的常见问题

@dodopayments/opencode-plugin 是什么?

Dodo Payments agent skills and MCP servers for OpenCode.

如何安装 @dodopayments/opencode-plugin?

在项目目录运行 npm install @dodopayments/opencode-plugin,或使用 pnpm add / yarn add / bun add。

@dodopayments/opencode-plugin 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dodopayments__opencode-plugin 是否存在。

@dodopayments/opencode-plugin 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dodopayments/opencode-plugin 可以商用吗?

@dodopayments/opencode-plugin 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dodopayments/opencode-plugin 的下载量有多少?

根据 npm 官方下载统计,@dodopayments/opencode-plugin 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,890 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dodopayments/opencode-plugin 还在维护吗?

最新版本 0.8.0 发布于 2026/11/09(3 天前);至今共发布 16 个版本,其中过去 12 个月发布了 16 个;首次发布于 2026/04/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。