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

# Connect AI via MCP

> Connect to MCP covering What MCP Can Do for You, Getting Started.

HaiPay MCP (Model Context Protocol) is an open standard AI tool integration protocol that allows AI assistants to directly access HaiPay’s payment knowledge base, API documentation, and technical resources.
When you need to repeatedly consult documentation to complete integration, connecting MCP enables the AI to directly understand and apply HaiPay’s payment capabilities, helping you quickly integrate HaiPay APIs.

## What MCP Can Do for You

Once connected to HaiPay MCP, you can ask your AI assistant to:

* **Quickly integrate payment features**
  Example: Based on HaiPay documentation, help me implement a Brazil PIX collection interface, including signature logic and callback handling.

* **Query API parameter specifications**
  Example: Show me the required fields and signature rules for the Philippines collection interface, and generate a parameter comparison table.

* **Troubleshoot integration issues**
  Example: The order status is always PENDING. Help me check the description of the callback notification signature verification logic.

* **Generate integration code**
  Example: Using HaiPay’s collection and payout process, write a complete payment request example in Java/PHP/Python.

* **Understand business workflows**
  Example: Explain HaiPay’s asynchronous notification mechanism and how merchants should respond to ensure order status synchronization.

## Getting Started

HaiPay MCP will provide the AI assistant with real-time access to:

* API documentation
* Signature rules
* Error code descriptions
* Supported regions and currencies

This makes your integration process more efficient and accurate. Below are examples of connecting to HaiPay MCP:

**Claude**

To connect the HaiPay MCP server to Claude Desktop, follow these steps:

**1. Add a custom connector**

1. Open Claude Desktop and go to **Settings**.
2. Navigate to the [Connectors](https://claude.ai/settings/connectors) page.
3. Click **Add custom connector**.
4. Fill in the following information:
   * **Name**: `HaiPay`
   * **URL**: `https://doc.haipay.net/mcp`
5. Click **Add**.

**2. Use MCP in a chat**

1. In the Claude chat interface, click the attachments button (the plus icon).
2. Select the HaiPay MCP server.
3. You can now ask Claude questions about HaiPay, and it will search the documentation via MCP to provide answers.

See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details.

**Claude Code**

To connect the HaiPay MCP server to Claude Code, run the following command in your terminal:

```bash theme={null} theme={null}
claude mcp add --transport http HaiPay https://doc.haipay.net/mcp
```

Verify the connection by running:

```bash theme={null} theme={null}
claude mcp list
```

The HaiPay MCP server should appear in the list of available servers. You can also type `/mcp` in a Claude Code session to check the live connection status.

See the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.

**Codex**

To connect the HaiPay MCP server to Codex CLI, edit the configuration file at `~/.codex/config.toml` and add the following:

```toml theme={null} theme={null}
[mcp_servers.HaiPay]
url = "https://doc.haipay.net/mcp"
```

After saving the file, start a Codex session and test the connection by asking:

```text theme={null} theme={null}
What tools do you have available?
```

Codex should list the HaiPay MCP server as an available tool.

See the [Codex MCP documentation](https://developers.openai.com/codex/mcp) for more details.

**Cursor**

[Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=HaiPay\&config=eyJuYW1lIjoiSGFpUGF5IiwidXJsIjoiaHR0cHM6Ly9kb2MuaGFpcGF5Lm5ldC9tY3AifQ%3D%3D)

To connect the HaiPay MCP server to Cursor, click the **Install in Cursor** button.
To manually connect the MCP server, follow these steps:

**1. Open MCP Settings**

1. Use <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (on Windows: <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) to open the command palette.
2. Search for “Open MCP settings”.
3. Select **Add custom MCP**. This opens the `mcp.json` file.

**2. Configure HaiPay MCP Server**

Add the following to `mcp.json`:

```json theme={null} theme={null}
{
    "mcpServers": {
        "Haipay": {
            "url": "https://doc.haipay.net/mcp"
        }
    }
}
```

**3. Test the Connection**

In Cursor chat, type “What tools do you have available?”. Cursor should display the HaiPay MCP server as an available tool.

See [Installing MCP servers](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) in Cursor documentation for more details.

**Qoder**

[Install in Qoder IDE](qoder://aicoding.aicoding-deeplink/mcp/add?name=HaiPay\&config=JTdCJTIydXJsJTIyJTNBJTIyaHR0cHMlM0ElMkYlMkZkb2MuaGFpcGF5Lm5ldCUyRm1jcCUyMiU3RA%3D%3D)

To connect the HaiPay MCP server to Qoder, after installing the local Qoder IDE, add the following JSON field to your IDE settings:

```json theme={null} theme={null}
{
    "servers": {
        "Haipay": {
            "type": "http",
            "url": "https://doc.haipay.net/mcp"
        }
    }
}
```

See [Qoder documentation](https://docs.qoder.com/zh/user-guide/chat/model-context-protocol) for more details.

**VS Code**

[Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22HaiPay%22%2C%22url%22%3A%22https%3A%2F%2Fdoc.haipay.net%2Fmcp%22%7D)

To connect the HaiPay MCP server to VS Code, after installing the local VS Code IDE, create a `.vscode/mcp.json` file and add:

```json theme={null} theme={null}
{
    "servers": {
        "Haipay": {
            "type": "http",
            "url": "https://doc.haipay.net/mcp"
        }
    }
}
```

See [VS Code documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers) for more details.

## Related Topics

* [AI Skills for HaiPay Integration](https://doc.haipay.net/en/history/V20260801/resources/ai/haipay-skills.md)
* [HaiPay Integration Steps Guide](https://doc.haipay.net/en/history/V20260801/get-started/integration-steps.md)
* [HaiPay Merchant Guide](https://doc.haipay.net/en/history/V20260801/overview.md)


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