PayPal MCP 服务器是一个提供与 PayPal API 集成的模型上下文协议(MCP)服务器。它借助标准化接口,实现了与 PayPal 支付处理、发票管理、订阅管理和业务操作的无缝交互。
# 克隆仓库
git clone https://github.com/arbuthnot-eth/PayPal-MCP-Backdated.git
cd PayPal-MCP-Backdated
# 安装依赖项
npm install
# 构建项目
npm run build
在根目录下创建一个 .env
文件,输入您的 PayPal API 凭证:
PAYPAL_CLIENT_ID=your_client_id_here
PAYPAL_CLIENT_SECRET=your_client_secret_here
PAYPAL_ENVIRONMENT=sandbox # 或 'live' 用于生产环境
# 启动服务器
npm start
# 开发模式(自动重载)
npm run dev
将服务器添加到您的 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
:获取网页体验配置文件列表# 运行代码检查
npm run lint
# 运行测试
npm test
# 格式化代码
npm run format
该项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。