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

# MCP 服务器

使用模型上下文协议（MCP），将您由 AI 驱动的工作流连接到 Localpayment 的实时 API 规范和文档。包含 Cursor、VS Code、Claude、Windsurf、ChatGPT、Gemini CLI、JetBrains 等工具的设置说明。

Localpayment MCP 服务器让任何兼容 MCP 的 AI 工具都能直接访问实时 API 规范和文档。配置完成后，您的 AI 助手可以发现 endpoint、读取参数架构、搜索指南，并生成准确的集成代码——这些都基于当前规范，而不是可能已过时的训练数据。

> [!NOTE]
>
> **快速入门**：Localpayment MCP 服务器可在以下网址获取： `https://docs.localpayment.com/mcp`它是公开的，无需身份验证。

***

## 什么是 MCP？

模型上下文协议（MCP）是一项开放标准，其作用就像 AI 的 USB 接口——它为 AI 助手提供了一种连接外部数据源和工具的标准化方式。您的 AI 工具不再依赖静态且可能已过时的 API 训练快照，而是实时查询最新的 Localpayment 文档。

***

## 连接到 MCP 服务器

选择您的 AI 工具以获取配置：

> [tab] Cursor
>
> [在 Cursor 中安装](cursor://anysphere.cursor-deeplink/mcp/install?name=localpayment\&config=eyJ1cmwiOiJodHRwczovL2RvY3MubG9jYWxwYXltZW50LmNvbS9tY3AifQ==)
>
> 或者手动添加 `~/.cursor/mcp.json`：
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "mcpServers": {
>     "localpayment": {
>       "url": "https://docs.localpayment.com/mcp"
>     }
>   }
> }
> ```
>
> 重启 Cursor 并打开 AI 聊天。Localpayment 工具将自动可用。

> [tab] VS Code (Copilot)
>
> [在 VS Code 中安装](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22type%22%3A%22http%22%2C%22name%22%3A%22localpayment%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.localpayment.com%2Fmcp%22%7D)
>
> 或者手动添加到您的 VS Code `settings.json` 或 `.vscode/mcp.json`：
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "mcp": {
>     "servers": {
>       "localpayment": {
>         "type": "http",
>         "url": "https://docs.localpayment.com/mcp"
>       }
>     }
>   }
> }
> ```
>
> 需要启用 MCP 支持的 GitHub Copilot Chat。

> [tab] Claude Desktop
>
> 将以下内容添加到您的 `claude_desktop_config.json`：
>
> **macOS**：`~/Library/Application Support/Claude/claude_desktop_config.json`
> **Windows**：`%APPDATA%\Claude\claude_desktop_config.json`
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "mcpServers": {
>     "localpayment": {
>       "url": "https://docs.localpayment.com/mcp"
>     }
>   }
> }
> ```
>
> 重启 Claude Desktop 以应用配置。

> [tab] Claude Code
>
> 在终端中运行以下命令：
>
> ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> claude mcp add localpayment --url https://docs.localpayment.com/mcp
> ```
>
> > [!NOTE]
> >
> > 这是最快捷的设置方式——只需一条命令，即可将 Localpayment MCP 服务器永久添加到您的 Claude Code 项目中。
>
> 此 MCP 服务器将在该项目今后的所有 Claude Code 会话中可用。

> [tab] Windsurf
>
> 将以下内容添加到 `~/.codeium/windsurf/mcp_config.json`：
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "mcpServers": {
>     "localpayment": {
>       "url": "https://docs.localpayment.com/mcp"
>     }
>   }
> }
> ```
>
> 重启 Windsurf 以应用配置。

> [tab] ChatGPT
>
> 1. 打开 **ChatGPT** 并转到 **设置 → 连接器**。
> 2. 选择 **“添加自定义连接器”** 。
> 3. 输入 MCP 服务器 URL：`https://docs.localpayment.com/mcp`
> 4. 保存并开始新的对话。
>
> Localpayment 工具将在您的聊天会话中可用。

> [tab] Gemini CLI
>
> 将以下内容添加到您的 Gemini CLI MCP 配置文件：
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "mcpServers": {
>     "localpayment": {
>       "url": "https://docs.localpayment.com/mcp"
>     }
>   }
> }
> ```

> [tab] JetBrains
>
> 1. 打开 **设置 → 工具 → AI 助手 → MCP 服务器**。
> 2. 点击 **添加** 并输入：
>    * **名称**：Localpayment
>    * **网址**： `https://docs.localpayment.com/mcp`
> 3. 应用并重启 IDE。

