Connect Cursor to SePay via MCP

How to connect Cursor to SePay via MCP with an mcp.json file, to look up transactions, webhooks, bank accounts and SePay integration docs...

||

You add SePay to Cursor with one configuration block in an mcp.json file. Cursor opens the browser for you to sign in to SePay and grant access.

Before you start

  1. The Cursor desktop app, signed in to a Cursor account.
  2. Access to the AI Agent page on SePay, see requirements on SePay.

Connection steps

The steps follow Cursor as of November 2026 and Cursor's guide. If Cursor changes, look for items with the same meaning or contact SePay for help.

Step 1: Get the Cursor config on SePay

  1. Sign in to my.sepay.vn.
  2. In the left menu, under Tích hợp & Thông báo, select AI Agent.
  3. Select Tạo kết nối (Create connection) at the top right.
  4. Under Bạn dùng ứng dụng AI nào? (Which AI app do you use?), choose Cursor.

The Cấu hình cho Cursor (Cursor config) step shows a config block for the mcp.json file, with the address https://my.sepay.vn/mcp and the Client ID sepay-mcp already in it. Select the copy button to paste it into Cursor in Step 2.

Tạo kết nối (Create connection) page on my.sepay.vn with Cursor selected, showing the mcp.json config block and its copy button
Click to expand
Select Cursor, then copy the config block.

Step 2: Add SePay to Cursor

  1. In Cursor, select Customize in the left sidebar.
  2. Select the MCPs tab.
  3. At the bottom of the list, select New MCP Server (Add a Custom MCP Server). Cursor opens ~/.cursor/mcp.json in the right pane.
  4. Paste this configuration into the file and save it (Ctrl+S, on macOS Cmd+S):
~/.cursor/mcp.json
{
  "mcpServers": {
    "sepay": {
      "url": "https://my.sepay.vn/mcp",
      "auth": { "CLIENT_ID": "sepay-mcp" }
    }
  }
}

If the file already has other MCP servers, add only the "sepay": { ... } block inside mcpServers, separated from the block before it by a comma.

The auth block with CLIENT_ID sepay-mcp is required. Without it, Cursor can't sign in to SePay. No CLIENT_SECRET is needed.

To use SePay in one project only, put the configuration above in .cursor/mcp.json in that project's root folder.

Cursor Customize page on the MCPs tab, with 1 on Customize, 2 on the MCPs tab, 3 on New MCP Server and 4 on the sepay block in mcp.json on the right
Click to expand
Select Customize (1), the MCPs tab (2), New MCP Server (3), paste the sepay block into mcp.json (4) and save.

Step 3: Sign in to SePay from Cursor

Once the file is saved, SePay shows under Needs Attention on the MCPs tab as Sepay (Cursor capitalizes sepay), with Needs authentication. Select Authenticate on that row. Cursor opens the browser to the SePay access screen.

Grant Cursor access on SePay

Step 4: Grant access

Cursor uses the shared Client ID sepay-mcp, so SePay shows the Ứng dụng khác muốn truy cập dữ liệu SePay của bạn (Another app wants to access your SePay data) screen without Cursor's name. On that screen:

  1. Turn each data group on or off under AI được phép xem (AI may view).
  2. If needed, open Ẩn bớt thông tin cho ứng dụng này (Hide more information for this app).
  3. Select Đồng ý cấp quyền (Grant access).

What each data group and hiding option means is in SePay MCP permissions and security.

SePay screen Ứng dụng khác muốn truy cập dữ liệu SePay của bạn (Another app wants to access your SePay data; Cursor uses the sepay-mcp Client ID): the permission groups under AI may view, the write actions group switched off by default and what the AI is not allowed to do
Click to expand
Turn on the data Cursor may read, open Hide more information for this app if needed, then select Đồng ý cấp quyền.

SePay shows a page saying access was granted, then returns to Cursor after a few seconds. If it doesn't, select Hoàn tất kết nối (Finish connecting).

When Sepay moves to Connected on the MCPs tab, with a count of tools enabled, the connection is done.

MCPs tab in Cursor Customize, with Sepay under Connected showing 19 tools enabled
Click to expand
Sepay under Connected, with the number of tools enabled.

On the SePay AI Agent page, this connection shows as SePay MCP in the Ứng dụng đã kết nối (Connected apps) tab. You can rename it to something easy to recognize, for example "Cursor work laptop", see Manage connections.

Ask Cursor about your SePay data

Select New Chat in Cursor's left sidebar and ask, for example "My transactions this month". Cursor may ask you before using a SePay tool: approve to continue. When Cursor calls a sepay tool and answers from the transactions on your account, the connection works. Here sepay is the name you gave SePay MCP in mcp.json, not the SePay CLI.

Cursor chat: a question about this month's transactions, Cursor calls a SePay tool and summarises the count, money in and money out
Click to expand
Ask about your data (1); Cursor calls a SePay tool (2) and summarizes the transactions on your account (3). The amounts in the image were replaced with sample values.

Look up SePay integration docs

Cursor can read the docs on developer.sepay.vn through SePay MCP, even before you grant access. When you ask an integration question, it reads the relevant docs page and answers with a link to it. Open the link to check before using the code. For example:

  • "Write a Node.js endpoint that receives SePay webhooks and skips duplicate transactions."
  • "How does the SePay payment gateway send IPN, and what must I return?"
  • ...
Cursor chat: a question about the payment confirmation flow for an online store, Cursor calls 7 SePay tools and answers from the SePay docs
Click to expand
Ask an integration question (1); Cursor calls SePay tools to read the docs (2) and answers with links to the docs pages.

Disconnect Cursor

Delete the "sepay": { ... } block from ~/.cursor/mcp.json and save; Sepay disappears from the MCPs tab.

This does not revoke the connection on SePay. To revoke it, go to the AI Agent page, see Manage connections.

Common errors

Common SePay MCP errors are in Common errors when connecting SePay MCP.

Next steps

  • See sample questions for each kind of data in SePay MCP tools.
  • Install SePay Skills so Cursor knows SePay's integration flows and security notes when writing integration code.