AlipayPlus MCP Server
OfficialProvides tools for creating, querying, and canceling payments, as well as initiating refunds and customs declarations through AlipayPlus APIs.
Click on "Install 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 ServerCreate 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.
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alipay/global-alipayplus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server