> [tab] OpenHands
>
> [OpenHands](https://github.com/All-Hands-AI/OpenHands) 是一个开源的 AI 软件开发平台，原生支持 MCP。
>
> **通过 OpenHands 界面：**
>
> 1. 打开 OpenHands 并转到 **设置 → MCP**。
> 2. 添加新服务器，设置如下：
>    * **传输方式**：Streamable HTTP
>    * **网址**： `https://docs.localpayment.com/mcp`
> 3. 保存。Localpayment 工具将自动对代理可用。
>
> **通过 `config.toml`：**
>
> ```toml theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> [mcp]
> [[mcp.servers]]
> name = "localpayment"
> transport = "streamable_http"
> url = "https://docs.localpayment.com/mcp"
> ```

> [tab] OpenCode
>
> [OpenCode](https://opencode.ai) 是一个面向终端的开源 AI 编码代理，原生支持 MCP。
>
> 将以下内容添加到您的 `opencode.jsonc` 配置文件（项目根目录或 `~/.config/opencode/opencode.jsonc`）：
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "$schema": "https://opencode.ai/config.json",
>   "mcp": {
>     "localpayment": {
>       "type": "remote",
>       "url": "https://docs.localpayment.com/mcp",
>       "enabled": true
>     }
>   }
> }
> ```
>
> 添加后，Localpayment MCP 工具将与内置工具一起自动对 LLM 可用。在提示中引用它们：`use the localpayment tool to...`
>
> > [!NOTE]
> >
> > OpenCode 是开源的（MIT），支持 Claude、OpenAI、Google 和本地模型。有关其他配置选项（包括按代理管理工具），请参阅 [OpenCode MCP 文档](https://opencode.ai/docs/mcp-servers/)。

> [tab] 其他
>
> 任何支持 HTTP 传输的兼容 MCP 的工具都可以使用以下配置进行连接：
>
> ```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> {
>   "mcpServers": {
>     "localpayment": {
>       "url": "https://docs.localpayment.com/mcp"
>     }
>   }
> }
> ```
>
> 具体配置格式请参阅您所用工具的文档。

***

## 可用工具

连接后，您的 AI 助手可以使用以下工具：

| 工具 | 说明 | 使用示例 |
| :- | :- | :- |
| `list-endpoints` | 列出所有 API 路径及其 HTTP 方法和摘要，按路径组织 | “虚拟账户有哪些可用的 endpoint？” |
| `get-endpoint` | 返回特定 endpoint 的完整详情：参数、请求正文、响应架构和安全性 | “向我展示创建虚拟账户 endpoint 的完整规范” |
| `search-endpoints` | 按关键字深度搜索路径、操作和组件架构——可用于按功能或数据模型发现 endpoint | “查找所有与别名相关的操作” |
| `search` | 按查询搜索指南页面，返回包含 ID、标题和 URL 的结果列表 | “查找关于阿根廷 CVU 别名的指南” |
| `fetch` | 通过 ID 获取指南页面的完整内容 — 使用 `search` 首先获取ID | “获取虚拟账户概览的完整内容” |

> [!NOTE]
>
> 这 `execute-request` 该工具未在 Localpayment MCP 服务器上启用。服务器为 **只读模式** ——它提供文档和规范信息的访问权限，但不会代表您执行 API 调用。要在开发期间运行实时请求，请使用 [Postman Collection](https://docs.localpayment.com/zh/reference/postman-collection.md) 或您自己的带有 Stage 凭据的 HTTP 客户端。

***

## 验证您的设置

配置完成后，打开 AI 工具的聊天或代理界面，使用以下提示确认 MCP 服务器已连接，并获取 Localpayment API 的完整概览：

```
Using the Localpayment MCP tools, explore the full API and give me a 
complete overview of everything available: list all endpoints organized 
by product area (PayIns, PayOuts, Virtual Accounts, Treasury/FX, etc.), 
explain what each major feature does, identify which countries are 
supported, and explain the key integration patterns. I want a full map 
of the API as my starting point before building my integration.
```

您的AI助手将调用MCP工具（`list-endpoints`， `search`， `fetch` ）并从实时Localpayment文档返回结构化摘要。

> [!NOTE]
>
> `fetch` 工具需要的是指南 **ID**，而不是 URL。请先使用 `search` 查找指南并获取其 ID，然后将该 ID 传递给 `fetch` 以获取完整内容。示例：搜索“虚拟账户概览”→ 获取 ID `localpayment/virtual-accounts-overview` → 使用该 ID 调用 `fetch`。

***

## 故障排除

> [accordion] MCP 服务器无法连接
>
> * 请确认 URL 恰好是 `https://docs.localpayment.com/mcp`，末尾不带任何斜杠变体。
> * 请确保您的编辑器或工具支持 MCP 的 **HTTP 传输**（而非仅支持 stdio）。本页面上的所有配置均使用 HTTP。
> * 保存配置文件后请重启编辑器。
> * 检查您的网络连接并确认您可以访问 `https://docs.localpayment.com` 在浏览器中。

> [accordion] AI 助手未使用 MCP 工具
>
> * 某些编辑器需要您在聊天设置或代理模式中显式启用 MCP 工具。
> * 在 Cursor 中，请确保使用 **Agent** 模式（而非 **Ask** 模式），这样工具调用才可用。
> * 在带有 Copilot 的 VS Code 中，请确认已安装 MCP 扩展，且服务器在设置中显示为已连接。

> [accordion] 工具返回过时或意外的信息
>
> * MCP 服务器反映的是 Localpayment 文档当前已发布的版本。如果您认为存在差异，请联系 [support@localpayment.com](mailto:support@localpayment.com)。

***

## 后续步骤

> [card] [提示库](https://docs.localpayment.com/zh/docs/prompt-library.md)
>
> 可直接使用的提示，用于构建集成、调试错误和生成测试——按国家/地区和使用场景组织。

> [card] [人工智能代理](https://docs.localpayment.com/zh/docs/ai-agents.md)
>
> 在您偏好的 AI 框架中部署 Localpayment Integrator Agent。


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