Skip to main content
Glama
Antom MCP Server

Antom MCP Server

Official
by ant-intl

Antom MCP Server

A Model Context Protocol (MCP) compatible server that integrates Ant International's Antom payment APIs, enabling AI assistants to handle payment and refund operations seamlessly.

Overview

The Antom MCP Server wraps Ant International's Antom payment APIs into standardized MCP tools, allowing AI assistants to securely process payment-related operations during conversations. With this server, you can create payment sessions, query transaction status, handle refunds, and more directly through AI interactions.

Related MCP server: AlipayPlus MCP Server

Features

πŸ’³ Payment Operations

  • Create Payment Session (create_payment_session): Generate payment sessions for client-side SDK integration

  • Query Payment Details (query_payment_detail): Retrieve transaction status and information for submitted payment requests

  • Cancel 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

  • Query Refund Details (query_refund_detail): Check refund status for previously submitted refund requests

Prerequisites

Before using the Antom MCP Server, ensure you have:

  • Python 3.11 or higher

  • uv (recommended package manager) or pip

  • Valid Antom Merchant Account with:

    • Merchant Client ID (CLIENT_ID)

    • Merchant RSA Private Key (MERCHANT_PRIVATE_KEY)

    • Alipay RSA Public Key (ALIPAY_PUBLIC_KEY)

    • Payment Redirect Return URL (PAYMENT_REDIRECT_URL)

    • Payment Notification Callback URL (PAYMENT_NOTIFY_URL)

Quick Start

1. Installation

uvx ant-intl-antom-mcp

Install from Source

git clone https://github.com/alipay/global-antom-mcp.git
cd global-antom-mcp
uv install

2. MCP Client Configuration

Add the following configuration to your MCP client:

{
  "mcpServers": {
    "antom-mcp-server": {
      "command": "uvx",
      "args": ["ant-intl-antom-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_REDIRECT_URL": "/",
        "PAYMENT_NOTIFY_URL": "https://your-domain.com/payment/notify"
      }
    }
  }
}

3. Environment Variables

Variable

Required

Description

GATEWAY_URL

❌

Antom API gateway URL (defaults to https://open-sea-global.alipay.com)

CLIENT_ID

βœ…

Merchant client ID for identity verification

MERCHANT_PRIVATE_KEY

βœ…

Merchant RSA private key for request signing

ALIPAY_PUBLIC_KEY

βœ…

Alipay RSA public key for response verification

PAYMENT_REDIRECT_URL

❌

The user is redirected to after the payment is completed

PAYMENT_NOTIFY_URL

❌

Payment result notification callback URL

Integration Example

Here's how you can integrate the Antom 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": {
        "antom-mcp-server": {
            "command": "uvx",
            "args": ["ant-intl-antom-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_REDIRECT_URL": "/",
                "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,
    system_message="You are a helpful assistant with payment processing capabilities."
)

Changelog

See CHANGELOG.md for a detailed history of changes.

License

This project is licensed under the MIT License.

Acknowledgments

Available Tools

5 tools
cancel_paymentA

The tool is used to cancel the payment if the payment result is not returned after a long time. The cancellation cannot be performed if being out of the cancellable period specified in the contract.

    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

create_payment_sessionA

The tool is used to create a payment session which helps you complete the payment process and eliminate intermediate page redirections throughout the entire payment process.

    Args:
        payment_request_id: The 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: payment_request_id (required), order_amount_currency (required), order_amount_value (required), order_description (requir… Returns: result

create_refundA

The tool is used to initiate a refund against 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. If the refund request is out of the refund window determined in the contract, the refund request will be declined.

    Args:
        refund_request_id: The unique ID assigned by the merchant to identify a refund request.Maximum length: 64 characters
        payment_id: The unique ID assigned by Antom for the original payment to be refunded.Maximum length: 64 characters
        refund_amount_currency: The currency used for the corresponding payment of the refund. The value is a 3-letter currency code that follows the ISO 4217 standard.
        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
    

Inputs: refund_request_id (required), payment_id (required), refund_amount_currency (required), refund_amount_value (required). Returns: result

query_payment_detailA

The tool is used to inquire about the transaction status and other information about a previously submitted payment request.

    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

query_refund_detailB

The tool is used to inquire about the refund status of a previously submitted refund request.

    Args:
        refund_request_id: The unique ID assigned by the merchant to identify a refund request.Maximum length: 64 characters
    

Inputs: refund_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

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool handles a distinct payment operation: creating a payment session, canceling a pending payment, creating a refund, querying payment details, and querying refund details. There is no overlap in functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., cancel_payment, create_payment_session, create_refund). This provides a predictable and clear naming convention.

    Tool Count5/5

    With 5 tools, the server is well-scoped for payment processing. The count is neither too few nor too many, covering core payment lifecycle operations without unnecessary clutter.

    Completeness5/5

    The tool set covers the essential payment operations: initiation, cancellation, refund, and status queries for both payments and refunds. No obvious gaps exist for a typical payment processing workflow.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server for integrating with the SATIM payment gateway system in Algeria, enabling AI assistants to process CIB/Edhahabia card payments through the SATIM-ePAY platform.
      5
      8 npm
      16
      GPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      Integrates Ant International's AlipayPlus payment APIs, enabling AI assistants to handle payment and refund operations seamlessly.
      6
      19 PyPI
      8
      MIT