PayPal MCP Server

by arbuthnot-eth
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Used for visualizing the architecture of the PayPal MCP server through diagrams in the documentation.

  • Provides the runtime environment for the MCP server, supporting the execution of the PayPal integration services.

  • Enables comprehensive interaction with PayPal's payment processing systems, including orders management, payment processing, invoicing, subscription management, dispute resolution, product catalog management, payouts, and user identity verification.

PayPal MCP サーバー

PayPal APIとの包括的な統合を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、標準化されたインターフェースを通じて、PayPalの支払い処理、請求、サブスクリプション管理、そしてビジネスオペレーションとのシームレスな連携を実現します。

特徴

支払い処理

  • 注文管理: 注文の作成、更新、追跡
  • 支払い処理:さまざまな方法で支払いを処理します
  • 支払いトークン: 将来使用するために支払いトークンを作成および管理します
  • 紛争管理:支払い紛争と解決を処理する

事業運営

  • 製品管理:製品カタログの作成と管理
  • 請求書発行: プロフェッショナルな請求書を作成して送信します
  • 支払い:複数の受取人への一括支払い処理
  • サブスクリプション管理: 定期課金の作成と管理

ユーザー管理

  • 本人確認: ユーザーの本人確認
  • ユーザー情報: ユーザーデータの取得と管理
  • Webプロファイル管理:チェックアウトエクスペリエンスをカスタマイズ

建築

インストール

前提条件

  • Node.js 16.x 以降
  • API 認証情報を持つ PayPal 開発者アカウント

手動インストール

  1. リポジトリをクローンする
    git clone https://github.com/arbuthnot-eth/PayPal-MCP.git cd PayPal-MCP
  2. 依存関係をインストールする
    npm install
  3. プロジェクトを構築する
    npm run build
  4. MCP 設定ファイルで PayPal の資格情報を設定します。
    { "mcpServers": { "paypal": { "command": "node", "args": ["path/to/paypal-mcp/build/index.js"], "env": { "PAYPAL_CLIENT_ID": "your_client_id", "PAYPAL_CLIENT_SECRET": "your_client_secret", "PAYPAL_ENVIRONMENT": "sandbox" // or "live" }, "disabled": false, "autoApprove": [] } } }

利用可能なツール

支払い業務

支払いトークンの作成

将来使用するために支払いトークンを作成します。

{ customer: { id: string; email_address?: string; }; payment_source: { card?: { name: string; number: string; expiry: string; security_code: string; }; paypal?: { email_address: string; }; }; }

注文作成

PayPal で新しい注文を作成します。

{ intent: 'CAPTURE' | 'AUTHORIZE'; purchase_units: Array<{ amount: { currency_code: string; value: string; }; description?: string; reference_id?: string; items?: Array<{ name: string; quantity: string; unit_amount: { currency_code: string; value: string; }; }>; }>; application_context?: { brand_name?: string; shipping_preference?: 'GET_FROM_FILE' | 'NO_SHIPPING' | 'SET_PROVIDED_ADDRESS'; user_action?: 'CONTINUE' | 'PAY_NOW'; }; }

キャプチャ順序

承認された注文の支払いを取得します。

{ order_id: string; payment_source?: { token?: { id: string; type: string; }; }; }

サブスクリプションの作成

定期課金のサブスクリプションを作成します。

{ plan_id: string; subscriber: { name: { given_name: string; surname: string; }; email_address: string; }; application_context?: { brand_name?: string; shipping_preference?: 'GET_FROM_FILE' | 'NO_SHIPPING' | 'SET_PROVIDED_ADDRESS'; user_action?: 'CONTINUE' | 'SUBSCRIBE_NOW'; payment_method?: { payer_selected?: string; payee_preferred?: string; }; }; }

事業運営

製品を作成する

カタログに新しい製品を作成します。

{ name: string; description: string; type: 'PHYSICAL' | 'DIGITAL' | 'SERVICE'; category: string; image_url?: string; home_url?: string; }

請求書作成

新しい請求書を生成します。

{ invoice_number: string; reference: string; currency_code: string; recipient_email: string; items: Array<{ name: string; quantity: string; unit_amount: { currency_code: string; value: string; }; description?: string; tax?: { name: string; percent: string; }; }>; note?: string; terms_and_conditions?: string; memo?: string; payment_term?: { term_type: 'DUE_ON_RECEIPT' | 'DUE_ON_DATE' | 'NET_10' | 'NET_15' | 'NET_30' | 'NET_45' | 'NET_60' | 'NET_90'; due_date?: string; }; }

支払いの作成

一括支払いを処理します。

{ sender_batch_header: { sender_batch_id: string; email_subject?: string; recipient_type?: string; }; items: Array<{ recipient_type: string; amount: { value: string; currency: string; }; receiver: string; note?: string; }>; }

エラー処理

サーバーは包括的なエラー処理を実装します。

  • 入力検証: 具体的なメッセージによる詳細な検証エラー
  • PayPal API エラー: PayPal エラーの詳細を含む構造化されたエラー応答
  • ネットワーク エラー: 一時的なネットワークの問題に対する再試行ロジック
  • 認証エラー: トークンの自動更新とエラーメッセージのクリア
  • レート制限: API レート制限のバックオフ戦略

セキュリティに関する考慮事項

  • すべての機密データは検証され、サニタイズされます
  • PayPalによるOAuth 2.0認証
  • 環境変数による安全な資格情報管理
  • すべてのAPIパラメータの入力検証
  • エラーメッセージは機密情報を公開しません

発達

建物

npm run build

開発モードで実行

npm run dev

テスト

npm test

リンティング

npm run lint

書式設定

npm run format

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成する
  3. 変更をコミットする
  4. ブランチにプッシュする
  5. プルリクエストを作成する

ライセンス

MITライセンス

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

PayPal の API との包括的な統合を提供し、標準化されたインターフェースを通じて支払い処理、請求、サブスクリプション管理、ビジネス オペレーションとのシームレスなやり取りを可能にするモデル コンテキスト プロトコル サーバーです。

  1. Features
    1. Payment Processing
    2. Business Operations
    3. User Management
  2. Architecture
    1. Installation
      1. Prerequisites
      2. Manual Installation
    2. Available Tools
      1. Payment Operations
      2. Business Operations
    3. Error Handling
      1. Security Considerations
        1. Development
          1. Building
          2. Running in Development Mode
          3. Testing
          4. Linting
          5. Formatting
        2. Contributing
          1. License
            ID: uvgnpv0ebu