Skip to main content
Glama
DynamicEndpoints

PayPal MCP

PayPal MCP 服务器

CI 许可证:MIT TypeScript 铁匠徽章

DynamicEndpoints维护 - 联系方式: kameron@dynamicendpoints.com

一个模型上下文协议 (MCP) 服务器,提供与 PayPal API 的集成。该服务器通过标准化接口实现与 PayPal 的支付处理、发票和业务管理功能的无缝交互。

建筑学

graph TB
    subgraph "MCP Environment"
        Client[MCP Client]
        Server[PayPal MCP Server]
        Validation[Input Validation]
        Auth[OAuth Authentication]
    end

    subgraph "PayPal APIs"
        Orders[Orders API]
        Payments[Payments API]
        Payouts[Payouts API]
        Invoicing[Invoicing API]
        Products[Products API]
        Disputes[Disputes API]
        Identity[Identity API]
    end

    Client --> |Request| Server
    Server --> |Response| Client
    Server --> Validation
    Server --> Auth
    Auth --> |Access Token| PayPal
    
    Server --> Orders
    Server --> Payments
    Server --> Payouts
    Server --> Invoicing
    Server --> Products
    Server --> Disputes
    Server --> Identity

    style Client fill:#f9f,stroke:#333,stroke-width:2px
    style Server fill:#bbf,stroke:#333,stroke-width:2px
    style Auth fill:#bfb,stroke:#333,stroke-width:2px
    style Validation fill:#bfb,stroke:#333,stroke-width:2px

Related MCP server: PayPal MCP Server

特征

  • 付款处理

    • 创建和管理订单

    • 处理付款

    • 处理支付令牌

    • 管理争议

  • 业务运营

    • 创建和管理产品

    • 生成发票

    • 处理付款

    • 处理合作伙伴推荐

  • 用户管理

    • 身份验证

    • 用户信息检索

    • Web 配置文件管理

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 PayPal MCP 服务器:

npx -y @smithery/cli install @DynamicEndpoints/Paypal-MCP --client claude

手动安装

  1. 克隆存储库

  2. 安装依赖项:

    npm install
  3. 构建项目:

    npm run build
  4. 在 MCP 设置文件中配置 PayPal 凭据:

    {
      "mcpServers": {
        "paypal": {
          "command": "node",
          "args": ["path/to/paypal-server/build/index.js"],
          "env": {
            "PAYPAL_CLIENT_ID": "your_client_id",
            "PAYPAL_CLIENT_SECRET": "your_client_secret"
          },
          "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;
  }>;
}

创建付款

创建直接付款。

{
  intent: string;
  payer: {
    payment_method: string;
    funding_instruments?: Array<{
      credit_card?: {
        number: string;
        type: string;
        expire_month: number;
        expire_year: number;
        cvv2: string;
        first_name: string;
        last_name: string;
      };
    }>;
  };
  transactions: Array<{
    amount: {
      total: string;
      currency: string;
    };
    description?: 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;
    };
  }>;
}

创建付款

处理批量付款。

{
  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;
  }>;
}

用户和配置文件管理

获取用户信息

检索用户信息。

{
  access_token: string;
}

创建网络配置文件

创建网络体验档案。

{
  name: string;
  presentation?: {
    brand_name?: string;
    logo_image?: string;
    locale_code?: string;
  };
  input_fields?: {
    no_shipping?: number;
    address_override?: number;
  };
  flow_config?: {
    landing_page_type?: string;
    bank_txn_pending_url?: string;
  };
}

使用示例

创建订单

const result = await mcpClient.useTool('paypal', 'create_order', {
  intent: 'CAPTURE',
  purchase_units: [{
    amount: {
      currency_code: 'USD',
      value: '100.00'
    },
    description: 'Premium Subscription'
  }]
});

生成发票

const result = await mcpClient.useTool('paypal', 'create_invoice', {
  invoice_number: 'INV-2024-001',
  reference: 'REF-2024-001',
  currency_code: 'USD',
  recipient_email: 'customer@example.com',
  items: [{
    name: 'Consulting Services',
    quantity: '1',
    unit_amount: {
      currency_code: 'USD',
      value: '500.00'
    }
  }]
});

处理付款

const result = await mcpClient.useTool('paypal', 'create_payout', {
  sender_batch_header: {
    sender_batch_id: 'Payroll_2024_001',
    email_subject: 'You have received a payment'
  },
  items: [{
    recipient_type: 'EMAIL',
    amount: {
      value: '1000.00',
      currency: 'USD'
    },
    receiver: 'employee@example.com',
    note: 'Monthly salary payment'
  }]
});

错误处理

服务器实现了全面的错误处理:

  • 输入验证错误及详细消息

  • PayPal API 错误及响应详情

  • 网络和身份验证错误

  • 速率限制和超时处理

安全注意事项

  • 所有敏感数据都经过验证和清理

  • 使用 PayPal 进行 OAuth 2.0 身份验证

  • 通过环境变量进行安全凭证管理

  • 所有 API 参数的输入验证

  • 错误消息不会泄露敏感信息

发展

建筑

npm run build

测试

npm test

调试

服务器输出详细的日志以帮助调试:

  • 身份验证问题

  • API 调用失败

  • 验证错误

  • 请求/响应详细信息

贡献

  1. 分叉存储库

  2. 创建功能分支

  3. 提交你的更改

  4. 推送到分支

  5. 创建拉取请求

执照

MIT 许可证

Install Server
A
license - permissive license
C
quality
-
maintenance - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    A Model Context Protocol server that provides comprehensive integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.
    6
    Apache 2.0
  • A
    license
    -
    quality
    D
    maintenance
    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.
    MIT
  • A
    license
    D
    quality
    D
    maintenance
    An MCP server implementation that allows sending emails over MailPace's fast transactional email API.
    1
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • A basic MCP server to operate on the Postman API.

  • Official remote MCP server for Color Me Shop.

  • MCP server integrating with Stripe - tools for customers, products, payments, and more.

View all MCP Connectors

Latest Blog Posts

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/DynamicEndpoints/Paypal-MCP'

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