Dodo Payments ノード MCP サーバー
ステンレスで生成されます。
インストール
直接呼び出し
MCP サーバーはnpx経由で直接実行できます。
export DODO_PAYMENTS_API_KEY="My Bearer Token"
export DODO_PAYMENTS_ENVIRONMENT="live_mode"
npx -y dodopayments-mcp@latestMCPクライアント経由
既存のクライアントの一部は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 サーバーでエンドポイントをツールとして公開するには、次の 2 つの方法があります。
エンドポイントごとに1つのツールを公開し、必要に応じてフィルタリングする
APIからエンドポイントを動的に検出して呼び出すためのツールセットを公開する
エンドポイントとツールのフィルタリング
コマンドラインでパッケージを実行すると、MCPサーバーによって公開されているツールセットを検出し、フィルタリングすることができます。これは、すべてのエンドポイントを一度に含めるとAIのコンテキストウィンドウに収まりきらない大規模なAPIの場合に役立ちます。
複数の側面でフィルタリングできます。
--tool特定のツール名を組み込みます--resource、特定のリソースの下にあるすべてのツールが含まれ、ワイルドカードを使用できます (例:my.resource*--operationには読み取り操作(取得/リスト)のみ、または書き込み操作のみが含まれます
ダイナミックツール
MCP サーバーに--tools=dynamicを指定すると、API のエンドポイントごとに 1 つのツールを公開する代わりに、次のツールが公開されます。
list_api_endpoints- 利用可能なエンドポイントを検出し、オプションで検索クエリによるフィルタリングを行います。get_api_endpoint_schema- 特定のエンドポイントの詳細なスキーマ情報を取得しますinvoke_api_endpoint- 適切なパラメータで任意のエンドポイントを実行します
これにより、MCPクライアントでAPIエンドポイントのフルセットを利用できるようになります。すべてのスキーマを一度にコンテキストにロードする必要はありません。LLMはこれらのツールを自動的に併用し、エンドポイントを動的に検索、参照、呼び出します。ただし、スキーマの間接的な性質上、ツールを明示的にインポートした場合よりも適切なプロパティを提供することが困難になる可能性があります。そのため、明示的なツール、動的ツール、またはその両方をオプトインできます。
--helpで詳細情報を参照してください。
これらのコマンドライン オプションはすべて繰り返し使用したり、組み合わせたりすることができ、対応する除外バージョン (例: --no-tool ) を持つことができます。
利用可能なツールのリストを表示するには、 --listを使用するか、以下を参照してください。
MCPクライアントの指定
クライアントごとに、任意のツールやスキーマを処理する能力が異なります。
--client引数を使用して使用しているクライアントを指定すると、MCP サーバーはそのクライアントと互換性のあるツールとスキーマを自動的に提供します。
--client=<type>: 既知のMCPクライアントに基づいてすべての機能を設定します有効な値:
openai-agents、claude、claude-code、cursor例:
--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
例
カードの読み取り操作のフィルター:
--resource=cards --operation=read特定のツールを除外し、他のツールを含める:
--resource=cards --no-tool=create_cardsツール名の最大長をカスタマイズしてカーソル クライアントを構成します。
--client=cursor --capability=tool-name-length=40複数の基準による複雑なフィルタリング:
--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_payments(write):retrieve_payments(read):list_payments(read):retrieve_line_items_payments(read):
リソースsubscriptions :
create_subscriptions(write):retrieve_subscriptions(read):update_subscriptions(write):list_subscriptions(read):change_plan_subscriptions(write):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 /割引/{割引ID}update_discounts(write): PATCH /discounts/{discount_id}list_discounts(read): GET /discountsdelete_discounts(write): /discounts/{discount_id} を削除する
リソースaddons :
create_addons(write):retrieve_addons(read):update_addons(write):list_addons(read):update_images_addons(write):
リソースbrands :
create_brands(write):retrieve_brands(read): シン ハンドラーはget_brandを呼び出してJson(...)でラップします。update_brands(write):list_brands(read):update_images_brands(write):