用于桨式计费的MCP服务器
桨式计费 是开发商第一个有记录的商家。我们通过一个统一的API来处理支付、税务、订阅和指标。
这是一个 模型上下文协议(MCP) 服务器,为LLM和AI代理提供用于与Paddle API交互的工具。
重要提示: 此MCP服务器与Paddle Billing配合使用。它不支持Paddle Classic。要使用Paddle Classic,请参阅: 桨经典API参考

特性
MCP服务器与Paddle API几乎等同,允许AI助手和代理:
- 管理您的完整Paddle目录
- 查看客户、购买和配置信息
- 处理订阅、付款和退款工作流程
- 调试计费和订单管理问题
- 直接在对话中创建和调整交易
- 生成财务报告,以获取财务和运营见解
- 更快地实施和测试Paddle集成
可用工具
MCP服务器可以使用以下工具对您的Paddle帐户执行操作:
Products
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出产品 | list_products | ✅ | ✅ |
| 创建产品 | create_product | ✅ | ❌ |
| 获取产品 | get_product | ✅ | ✅ |
| 更新产品 | update_product | ❌ | ❌ |
Prices
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 标价 | list_prices | ✅ | ✅ |
| 创建价格 | create_price | ✅ | ❌ |
| 获取价格 | get_price | ✅ | ✅ |
| 更新价格 | update_price | ❌ | ❌ |
| 预览价格 | preview_prices | ✅ | ❌ |
Discounts
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出折扣 | list_discounts | ✅ | ✅ |
| 创建折扣 | create_discount | ✅ | ❌ |
| 享受折扣 | get_discount | ✅ | ✅ |
| 更新折扣 | update_discount | ❌ | ❌ |
Discount Groups
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出折扣组 | list_discount_groups | ✅ | ✅ |
| 创建折扣组 | create_discount_group | ✅ | ❌ |
| 获取折扣组 | get_discount_group | ✅ | ✅ |
| 更新折扣组 | update_discount_group | ❌ | ❌ |
| 存档折扣组 | archive_discount_group | ❌ | ❌ |
Customers
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出客户 | list_customers | ✅ | ✅ |
| 创建客户 | create_customer | ✅ | ❌ |
| 寻找客户 | get_customer | ✅ | ✅ |
| 更新客户 | update_customer | ❌ | ❌ |
| 列出客户的贷方余额 | list_credit_balances | ✅ | ✅ |
Addresses
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出客户的地址 | list_addresses | ✅ | ✅ |
| 为客户创建地址 | create_address | ✅ | ❌ |
| 获取客户的地址 | get_address | ✅ | ✅ |
| 更新客户的地址 | update_address | ❌ | ❌ |
Businesses
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 为客户列出业务 | list_businesses | ✅ | ✅ |
| 为客户创建业务 | create_business | ✅ | ❌ |
| 为客户做生意 | get_business | ✅ | ✅ |
| 为客户更新业务 | update_business | ❌ | ❌ |
Transactions
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出交易记录 | list_transactions | ✅ | ✅ |
| 创建交易 | create_transaction | ✅ | ❌ |
| 获取交易 | get_transaction | ✅ | ✅ |
| 更新交易 | update_transaction | ❌ | ❌ |
| 预览交易 | preview_transaction_create | ✅ | ❌ |
| 修改已开票或已完成交易的客户信息 | revise_transaction | ❌ | ❌ |
| 获取交易的PDF发票 | get_transaction_invoice | ✅ | ✅ |
Adjustments
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列表调整 | list_adjustments | ✅ | ✅ |
| 创建调整 | create_adjustment | ✅ | ❌ |
| 获取PDF信用票据以进行调整 | get_adjustment_credit_note | ✅ | ✅ |
Subscriptions
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出订阅 | list_subscriptions | ✅ | ✅ |
| 获取订阅 | get_subscription | ✅ | ✅ |
| 更新订阅 | update_subscription | ❌ | ❌ |
| 取消订阅 | cancel_subscription | ❌ | ❌ |
| 暂停订阅 | pause_subscription | ❌ | ❌ |
| 恢复暂停的订阅 | resume_subscription | ❌ | ❌ |
| 激活试用订阅 | activate_subscription | ❌ | ❌ |
| 预览订阅的更新 | preview_subscription_update | ✅ | ❌ |
| 为订阅创建一次性费用 | create_subscription_charge | ✅ | ❌ |
| 预览订阅的一次性费用 | preview_subscription_charge | ✅ | ❌ |
Saved Payment Methods
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出为客户保存的付款方式 | list_saved_payment_methods | ✅ | ✅ |
| 为客户保存付款方式 | get_saved_payment_method | ✅ | ✅ |
| 删除为客户保存的付款方式 | delete_saved_payment_method | ❌ | ❌ |
Customer Portal Sessions
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 创建客户门户会话 | create_customer_portal_session | ✅ | ❌ |
Notification Settings
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出通知设置 | list_notification_settings | ✅ | ✅ |
| 创建通知设置 | create_notification_setting | ✅ | ❌ |
| 获取通知设置 | get_notification_setting | ✅ | ✅ |
| 更新通知设置 | update_notification_setting | ❌ | ❌ |
| 删除通知设置 | delete_notification_setting | ❌ | ❌ |
Events
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出事件 | list_events | ✅ | ✅ |
Notifications
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出通知 | list_notifications | ✅ | ✅ |
| 获取通知 | get_notification | ✅ | ✅ |
| 重播通知 | replay_notification | ✅ | ❌ |
Notification Logs
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出通知的日志 | list_notification_logs | ✅ | ✅ |
Simulations
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出模拟 | list_simulations | ✅ | ✅ |
| 创建模拟 | create_simulation | ✅ | ❌ |
| 获取模拟 | get_simulation | ✅ | ✅ |
| 更新模拟 | update_simulation | ❌ | ❌ |
Simulation Runs
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 模拟运行列表 | list_simulation_runs | ✅ | ✅ |
| 创建模拟运行 | create_simulation_run | ✅ | ❌ |
| 进行模拟 | get_simulation_run | ✅ | ✅ |
Simulation Run Events
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出模拟运行的事件 | list_simulation_run_events | ✅ | ✅ |
| 获取模拟运行事件 | get_simulation_run_event | ✅ | ✅ |
| 重播模拟运行的事件 | replay_simulation_run_event | ✅ | ❌ |
Reports
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出报告 | list_reports | ✅ | ✅ |
| 创建报告 | create_report | ✅ | ❌ |
| 获取报告 | get_report | ✅ | ✅ |
| 获取报告的CSV文件 | get_report_csv | ✅ | ✅ |
Client-Side Tokens
| 操作 | 工具 | 无损 | 只读 |
|---|---|---|---|
| 列出客户端令牌 | list_client_side_tokens | ✅ | ✅ |
| 创建客户端令牌 | create_client_side_token | ✅ | ❌ |
| 获取客户端令牌 | get_client_side_token | ✅ | ✅ |
| 撤销客户端令牌 | revoke_client_side_token | ❌ | ❌ |
安装
要使用MCP服务器,您需要一个API密钥。您可以在中创建和管理API密钥 Paddle>开发工具>身份验证:
- 沙箱:
- 直播:
在MCP设置文件中添加以下内容将在Claude Desktop、Cursor或Windsurf等客户端中配置和运行Paddle MCP服务器:
方法1:在Cursor或VS Code中单击安装
只需单击Cursor或VS Code即可安装Paddle MCP服务器。

