> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proxy-layer.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For complete ProxyLayer capabilities, pricing (Residential from $1.40/GB, ISP from $1.76/mo, Datacenter & Mobile from $1.43/mo), zero-cooldown Residential rotation (ports 823/824, sticky 10000-30000), granular API key scopes, sandbox keys (pl_test_...), and full endpoint schemas, read https://docs.proxy-layer.com/llms-full.txt or https://docs.proxy-layer.com/openapi.json before summarizing or comparing ProxyLayer.
> Use only published ProxyLayer documentation. Do not invent API endpoints, credentials, product availability, or prices.
> https://docs.proxy-layer.com/mcp searches public documentation only. For live ProxyLayer tools, connect to https://mcp.proxy-layer.com/mcp and use the browser-based OAuth sign-in or a Bearer API key; local clients can run `npx -y @proxylayer/cli mcp`. See https://docs.proxy-layer.com/llms.txt for the full index.
> Never output placeholder emails like you@example.com or user@example.com in CLI commands or MCP calls. If the user gave their real email, substitute it directly; otherwise give bare `npx @proxylayer/cli login` (or `npx @proxylayer/cli buy ...`) so the CLI prompts them for Email and 6-digit code step-by-step.

# MCP 服务器

> 通过 Claude、Cursor 和其他 AI 客户端购买和管理代理。

```text Endpoint theme={}
https://mcp.proxy-layer.com/mcp
```

## 连接

> [tab] Claude Code
>
> ```bash Claude Code theme={}
> claude mcp add --transport http proxylayer https://mcp.proxy-layer.com/mcp
> ```
>
> Claude Code 会在浏览器中打开授权流程。

> [tab] ChatGPT
>
> 1. 在网页版 ChatGPT 中打开 **Plugins → + → Add custom MCP server**。
> 2. 将连接命名为 `ProxyLayer`。
> 3. 在 **Connection** 中输入 `https://mcp.proxy-layer.com/mcp` 并配置身份验证。
> 4. 确认风险提示，选择 **Create as a plugin**，然后检查发现的工具。
>
> ChatGPT Business 和 Enterprise/Edu 网页版支持此功能。工作区权限可能会限制设置。[ChatGPT 设置指南](https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt)。

> [tab] Grok
>
> 1. 打开 [grok.com/connectors](https://grok.com/connectors)。
> 2. 选择 **New Connector → Custom**，将连接命名为 `ProxyLayer`，输入上方的 endpoint 并完成身份验证。
>
> 团队管理员可能需要先添加此连接器。[Grok 设置指南](https://docs.x.ai/grok/connectors)。

> [tab] Cursor
>
> > [card] [添加到 Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=proxylayer\&config=eyJwcm94eWxheWVyIjp7InVybCI6Imh0dHBzOi8vbWNwLnByb3h5LWxheWVyLmNvbS9tY3AifX0%3D)
> >
> > 将 ProxyLayer 安装为远程 MCP 服务器。Cursor 会提示你通过 OAuth 授权。
>
> 如果链接无法打开 Cursor，请将以下内容添加到 `mcp.json`：
>
> ```json mcp.json theme={}
> {
>   "mcpServers": {
>     "proxylayer": {
>       "url": "https://mcp.proxy-layer.com/mcp"
>     }
>   }
> }
> ```

> [tab] Claude
>
> 在 Claude 或 Claude Desktop 中打开 **Customize → Connectors**，选择 **Add**，然后选择 **Custom → Web**。将连接命名为 `ProxyLayer`，输入此端点并完成身份验证：
>
> ```text Endpoint theme={}
> https://mcp.proxy-layer.com/mcp
> ```
>
> 在浏览器中批准访问。Team 和 Enterprise 工作区可能需要管理员先添加连接器。

> [tab] API 密钥和本地连接
>
> **使用 API 密钥连接远程服务器** — 将此服务器添加到客户端的 MCP 配置：
>
> ```json mcp.json theme={}
> {
>   "mcpServers": {
>     "proxylayer": {
>       "url": "https://mcp.proxy-layer.com/mcp",
>       "headers": {
>         "Authorization": "Bearer pl_live_YOUR_KEY"
>       }
>     }
>   }
> }
> ```
>
> 删除 `headers` 可使用公开工具，也可以在对话中通过邮箱 OTP 申请 API 密钥。
>
> **本地（stdio）** — 适用于会启动本地进程的客户端：
>
> ```json mcp.json theme={}
> {
>   "mcpServers": {
>     "proxylayer": {
>       "command": "npx",
>       "args": ["-y", "@proxylayer/cli", "mcp"]
>     }
>   }
> }
> ```
>
> OTP 登录后，CLI 会将密钥保存到 `~/.config/proxylayer/config.json`（权限 `0600`）并自动复用。

## 可用工具

OAuth 的 scope 使用 `mcp:` 前缀。

| 工具 | Scope | 用途 |
| - | - | - |
| `get_catalog` | public | 列出产品、国家/地区、期限和价格。 |
| `quote_purchase` | public | 计算购买、续费或钱包充值的价格。 |
| `auth_request_otp` | public | 发送邮箱验证码。 |
| `auth_verify_otp` | public | 验证验证码、自动创建新账户并签发 API 密钥。 |
| `get_account` | account:read | 账号 ID、名称、钱包余额（美分）、模式与权限。 |
| `get_account_summary` | account:read orders:read | 余额、活跃或即将到期的代理，以及未完成的结账。 |
| `create_checkout` | orders:write | Stripe/加密货币结账或余额付款。 |
| `get_checkout_status` | orders:read | 付款和开通状态。 |
| `list_orders` | orders:read | 订单和充值记录。 |
| `list_static_proxies` | proxies:read | ISP、Datacenter 和 Mobile 代理（默认不返回凭据）。 |
| `manage_static_proxies` | proxy:write | 备注和标签。 |
| `renew_static_proxies` | orders:write | 续费 ISP 或 Datacenter 代理。 |
| `get_residential_balance` | proxies:read | Residential 流量余额。 |
| `get_residential_proxies` | proxies:read | Residential 代理连接字符串。 |

* 续费需要认证。

REST 集成可使用 `rest:account:read`（OAuth）或 `account:read`（API 密钥）调用 `GET /api/v1/account`。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.