Skip to main content
Glama
dodopayments

Dodo Payments

Official
by dodopayments

Dodo 支付节点 MCP 服务器

它是用不锈钢生成的。

安装

直接调用

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

export DODO_PAYMENTS_API_KEY="My Bearer Token" export DODO_PAYMENTS_ENVIRONMENT="live_mode" npx -y dodopayments-mcp@latest

通过 MCP 客户端

modelcontextprotocol.io上提供了部分现有客户端的列表。如果您已有客户端,请参阅其文档以安装 MCP 服务器。

对于具有配置 JSON 的客户端,它可能看起来像这样:

{ "mcpServers": { "dodopayments_api": { "command": "npx", "args": ["-y", "dodopayments-mcp", "--client=claude", "--tools=dynamic"], "env": { "DODO_PAYMENTS_API_KEY": "My Bearer Token", "DODO_PAYMENTS_ENVIRONMENT": "live_mode" } } } }

Related MCP server: Flutterwave MCP Server

将端点暴露给你的 MCP 客户端

有两种方法可以将端点公开为 MCP 服务器中的工具:

  1. 每个端点公开一个工具,并根据需要进行过滤

  2. 公开一组工具来动态地从 API 发现和调用端点

过滤端点和工具

您可以在命令行中运行该软件包,以发现并筛选 MCP 服务器公开的工具集。这对于大型 API 非常有用,因为一次性包含所有端点对于 AI 的上下文窗口来说过于庞大。

您可以通过多个方面进行筛选:

  • --tool按名称包含特定工具

  • --resource包含特定资源下的所有工具,并且可以有通配符,例如my.resource*

  • --operation仅包括读取(获取/列出)或仅写入操作

动态工具

如果您向 MCP 服务器指定--tools=dynamic ,它将公开以下工具,而不是在 API 中每个端点公开一个工具:

  1. list_api_endpoints - 发现可用的端点,并可选择通过搜索查询进行过滤

  2. get_api_endpoint_schema - 获取特定端点的详细架构信息

  3. invoke_api_endpoint - 使用适当的参数执行任何端点

这样,您就可以在 MCP 客户端中使用完整的 API 端点,而无需一次性将所有模式加载到上下文中。相反,LLM 会自动结合使用这些工具来动态搜索、查找和调用端点。然而,由于模式的间接性,与显式导入工具相比,提供正确的属性可能会更加困难。因此,您可以选择显式导入工具、动态导入工具或两者兼而有之。

使用--help查看更多信息。

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

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

指定 MCP 客户端

不同的客户端具有不同的处理任意工具和模式的能力。

您可以使用--client参数指定您正在使用的客户端,MCP 服务器将自动提供与该客户端更兼容的工具和模式。

  • --client=<type> :根据已知的 MCP 客户端设置所有功能

    • 有效值: openai-agentsclaudeclaude-codecursor

    • 例如: --client=cursor

此外,如果您的客户端不在上述列表中,或者客户端随着时间的推移变得更好,您可以手动启用或禁用某些功能:

  • --capability=<name> :指定单个客户端功能

    • 可用功能:

      • top-level-unions :在工具模式中启用对顶级联合的支持

      • valid-json :启用参数的 JSON 字符串解析

      • refs :在模式中启用对 $ref 指针的支持

      • unions :在模式中启用对联合类型(anyOf)的支持

      • formats :启用对模式中的格式验证的支持(例如日期时间、电子邮件)

      • tool-name-length=N :将最大工具名称长度设置为 N 个字符

    • 例如: --capability=top-level-unions --capability=tool-name-length=40

    • 例如: --capability=top-level-unions,tool-name-length=40

示例

  1. 过滤卡片上的读取操作:

--resource=cards --operation=read
  1. 排除特定工具,同时包含其他工具:

--resource=cards --no-tool=create_cards
  1. 使用自定义最大工具名称长度来配置 Cursor 客户端:

--client=cursor --capability=tool-name-length=40
  1. 具有多个条件的复杂过滤:

--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards

单独导入工具和服务器

// 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_paymentswrite ):

  • retrieve_paymentsread ):

  • list_paymentsread ):

  • retrieve_line_items_paymentsread ):

资源subscriptions

  • create_subscriptionswrite ):

  • retrieve_subscriptionsread ):

  • update_subscriptionswrite ):

  • list_subscriptionsread ):

  • change_plan_subscriptionswrite ):

  • charge_subscriptionswrite ):

资源invoices.payments

  • retrieve_invoices_paymentsread ):

资源licenses

  • activate_licenseswrite ):

  • deactivate_licenseswrite ):

  • validate_licenseswrite ):

资源license_keys

  • retrieve_license_keysread ):

  • update_license_keyswrite ):

  • list_license_keysread ):

资源license_key_instances

  • retrieve_license_key_instancesread ):

  • update_license_key_instanceswrite ):

  • list_license_key_instancesread ):

资源customers

  • create_customerswrite ):

  • retrieve_customersread ):

  • update_customerswrite ):

  • list_customersread ):

资源customers.customer_portal

  • create_customers_customer_portalwrite ):

资源refunds

  • create_refundswrite ):

  • retrieve_refundsread ):

  • list_refundsread ):

资源disputes

  • retrieve_disputesread ):

  • list_disputesread ):

资源payouts

  • list_payoutsread ):

资源webhook_events

  • retrieve_webhook_eventsread ):

  • list_webhook_eventsread ):

资源products

  • create_productswrite ):

  • retrieve_productsread ):

  • update_productswrite ):

  • list_productsread ):

  • delete_productswrite ):

  • unarchive_productswrite ):

资源products.images

  • update_products_imageswrite ):

资源misc

  • list_supported_countries_miscread ):

资源discounts

  • create_discountswrite ):如果省略code或为空,则会生成随机的 16 个字符大写代码。

  • retrieve_discountsread ):获取/折扣/{discount_id}

  • update_discountswrite ):PATCH /discounts/{discount_id}

  • list_discountsread ):GET /discounts

  • delete_discountswrite ):删除/discounts/{discount_id}

资源addons

  • create_addonswrite ):

  • retrieve_addonsread ):

  • update_addonswrite ):

  • list_addonsread ):

  • update_images_addonswrite ):

资源brands

  • create_brandswrite ):

  • retrieve_brandsread ):薄处理程序仅调用get_brand并包装在Json(...)

  • update_brandswrite ):

  • list_brandsread ):

  • update_images_brandswrite ):

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dodopayments/dodopayments-node'

If you have feedback or need assistance with the MCP directory API, please join our Discord server