AlipayPlus MCP Server
OfficialProvides tools for creating, querying, and canceling payments, as well as initiating refunds and customs declarations through AlipayPlus APIs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AlipayPlus MCP Server Create a payment of 99.99 USD to customer order #12345"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AlipayPlus MCP Server
A Model Context Protocol (MCP) compatible server that integrates Ant International's AlipayPlus payment APIs, enabling AI assistants to handle payment and refund operations seamlessly.
Overview
The AlipayPlus MCP Server wraps Ant International's AlipayPlus payment APIs into standardized MCP tools, allowing AI assistants to securely process payment-related operations during conversations. With this server, you can create payments, query transaction status, handle refunds, and more directly through AI interactions.
Related MCP server: Antom MCP Server
Features
π³ Payment Operations
Create Payment (
create_payment): Generate payment requests for processing transactionsQuery Payment (
query_payment): Retrieve transaction status and information for submitted payment requestsCancel Payment (
cancel_payment): Cancel payments when results are not returned within expected timeframes
π° Refund Operations
Create Refund (
create_refund): Initiate full or partial refunds against successful payments
π Customs Operations
Customs Declare (
customs_declare): Declare a payment to customs or update an existing declarationQuery Customs Declaration (
query_customs_declare): Inquire about the status of declared payments
Prerequisites
Before using the AlipayPlus MCP Server, ensure you have:
Python 3.11 or higher
uv (recommended package manager) or pip
Valid AlipayPlus Merchant Account with:
Merchant Client ID (CLIENT_ID)
Merchant RSA Private Key (MERCHANT_PRIVATE_KEY)
Alipay RSA Public Key (ALIPAY_PUBLIC_KEY)
Payment Notification Callback URL (PAYMENT_NOTIFY_URL)
Quick Start
1. Installation
Direct Usage with uvx (Recommended)
uvx ant-intl-alipayplus-mcpInstall with pip
pip install ant-intl-alipayplus-mcpInstall with uv
uv install ant-intl-alipayplus-mcpInstall from Source
git clone https://github.com/alipay/global-alipayplus-mcp.git
cd global-alipayplus-mcp
uv installRequirements
Python 3.11 or higher
Dependencies:
cryptography==44.0.3
mcp[cli]>=1.9.1
pycryptodome==3.22.0
rsa>=4.9.1
2. MCP Client Configuration
Add the following configuration to your MCP client:
{
"mcpServers": {
"alipayplus-mcp": {
"command": "uvx",
"args": ["ant-intl-alipayplus-mcp"],
"env": {
"GATEWAY_URL": "https://open-sea-global.alipay.com",
"CLIENT_ID": "your_client_id_here",
"MERCHANT_PRIVATE_KEY": "your_merchant_private_key_here",
"ALIPAY_PUBLIC_KEY": "your_alipay_public_key_here",
"PAYMENT_NOTIFY_URL": "https://your-domain.com/payment/notify",
"SETTLEMENT_CURRENCY": "USD",
"MERCHANT_NAME": "Your Merchant Name",
"MERCHANT_ID": "Your Merchant ID",
"MERCHANT_MCC": "5411",
"MERCHANT_REGION": "US"
}
}
}
}3. Environment Variables
Variable | Required | Description |
| β | AlipayPlus API gateway URL (defaults to https://open-sea-global.alipay.com) |
| β | Merchant client ID for identity verification |
| β | Merchant RSA private key for request signing |
| β | Alipay RSA public key for response verification |
| β | URL to redirect after payment (defaults to empty string) |
| β | Payment result notification callback URL (defaults to http://localhost:8080/notify) |
| β | Currency for settlement (defaults to empty string) |
| β | Merchant name (defaults to "Alipayplus MCP") |
| β | Merchant ID (defaults to "M0000000001") |
| β | Merchant Category Code (defaults to "5411") |
| β | Merchant region code (defaults to "CN") |
Integration Example
Here's how you can integrate the AlipayPlus MCP Server with your AI agent (using QwenAgent as an example):
import os
from qwen_agent.agents import Assistant
# Configure the MCP server as a tool
tools = [{
"mcpServers": {
"alipayplus-mcp": {
"command": "uvx",
"args": ["ant-intl-alipayplus-mcp"],
"env": {
"CLIENT_ID": os.getenv('CLIENT_ID'),
"MERCHANT_PRIVATE_KEY": os.getenv('MERCHANT_PRIVATE_KEY'),
"ALIPAY_PUBLIC_KEY": os.getenv('ALIPAY_PUBLIC_KEY'),
"GATEWAY_URL": "https://open-sea-global.alipay.com",
"PAYMENT_NOTIFY_URL": "https://your-domain.com/notify"
}
}
}
}]
# Create your AI assistant with payment capabilities
bot = Assistant(
llm={'model': 'qwen-max', 'api_key': 'your-api-key'},
function_list=tools,
)Changelog
See CHANGELOG.md for a detailed history of changes.
License
This project is licensed under the MIT License.
Acknowledgments
Model Context Protocol for the standard
AlipayPlus Integration for the AlipayPlus payment platform
Available Tools
6 toolscancel_paymentA
The tool is used by the Acquiring Service Provider (ACQP) to proactively cancel a payment when no payment result is received after the payment expires, or when the ACQP closes the payment before receiving the payment result.
Args:
payment_request_id: The request ID of the payment to be canceled, assigned by the ACQP to identify the original payment order.Maximum length: 64 characters
Inputs: payment_request_id (required). Returns: result
create_paymentA
The tool is used by the Acquiring Service Provider (ACQP) to send a request to Alipay+ to place orders.
Args:
payment_request_id: TThe unique ID assigned by a merchant to identify a payment request. Maximum length: 64 characters
order_amount_currency: The transaction currency that is specified in the contract. A 3-letter currency code that follows the ISO 4217 standard.Maximum length: 3 characters
order_amount_value: The amount to charge as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge JPY 100, a 0-decimal currency).Value range: 1 - unlimited
order_description: Summary description of the order, which is used for user consumption records display or other further actions.Maximum length: 256 characters
Inputs: order_description (required), order_amount_value (required), payment_request_id (required), order_amount_currency (requir⦠Returns: result
create_refundA
The tool is used by the Acquiring Service Provider (ACQP) to initiate a refund of a successful payment.The refund can be full or partial. A transaction can have multiple refunds as long as the total refund amount is less than or equal to the original transaction amount.
Args:
payment_request_id: The request ID of the payment to be refunded, assigned by the ACQP to identify the original payment order.Maximum length: 64 characters
refund_request_id: The unique ID that is assigned by the ACQP to identify a refund request. Maximum length: 64 characters.
refund_amount_value: The amount to charge as a positive integer in the smallest currency unit. (That is, 100 cents to charge $1.00, or 100 to charge JPY 100, a 0-decimal currency).Value range: 1 - unlimited
refund_currency: The currency code of the amount. The value of this parameter must be an alphabetic code that follows the ISO 4217 standard, for example, "EUR" for Euros.
Inputs: refund_currency (required), refund_request_id (required), payment_request_id (required), refund_amount_value (required). Returns: result
customs_declareA
The tool is used by the Acquiring Service Provider (ACQP) to declare a payment to customs or update an existing declaration.
Args:
payment_request_id: The unique ID that is assigned by the ACQP to identify a payment request for the order.Maximum length: 64 characters
customs_declaration_request_id: The unique ID that is assigned by the merchant to identify a customs declaration request. This parameter is not provided for the customs. Maximum length: 64 characters
declaration_amount_value: The customs declaration amount as a natural number.Value range: 1 - unlimited
customs_code: The customs code (in either uppercase or lowercase). Maximum length: 128 characters
merchant_customs_code: The merchant code that is registered in the customs system. Maximum length: 128 characters
merchant_customs_name: The merchant name that is registered in the customs system. Maximum length: 256 characters
is_split: This parameter indicates whether the payment order needs to be split for declaration. Valid values are:
true: indicates that order splitting is needed.
false: indicates that order splitting is not needed.
reference_order_id: The unique ID that is assigned by the merchant to identify an order that needs to be declared to the customs. Maximum length: 64 characters
Inputs: is_split (required), customs_code (required), payment_request_id (required), reference_order_id (required), +4 more. Returns: result
query_customs_declareA
The tool is used by the Acquiring Service Provider (ACQP) to inquire about the status of declared payments.
Args:
declaration_request_ids: The unique declaration request IDs that are assigned by the merchant to identify declaration requests. Up to 10 declaration request IDs are supported at a time. Maximum length: 64 characters. Maximum size: 10 elements
Inputs: declaration_request_ids (required). Returns: result
query_paymentA
The tool is used by the Acquiring Service Provider (ACQP) to query the payment result if no payment result is received after a certain period of time.
Args:
payment_request_id: The unique ID that is assigned by a merchant to identify a payment request.Maximum length: 64 characters
Inputs: payment_request_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 6 tools
Each tool targets a distinct operation: payment creation, payment query, payment cancellation, refund creation, customs declaration, and customs query. No overlap exists, and the purposes are clearly separated.
Most tools follow a clear verb_noun pattern (create_payment, query_payment, cancel_payment, create_refund). However, 'customs_declare' and 'query_customs_declare' use a different structure, deviating from the pattern established by the other tools.
With 6 tools, the set is well-scoped for a payment processing server. Each tool covers a distinct aspect of the payment lifecycle, and the number is neither too small nor excessive.
The server covers the main payment operations (create, query, cancel) and refunds, but lacks a dedicated refund query tool. While refunds can be initiated, agents cannot independently verify refund status, which is a notable gap in lifecycle coverage.
Maintenance
Related MCP Connectors
Hong Kong payments for AI agents β Alipay / WeChat Pay via Stripe. Never holds funds.
Taiwan payments (ECPay ηΆ η + NewebPay θζ°) & e-invoices for AI agents. Stateless, never holds funds.
Manage GoCardless payments, mandates, subscriptions, refunds and payouts via AI assistants.
First AI Agent e-commerce marketplace with 74+ AI products, MCP protocol, and Alipay payments
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to interact with multiple payment providers (Stripe, Paystack) through a unified API. Supports payment initialization, verification, refunds, customer management, and invoicing without requiring knowledge of specific provider implementations.2-

Antom MCP Serverofficial
AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) compatible server that integrates Ant International's Antom payment APIs, enabling AI assistants to handle payment and refund operations seamlessly.532MIT- AlicenseAqualityBmaintenanceAn MCP server that exposes Alipay AI Pay capabilities to AI agents, enabling skill discovery, payment integration guides, and merchant onboarding workflows via Alipay's payment APIs.4114 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to manage transactions, initiate payments, and integrate with the OPSG/iPay88 payment gateway using local merchant credentials.-