Dodo Payments节点

@dodopayments/dodopayments-node
0 Stars 351 次浏览 dodopayments 更新于 2026-08-23

多odo Payments MCP服务器与代理框架集成,为人工智能驱动的支付操作(如计费、订阅和客户管理)提供了一个轻量级且兼容无服务器的接口。它使自主代理能够使用Dodo Payments安全地代表用户执行操作。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "dodopayments_api": {
      "args": [
        "-y",
        "dodopayments-mcp"
      ],
      "command": "npx",
      "env": {
        "DODO_PAYMENTS_API_KEY": "My Bearer Token"
      }
    }
  }
}

服务介绍

Dodo Payments Node MCP Server

它是由 Stainless 生成的。

安装

直接调用

你可以通过 npx 直接运行 MCP 服务器:

export DODO_PAYMENTS_API_KEY="My Bearer Token"
npx -y dodopayments-mcp

通过 MCP 客户端

modelcontextprotocol.io 上有一个现有的客户端的部分列表。如果你已经有了一个客户端,请查阅他们的文档来安装 MCP 服务器。

对于使用配置 JSON 的客户端,可能看起来像这样:

{
  "mcpServers": {
    "dodopayments_api": {
      "command": "npx",
      "args": ["-y", "dodopayments-mcp"],
      "env": {
        "DODO_PAYMENTS_API_KEY": "My Bearer Token"
      }
    }
  }
}

过滤工具

你可以在命令行上运行包以发现和过滤由 MCP 服务器暴露的一组工具。这对于大型 API 来说非常有用,因为一次性包含所有端点对你的 AI 上下文窗口来说太多了。

你可以通过多个方面进行过滤:

  • --tool 按名称包含特定工具
  • --resource 包含特定资源下的所有工具,并且可以使用通配符,例如 my.resource*
  • --operation 仅包括读取(get/list)或写入操作

更多信息请参阅 --help

所有这些命令行选项都可以重复、组合在一起,并有相应的排除版本(例如 --no-tool)。

使用 --list 查看可用工具列表,或者见下文。

单独导入工具和服务

// Import the server, generated endpoints, or the init function
import { server, endpoints, init } from "dodopayments-mcp/server";

// import a specific tool
import createPayments from "dodopayments-mcp/tools/payments/create-payments";

// initialize the server and all endpoints
init({ server, endpoints });

// manually start server
const transport = new StdioServerTransport();
await server.connect(transport);

// or initialize your own server with specific tools
const myServer = new McpServer(...);

// define your own endpoint
const myCustomEndpoint = {
  tool: {
    name: 'my_custom_tool',
    description: 'My custom tool',
    inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
  },
  handler: async (client: client, args: any) => {
    return { myResponse: 'Hello world!' };
  })
};

// initialize the server with your custom endpoints
init({ server: myServer, endpoints: [createPayments, myCustomEndpoint] });

可用工具

以下工具在此 MCP 服务器中可用。

资源 payments:

  • create_payments (write):
  • retrieve_payments (read):
  • list_payments (read):

资源 subscriptions:

  • create_subscriptions (write):
  • retrieve_subscriptions (read):
  • update_subscriptions (write):
  • list_subscriptions (read):
  • charge_subscriptions (write):

资源 invoices.payments:

  • retrieve_invoices_payments (read):

资源 licenses:

  • activate_licenses (write):
  • deactivate_licenses (write):
  • validate_licenses (write):

资源 license_keys:

  • retrieve_license_keys (read):
  • update_license_keys (write):
  • list_license_keys (read):

资源 license_key_instances:

  • retrieve_license_key_instances (read):
  • update_license_key_instances (write):
  • list_license_key_instances (read):

资源 customers:

  • create_customers (write):
  • retrieve_customers (read):
  • update_customers (write):
  • list_customers (read):

资源 customers.customer_portal:

  • create_customers_customer_portal (write):

资源 refunds:

  • create_refunds (write):
  • retrieve_refunds (read):
  • list_refunds (read):

资源 disputes:

  • retrieve_disputes (read):
  • list_disputes (read):

资源 payouts:

  • list_payouts (read):

资源 webhook_events:

  • retrieve_webhook_events (read):
  • list_webhook_events (read):

资源 products:

  • create_products (write):
  • retrieve_products (read):
  • update_products (write):
  • list_products (read):
  • delete_products (write):
  • unarchive_products (write):

资源 products.images:

  • update_products_images (write):

资源 misc:

  • list_supported_countries_misc (read):

资源 discounts:

  • create_discounts (write): 如果 code 被省略或为空,则生成一个随机的16位大写代码。
  • retrieve_discounts (read): GET /discounts/{discount_id}
  • update_discounts (write): PATCH /discounts/{discount_id}
  • list_discounts (read): GET /discounts
  • delete_discounts (write): DELETE /discounts/{discount_id}

相关 MCP 服务