# PayPal-MCP管理器
## 基本信息
- Slug: `dynamicendpoints-paypal-mcp`
- Source: modelscope
- Publisher: @DynamicEndpoints/Paypal-MCP
- Categories: customer-support / 金融
- Hosted: No
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@DynamicEndpoints/Paypal-MCP
## 简介
这是一个用于管理PayPal的MCP服务器。
## 安装提示

```bash
## 功能 - **支付处理** - 创建和管理订单 - 处理付款 - 处理支付令牌 - 管理争议 - **业务操作** - 创建和管理产品 - 生成发票 - 处理支出 - 处理合作伙伴推荐 - **用户管理** - 身份验证 - 用户信息检索 - Web 个人资料管理 ## 安装 ### 通过 Smithery 安装 要通过 [Smithery](https://smithery.ai/server/@DynamicEndpoints/Paypal-MCP) 自动安装适用于 Claude Desktop 的 PayPal MCP 服务器：
```

## MCP Server 详情

# PayPal MCP 服务器

[![CI](https://github.com/DynamicEndpoints/Paypal-MCP/actions/workflows/ci.yml/badge.svg)](https://github.com/DynamicEndpoints/Paypal-MCP/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
[![smithery badge](https://smithery.ai/badge/@DynamicEndpoints/Paypal-MCP)](https://smithery.ai/server/@DynamicEndpoints/Paypal-MCP)

> 由 [DynamicEndpoints](https://github.com/DynamicEndpoints) 维护 - 联系方式：kameron@dynamicendpoints.com

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

<a href="https://glama.ai/mcp/servers/6op9uaqyev">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/6op9uaqyev/badge" alt="PayPal MCP 服务器" />
</a>

## 架构

```mermaid
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
```


## 功能

- **支付处理**
  - 创建和管理订单
  - 处理付款
  - 处理支付令牌
  - 管理争议

- **业务操作**
  - 创建和管理产品
  - 生成发票
  - 处理支出
  - 处理合作伙伴推荐

- **用户管理**
  - 身份验证
  - 用户信息检索
  - Web 个人资料管理

## 安装

### 通过 Smithery 安装

要通过 [Smithery](https://smithery.ai/server/@DynamicEndpoints/Paypal-MCP) 自动安装适用于 Claude Desktop 的 PayPal MCP 服务器：

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


### 手动安装
1. 克隆仓库
2. 安装依赖项：
   ```bash
   npm install
   ```
3. 构建项目：
   ```bash
   npm run build
   ```
4. 在 MCP 设置文件中配置 PayPal 凭证：
   ```json
   {
     "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": []
       }
     }
   }
   ```

## 可用工具

### 支付操作

#### create_payment_token
为将来使用创建支付令牌。
```typescript
{
  customer: {
    id: string;
    email_address?: string;
  };
  payment_source: {
    card?: {
      name: string;
      number: string;
      expiry: string;
      security_code: string;
    };
    paypal?: {
      email_address: string;
    };
  };
}
```


#### create_order
在 PayPal 中创建新订单。
```typescript
{
  intent: 'CAPTURE' | 'AUTHORIZE';
  purchase_units: Array<{
    amount: {
      currency_code: string;
      value: string;
    };
    description?: string;
    reference_id?: string;
  }>;
}
```


#### create_payment
创建直接支付。
```typescript
{
  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;
  }>;
}
```


### 业务操作

#### create_product
在目录中创建新产品。
```typescript
{
  name: string;
  description: string;
  type: 'PHYSICAL' | 'DIGITAL' | 'SERVICE';
  category: string;
  image_url?: string;
  home_url?: string;
}
```


#### create_invoice
生成新发票。
```typescript
{
  invoice_number: string;
  reference: string;
  currency_code: string;
  recipient_email: string;
  items: Array<{
    name: string;
    quantity: string;
    unit_amount: {
      currency_code: string;
      value: string;
    };
  }>;
}
```


#### create_payout
处理批量支出。
```typescript
{
  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;
  }>;
}
```


### 用户和个人资料管理

#### get_userinfo
检索用户信息。
```typescript
{
  access_token: string;
}
```


#### create_web_profile
创建 Web 体验个人资料。
```typescript
{
  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;
  };
}
```


## 使用示例

### 创建订单

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


### 生成发票

```typescript
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'
    }
  }]
});
```


### 处理支出

```typescript
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_ty…

