Skip to main content
Glama
PayPal MCP Server

PayPal MCP Server

by akramIOT

非官方 PayPal MCP 服务器

PayPal MCP 服务器

用于 PayPal API 集成的模型上下文协议 (MCP) 服务器的 Python 实现。该服务器支持大型语言模型 (LLM) 通过函数调用与 PayPal 的 API 进行交互。

特征

  • 全面实现 PayPal API 的模型上下文协议

  • 支持所有主要的 PayPal API 端点:

    • 发票:创建、列出、查看、发送、提醒、取消、二维码

    • 订单:创建、获取、捕获

    • 产品:创建、列出、查看、更新

    • 订阅计划:创建、列出、查看

    • 订阅:创建、查看、取消

    • 发货:创建、跟踪

    • 争议:列出、查看、接受

    • 交易:列表和过滤器

Related MCP server: paypal-invoice-mcp-server

安装

来自 PyPI

pip install paypal-mcp-server

来自源

git clone https://github.com/yourusername/paypal-mcp-server.git
cd paypal-mcp-server
pip install -e .

使用 Docker

docker pull ghcr.io/yourusername/paypal-mcp-server:latest

用法

命令行

# Using environment variables
export PAYPAL_ACCESS_TOKEN="your_access_token"
export PAYPAL_ENVIRONMENT="SANDBOX"  # or "PRODUCTION"
paypal-mcp --tools=all

# Or with command line arguments
paypal-mcp --tools=all --access-token=your_access_token --paypal-environment=SANDBOX

仅启用特定工具

paypal-mcp --tools=invoices.create,invoices.list,orders.create --access-token=your_token

使用 Docker

docker run -e PAYPAL_ACCESS_TOKEN="your_access_token" -e PAYPAL_ENVIRONMENT="SANDBOX" ghcr.io/yourusername/paypal-mcp-server:latest --tools=all

与 Claude Desktop 集成

将以下内容添加到您的~/Claude/claude_desktop_config.json :

{
   "mcpServers": {
     "paypal": {
       "command": "paypal-mcp",
       "args": [
         "--tools=all"
       ],
       "env": {
         "PAYPAL_ACCESS_TOKEN": "YOUR_PAYPAL_ACCESS_TOKEN",
         "PAYPAL_ENVIRONMENT": "SANDBOX"
       }
     }
   }
}

获取 PayPal 访问令牌

您可以使用客户端 ID 和客户端密钥生成 PayPal 访问令牌:

curl -v https://api-m.sandbox.paypal.com/v1/oauth2/token \
  -H "Accept: application/json" \
  -H "Accept-Language: en_US" \
  -u "CLIENT_ID:CLIENT_SECRET" \
  -d "grant_type=client_credentials"

发展

设置开发环境

# Clone the repository
git clone https://github.com/yourusername/paypal-mcp-server.git
cd paypal-mcp-server

# Install dev dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

运行测试

pytest -xvs

构建包

python -m build

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

致谢

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      The PayPal Model Context Protocol server allows you to integrate with PayPal APIs through function calling. This protocol supports various tools to interact with different PayPal services.
      1,227 npm
      199
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables integration with PayPal APIs for managing invoices, payments, disputes, subscriptions, and more through natural language.
      1,227 npm
      13
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to create and manage invoices, process sandbox payments and refunds, generate PDF receipts, and inspect transactions, subscriptions, disputes, and merchant insights through a unified tool gateway backed by PayPal Sandbox APIs.
      MIT