plugin.json 和 mcp.json 加载它。不支持该规范的旧客户端则通过生成的兼容性 manifests 加载相同内容。
三种基础能力,一个 plugin。 Agent Plugin 包含你所需的一切:
- API MCP server — 实时访问 payments、subscriptions、customers、products、refunds、licenses 和 usage。通过浏览器 OAuth 进行身份验证(无需本地 keys)。
- Knowledge MCP server — 跨所有 Dodo Payments 文档进行语义搜索。无需 credentials。
- 十七个 agent skills — agent 按需加载的速查表,涵盖 checkout、subscriptions、webhooks、usage-based 和 credit-based billing、license keys、product catalog、discounts、localized pricing、mobile checkout、refunds 和 disputes、customer management、framework adapters、BillingSDK、Better Auth、testing 和 go-live,以及 best practices。
安装 plugin
在下方选择你的 coding agent。每种安装方式都会添加两个 MCP servers;除 Gemini CLI 外,其他客户端还会添加十七个 skills。Claude Code
Claude Code
从 marketplace 安装:API MCP server 默认使用浏览器 OAuth——安装时无需 keys。agent 首次调用 Dodo tool 时,系统会提示你登录。
Dodo Agent Plugin on GitHub
源代码、配置选项和本地开发说明
Codex CLI
Codex CLI
Codex 分两步安装 plugins:先从 shell 注册 marketplace,再在 Codex TUI 内安装 plugin。安装 plugin 后,两个 MCP servers 和全部十七个 skills 都会自动注册。如果你之前已添加 marketplace,但 plugin 没有显示在
1
Register the marketplace
2
Install from the Codex TUI
打开 Codex 并运行 然后输入
/plugins slash command:/plugins,切换到 Dodo Payments marketplace,选择 dodopayments plugin,并选择 Install plugin。Codex CLI 没有
codex plugin install subcommand——plugin 安装始终通过 TUI 内的 /plugins 流程完成。请参阅 Codex 官方 plugins 文档。/plugins 下方,请刷新它:Cursor
Cursor
手动安装——将 repo clone 到 Cursor 的本地 plugins 目录:重启 Cursor。plugin 会从
skills/ 加载 skills,并从 .mcp.json 加载 MCP servers,这些内容在 .cursor-plugin/plugin.json 中声明。新版 Cursor 也能直接识别 Agent Plugins 1.0.0,并接受
.cursor-plugin/marketplace.json 或 .claude-plugin/marketplace.json 作为 marketplace source。该 plugin 提供 .claude-plugin/marketplace.json——请使用该路径。生成的 .cursor-plugin/plugin.json 会保留给旧版本使用。OpenCode
OpenCode
OpenCode 通过 npm 分发。将 plugin 添加到你的 重启 OpenCode。两个 MCP servers(相对
opencode.json:dodopayments-api、dodo-knowledge)会通过 plugin 的 config hook 自动注册。无需手动添加 mcp block。Skills 还需要额外添加一行。 OpenCode 不会扫描已安装的 packages 来查找 skills,因此请自行将其指向 package 的 skills/ 目录:skills.paths 条目会相对于 project directory 解析,因此 package 必须存在于该项目的 node_modules 中——OpenCode 自己的 plugin cache 位于其他位置。绝对路径同样有效,并且可以避免本地安装要求。VS Code / GitHub Copilot
VS Code / GitHub Copilot
将 repo clone 到任意位置,然后注册它:打开 Chat view,进入 Plugins,然后添加 clone 的文件夹。你也可以直接在 key 是路径,value 用于启用它。绝对路径和
settings.json 中注册它:~/ 都有效;相对路径会相对于每个 workspace folder 解析。该设置会实时读取,因此运行中的窗口无需重启即可应用。Skills 从 skills/ 加载,两个 MCP servers 都从 .mcp.json 加载。chat.pluginLocations 标记为实验性,并且属于受限设置,因此 workspace 必须受信任才能应用。Agent-plugin 支持整体上仍是 preview feature,由 chat.plugins.enabled 控制,该功能默认开启——只有在组织通过 policy 禁用它时,才需要设置此项。VS Code 不会根据 Agent Plugins
$schema 进行识别。其 loader 会依次检查 .plugin/plugin.json、.claude-plugin/plugin.json,然后检查根目录 plugin.json,并将 MCP 默认设置为 .mcp.json,而不是 mcp.json。由于此 repo 提供了生成的 .claude-plugin/plugin.json,VS Code 会通过该兼容分支加载它,并获得 mcp-remote bridge,而不是 mcp.json 中的原生 transports。一切都能正常工作——只是路径不同。Kiro
Kiro
Kiro 原生读取 Agent Plugins manifest,并将其加载为 Power。Skills 从
1
Clone the repository
2
Open the Powers panel
在 Kiro 中,打开 Powers panel——即带闪电图标的 Ghosty 图标。
3
Import the folder
选择 Add Custom Power → Import power from a folder,选择 clone 的目录(包含
plugin.json 的目录),然后点击 Install。skills/ 加载,MCP servers 从 mcp.json 加载,Kiro 专属 presentation 则来自 plugin.json 中的 dev.kiro extension namespace。对于 Agent Plugins 格式的 plugins,Kiro 会在内部管理 MCP servers——它们不会写入用户级别的
~/.kiro/settings/mcp.json,因此不要期待在那里找到它们。Kiro 也可以直接从 GitHub URL 安装 Power;请参阅 Kiro 安装文档。Gemini CLI (MCP only)
Gemini CLI (MCP only)
Gemini CLI 没有 agent-skill primitive,因此只能使用两个 MCP servers——十七个 skills 不可用。重启 Gemini CLI。repo 根目录中的
dodo-knowledge 仍然覆盖 skills 所提供功能中的很大一部分,并且会自动保持最新。gemini-extension.json 就是 manifest。使用其他 agent?MCP Server 和 Agent Skills 指南涵盖 Claude Desktop、Windsurf、Cline、Zed 以及任何兼容 MCP 的客户端。
你将获得什么
安装 plugin 后,你的 agent 就可以访问两个 MCP servers 和十七个 skills。MCP servers
两个 servers 都使用 Streamable HTTP。规范的
mcp.json 以原生方式声明它们(type: "streamable-http"),Codex CLI 和 Kiro 等原生支持该规范的客户端会使用这种方式。生成的兼容性 manifest .mcp.json 则通过 mcp-remote 连接同样的两个 endpoints,因此也能在无法直接连接 Streamable HTTP 的客户端中运行——Claude Code、VS Code,以及通过上文记录的 git-clone 安装方式安装的 Cursor,其 .cursor-plugin/plugin.json 会指向 .mcp.json。
Agent skills
Skills 会自动加载——agent 检测到相关任务后会选择正确的 skill。完整列表和单独的安装说明请参阅 Agent Skills 文档。
首先尝试此 prompt
plugin 激活后,请尝试:webhook-integration skill,使用 dodo-knowledge MCP 获取最新的 payload shapes,并按照 Standard Webhooks spec 编写包含 signature verification 的 handler。
客户端支持
支持 Agent Plugin 安装的客户端
一次安装即可连接两个 MCP servers,并在具备 skill primitive 的每个客户端上启用 skills。- OpenCode 需要额外添加一个
skills.paths条目,之后十七个 skills 才会加载——请参阅上方的安装部分。 - Gemini CLI 没有 agent-skill primitive,因此 skills 按设计在其中不可用。
其他兼容 MCP 的客户端
这些客户端不支持 Agent Plugin 安装。请手动配置两个 MCP servers,并在支持的情况下通过 Skills CLI 添加 skills。为 agents 打造的文档
每个 Dodo Payments 文档页面都提供了针对 AI 使用进行优化的格式:- 完整文档索引:
docs.dodopayments.com/llms.txt——提供完整文档索引,用于上下文摄取。 - 纯 markdown:在任意文档 URL 后追加
.md,即可获取原始 markdown 版本(例如/api-reference/introduction.md)。 - Source repository:
github.com/dodopayments/dodo-docs——clone 后即可进行离线索引。
你的 agent 可以做什么
安装 plugin 后,你的 coding agent 可以:- 创建 checkout sessions 和 payment links——一次性 payments 和 subscriptions
- 端到端搭建 subscription 和 usage-based billing——Subscriptions、Usage-based billing、Credit-based billing
- 生成符合 Standard Webhooks 规范的 handlers并进行 signature verification——Webhooks
- 使用官方 adapters 在你的 framework 中挂载 route handlers——Framework adaptors
- 接入 BillingSDK React components,用于 pricing tables 和 subscription management——BillingSDK
- 编写 digital products 的 license-key flows——License keys
- 实现 credit-based billing,支持 entitlements、balances、rollover 和 overage——Credits
- 使用 add-ons 和 collections 构建并管理 product catalog——Products、Add-ons、Product collections
- 添加 discounts 和 localized pricing——Discount codes、Localized pricing、Adaptive Currency
- 为 React Native、Flutter、iOS 和 Android 发布 mobile in-app checkout——Mobile integration
- 处理 refunds、disputes 和 customer self-service——Refunds、Disputes、Customer portal
- 安全地测试 integration 并上线——Test mode vs live mode
安全与最佳实践
- 先使用 test mode。 上线前使用
dodo_test_...keys 在 sandbox 中测试 integration。请参阅 Test Mode vs Live Mode。 - OAuth 是默认方式。 Agent Plugin 通过浏览器 OAuth 进行身份验证(无需本地 secrets)。只有在确有需要时才使用 API-key mode——请参阅下方的 Configure 部分。
- 审查 agent 生成的代码。 始终确认 webhook handlers 按照 Standard Webhooks spec 包含 signature verification。
使用 API key 配置
默认情况下,Agent Plugin 使用带浏览器 OAuth 的远程 MCP server——无需本地 credentials。如果你的 workflow 需要本地 API key(例如 CI environments、headless servers),可以切换到 stdio mode。Local API key mode — Claude Code
Local API key mode — Claude Code
在 Claude Code 中打开 运行
/plugins,选择 Dodo Payments,然后选择 Configure options。填写:dodo_api_key——你的dodo_test_...或dodo_live_...keydodo_webhook_key——你的 webhook signing secretdodo_environment——test_mode或live_mode
.mcp.json,将 dodopayments-api 指向本地 stdio server:/reload-plugins,将更改应用到当前 session。Local API key mode — OpenCode
Local API key mode — OpenCode
在 重启 OpenCode 以应用更改。
opencode.json 中自行声明 dodopayments-api——你的 entry 会覆盖 plugin 的默认 remote server:后续步骤
MCP Server
两个 MCP servers 的完整参考——所有支持的客户端、配置和可用 tools
Agent Skills
单独的 skill 安装、skill reference 和各 agent 的设置说明
Sentra IDE Assistant
面向 VS Code、Cursor 和 Windsurf 的 AI billing assistant——在 editor 中提问、构建和规划
API Reference
所有 Dodo Payments endpoints 的完整 OpenAPI reference