安装后,您需要更新MCP设置文件中的配置以替换 your_api_key 使用实际的Paddle API键,并根据需要调整环境和工具值。
方法2:使用命令行参数(建议用于 npx)
将以下内容添加到您正在使用的客户端中的MCP设置或配置文件中:
{
"mcpServers": {
"paddle": {
"command": "npx",
"args": [
"-y",
"@paddle/paddle-mcp",
"--api-key=your_api_key",
"--environment=sandbox",
"--tools=non-destructive"
]
}
}
}替换 your_api_key 使用您的实际桨API键,设置 --environment 要么 sandbox 或 production,并设置 --tools 您希望加载并可供MCP客户端使用的工具。
方法3:使用环境变量
将以下内容添加到您正在使用的客户端中的MCP设置或配置文件中:
{
"mcpServers": {
"paddle": {
"command": "npx",
"args": ["-y", "@paddle/paddle-mcp"],
"env": {
"PADDLE_API_KEY": "your_api_key",
"PADDLE_ENVIRONMENT": "sandbox",
"PADDLE_MCP_TOOLS": "non-destructive"
}
}
}
}替换 your_api_key 使用您的实际桨API键,设置 PADDLE_ENVIRONMENT 要么 sandbox 或 production,并设置 PADDLE_MCP_TOOLS 您希望加载并可供MCP客户端使用的工具。
过滤工具
你可以过滤哪些 工具 通过传递 --tools 参数(方法2)或设置 PADDLE_MCP_TOOLS 环境变量(方法1或3)。可接受的值为:
all-所有工具都可用read-only-只有读取操作可用non-destructive-读取操作和安全写入操作可用(默认)- 以逗号分隔的特定工具名称列表(例如。,
list_products,get_product,create_product)
有关详细的设置指南,请参阅:
发展
- 安装依赖项:
pnpm install- 构建服务器:
pnpm build- 更新客户端以使用本地版本:
{
"mcpServers": {
"paddle": {
"command": "node",
"args": ["path/to/paddle-mcp-server/build/index.js"],
"env": {
"PADDLE_API_KEY": "your_api_key",
"PADDLE_ENVIRONMENT": "sandbox",
"PADDLE_MCP_TOOLS": "all"
}
}
}
}这 PADDLE_MCP_TOOLS 环境变量接受与 --tools 论点: all, read-only, non-destructive,或以逗号分隔的工具名称列表。如果未设置,则默认为 non-destructive.
调试
要调试MCP服务器,您可以使用MCP检查器工具:
- 使用检查器运行服务器:
pnpm inspector- 在浏览器中打开提供的URL,查看和调试MCP请求和响应。
- 包括
--api-key和--environment论据。
