Skip to main content
Glama

PayPal MCP Server

PayPal MCP 服务器

一个模型上下文协议 (MCP) 服务器,提供与 PayPal API 的全面集成。该服务器通过标准化接口实现与 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

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.

模型上下文协议服务器提供与 PayPal API 的全面集成,通过标准化界面实现与支付处理、发票、订阅管理和业务运营的无缝交互。

  1. 特征
    1. 付款处理
    2. 业务运营
    3. 用户管理
  2. 建筑学
    1. 安装
      1. 先决条件
      2. 手动安装
    2. 可用工具
      1. 付款操作
      2. 业务运营
    3. 错误处理
      1. 安全注意事项
        1. 发展
          1. 建筑
          2. 以开发模式运行
          3. 测试
          4. 代码检查
          5. 格式化
        2. 贡献
          1. 执照

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              A server implementing the Model Context Protocol to make and query payments through Worldpay APIs, enabling payment processing, payment queries, and checkout form generation.
              Last updated -
              TypeScript
            • -
              security
              A
              license
              -
              quality
              A server that provides integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.
              Last updated -
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables Claude AI to interact with Paybyrd's payment processing API, allowing for creating payment links, processing refunds, and retrieving order information.
              Last updated -
              5
              TypeScript
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides tools for interacting with the Paddle Billing API, enabling users to manage products, prices, customers, transactions, subscriptions, and create custom financial reports.
              Last updated -
              8
              43
              19
              TypeScript
              Apache 2.0

            View all related MCP servers

            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/arbuthnot-eth/PayPal-MCP'

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