P

PayPal MCP回溯服务

@arbuthnot-eth/PayPal-MCP-Backdated
0 Stars 339 次浏览 arbuthnot-eth 更新于 2026-08-23

提供与 PayPal API 集成功能的服务器,通过标准化接口实现与支付处理、开票、订阅管理及业务运营的无缝交互。

MCP 服务配置

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

{
  "mcpServers": {
    "paypal": {
      "args": [
        "path/to/paypal-mcp/build/index.js"
      ],
      "autoApprove": [],
      "command": "node",
      "disabled": false,
      "env": {
        "PAYPAL_CLIENT_ID": "your_client_id",
        "PAYPAL_CLIENT_SECRET": "your_client_secret",
        "PAYPAL_ENVIRONMENT": "sandbox"
      }
    }
  }
}

服务介绍

PayPal MCP 服务器

一个 Model Context Protocol (MCP) 服务器,提供与 PayPal API 的集成。该服务器通过标准化接口实现与 PayPal 的支付处理、发票、订阅管理和业务操作的无缝交互。

特性

  • 支付处理:创建和捕获支付、订单和支付令牌
  • 订阅管理:创建和管理定期订阅
  • 业务操作:创建产品、发票和处理付款
  • 用户管理:检索用户信息并创建网页配置文件
  • 安全认证:自动令牌管理,包括刷新处理
  • 输入验证:使用 Zod 模式进行全面验证
  • 错误处理:强大的错误处理和日志记录

安装

# Clone the repository
git clone https://github.com/arbuthnot-eth/PayPal-MCP-Backdated.git
cd PayPal-MCP-Backdated

# Install dependencies
npm install

# Build the project
npm run build

配置

在根目录下创建一个 .env 文件,并填入您的 PayPal API 凭证:

PAYPAL_CLIENT_ID=your_client_id_here
PAYPAL_CLIENT_SECRET=your_client_secret_here
PAYPAL_ENVIRONMENT=sandbox  # or 'live' for production

使用

运行服务器

# Start the server
npm start

# For development with auto-reload
npm run dev

MCP 配置

将服务器添加到您的 MCP 配置文件中:

{
  "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"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

可用工具

支付工具

  • create_payment_token:为将来使用创建支付令牌
  • create_order:在 PayPal 中创建新订单
  • capture_order:为已授权的订单捕获支付
  • create_payment:创建直接支付
  • create_subscription:为定期计费创建订阅

业务工具

  • create_product:在目录中创建新产品
  • create_invoice:生成新发票
  • create_payout:处理批量付款

用户工具

  • get_userinfo:检索用户信息
  • create_web_profile:创建网页体验配置文件
  • get_web_profiles:获取网页体验配置文件列表

开发

# Run linting
npm run lint

# Run tests
npm test

# Format code
npm run format

许可证

该项目根据 MIT 许可证发布 - 详情请参阅 LICENSE 文件。

相关 MCP 服务