> ## 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 to HaiPay MCP

export const PreviewButton = ({children, href}) => {
  return <a href={href} className="text-sm font-medium text-white dark:!text-zinc-950 bg-zinc-900 hover:bg-zinc-700 dark:bg-zinc-100 hover:dark:bg-zinc-300 rounded-full px-3.5 py-1.5 not-prose">
        {children}
    </a>;
};

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:

<Tabs>
  <Tab title="Cursor">
    <PreviewButton href="cursor://anysphere.cursor-deeplink/mcp/install?name=HaiPay&config=eyJuYW1lIjoiSGFpUGF5IiwidXJsIjoiaHR0cHM6Ly9kb2MuaGFpcGF5Lm5ldC9tY3AifQ%3D%3D">Install in Cursor</PreviewButton>

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

    <Steps>
      <Step title="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.
      </Step>

      <Step title="Configure HaiPay MCP Server">
        Add the following to `mcp.json`:

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

      <Step title="Test the Connection">
        In Cursor chat, type “What tools do you have available?”. Cursor should display the HaiPay MCP server as an available tool.
      </Step>
    </Steps>

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

  <Tab title="Qoder">
    <PreviewButton href="qoder://aicoding.aicoding-deeplink/mcp/add?name=HaiPay&config=JTdCJTIydXJsJTIyJTNBJTIyaHR0cHMlM0ElMkYlMkZkb2MuaGFpcGF5Lm5ldCUyRm1jcCUyMiU3RA%3D%3D">Install in Qoder IDE</PreviewButton>

    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.
  </Tab>

  <Tab title="VS Code">
    <PreviewButton href="vscode:mcp/install?%7B%22name%22%3A%22HaiPay%22%2C%22url%22%3A%22https%3A%2F%2Fdoc.haipay.net%2Fmcp%22%7D">Install in VS Code</PreviewButton>

    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/copilot/chat/mcp-servers) for more details.
  </Tab>
</Tabs>

## Related Topics

* [AI Skills for HaiPay Integration](/docs/en/ai/haipay_skills)
* [HaiPay Integration Steps Guide](/docs/en/guide/integration_guide)
* [HaiPay Merchant Guide](/docs/en/guide/README)
