Paytm MCP Server
Provides tools for creating and managing payment links, fetching transaction details, and automating payment workflows using Paytm's Payments API.
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., "@Paytm MCP Servercreate a payment link for ₹500"
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.
Paytm MCP Server
Paytm MCP Server enables AI agents and developers to securely access Paytm's Payments and Business Payments APIs via the Model Context Protocol (MCP). It allows smart, contextual automation across all payment workflows
Features
Smart Payment Ops: Automate routine payment workflows like refunds, settlement tracking, and transaction status checks using AI agents powered by Paytm MCP
Context-Aware AI Assistants: Create intelligent tools that can fetch and explain transactions, initiate payouts, or manage payment links—all through simple natural language prompts
Developer Productivity: Supercharge developer efficiency by enabling Paytm API calls (e.g. "Create a ₹500 payment link") directly via terminals, chat-based UIs, or AI IDE plugins
Agentic AI Payments: Enable agentic AI payments, build enhanced bot led shopping experience through Paytm MCP server
Related MCP server: Customer Support MCP Server
Tools
Tool | Description | API |
| Create a new payment link | |
| Fetch details of a payment link | |
| Fetch transaction details for a link |
Prerequisites
Python 3.12 or higher
Paytm Merchant credentials:
PAYTM_MIDandPAYTM_KEY_SECRETuv (a fast Python package installer and runner)
Claude Desktop (for running and managing the server)
Installations
Option 1: Automated Setup (Recommended)
Download the setup.sh script above for automated installation and configuration and follow the below steps:
Run the following in your terminal (Mac/Unix-based):
Make the script executable
# Make the script executable
chmod +x setup.sh
# Run the setup script
./setup.shThe script will:
Check for required dependencies (Python 3.12+, uv, Claude Desktop)
Clone or update the repository
Create and activate a virtual environment
Install all required dependencies
Create a .env file template for Paytm credentials
Note: On Windows, use Git Bash or WSL to run the script, or follow manual installation.
Option 2: Manual Installation
Clone the repository:
git clone https://github.com/paytm/payment-mcp-server.git cd payment-mcp-serverCreate and activate a virtual environment:
uv venv source .venv/bin/activateInstall dependencies:
uv pip install .
Running the MCP Server with Claude Desktop
This server is designed to be launched and managed through Claude Desktop. You do not need to run the server manually from the command line.
Sample claude_desktop_config.json
Place this file in your project root or as required by Claude Desktop:
{
"mcpServers": {
"paytm-mcp-server": {
"command": "uv path",
"args": ["--directory", "path to project", "run", "paytm_mcp.py"],
"env": {
"PAYTM_MID": "****************",
"PAYTM_KEY_SECRET": "************"
}
}
}
}Tips:
On Mac:
Run
which uvto get the command pathRun
pwdto get the project path
On Windows:
Run
where uvto get the command pathRun
cdto get the project path
Ensure the paytm_mcp.py file exists in the given path.
The env section should contain your actual Paytm credentials (Paytm MID and Paytm Key Secret)
Next Steps
Update the claude_desktop_config.json with your Paytm credentials
Restart the server using Claude Desktop
Begin interacting with Paytm APIs using your AI agents
License
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License is a permissive license that allows you to:
Use the code commercially
Modify the code
Distribute the code
Use the code privately
Sublicense the code
The only requirement is that the license and copyright notice must be included in all copies or substantial portions of the software.
Need help? Raise an issue or explore the Paytm Documentation
Available Tools
3 toolscreate_payment_linkA
Create a new payment link for receiving payments.
This operation generates a unique payment link that can be shared with customers
for accepting payments. The link can be customized with recipient details,
purpose, customer details and amount.
Required Parameters:
recipient_name (str): Name of the person or entity receiving the payment
purpose (str): Description or reason for the payment
customer_email (str): Email address of the customer
customer_mobile (str): Mobile number of the customer
Either customer_email or customer_mobile must be provided if else please ask from the user
Optional Parameters:
amount (float): Fixed amount for the payment
Note:
- Amount can be left optional for customer to decide
- Generated link will be valid according to system's expiry settings
- Please ask all the required fields from the user don't assume any fields
IMPORTANT NOTE:
- if user is not providing customer_email or customer_mobile, please ask for the same don't call any tool before asking for the same
| Name | Required | Description | Default |
|---|---|---|---|
| recipient_name | Yes | ||
| purpose | Yes | ||
| customer_email | No | ||
| customer_mobile | No | ||
| amount | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It mentions link expiry, optional amount, and conditional requirement of email/mobile. It does not detail error handling or idempotency, but for a creation tool it provides adequate transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an intro, required/optional lists, and notes. The front-loaded sentence clearly states purpose. Repetition in 'IMPORTANT NOTE' reduces conciseness slightly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers parameter semantics well but does not explain the return value or output structure. Given no output schema, this omission makes the tool less complete for the agent to understand what to expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description compensates by listing all parameters with usage details. It adds meaning beyond schema by specifying conditional requirements and optionality. However, there is a slight inconsistency: description says amount is float but schema defines it as string.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Create' and the resource 'payment link for receiving payments'. It distinguishes from sibling tools 'fetch_payment_links' and 'fetch_transactions_for_link' which are retrieval operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs the agent to ask for all required fields from the user before calling the tool, and provides conditional requirements for customer_email or customer_mobile. It also notes not to call the tool before obtaining these fields.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fetch_payment_linksA
Retrieve all payment links created by the merchant.
This operation returns a comprehensive list of all payment links created,
including both active and expired links. Each link entry contains details
such as:
- Link ID
- Link Name
- Short URL
- Status
- Creation Date
- Expiry Date
Returns:
List[PaymentLink]: A list of PaymentLink objects containing link details
str: Error message in case of failure
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that the tool returns both active and expired links, lists the fields in each link entry, and specifies the return type (list or error). With no annotations, it carries the burden well, though it could mention that it's a read-only operation explicitly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a clear opening sentence, bullet points listing return fields, and a return type specification. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no parameters and no output schema, the description covers the return content comprehensively, including fields and error case. It could mention pagination, but 'all payment links' implies complete list. Adequate for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so schema coverage is 100%. The description provides no parameter info, but none is needed. Baseline score of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves all payment links created by the merchant, including both active and expired. It distinguishes from siblings: create_payment_link creates links, fetch_transactions_for_link fetches transactions for a specific link.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives. It implies use for listing all links, but lacks explicit guidance or exclusions. Sibling tool names provide context, but the description should clarify.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fetch_transactions_for_linkA
Retrieve all transactions associated with a specific payment link.
This operation provides detailed transaction history for a given payment link,
including successful and failed transactions.
Parameters:
link_id (str): Unique identifier of the payment link
Returns:
List[Transaction]: List of transactions containing details such as:
- Transaction ID
- Order ID
- Amount
- Status
- Completion Time
- Customer Contact Information
str: Error message in case of failure
| Name | Required | Description | Default |
|---|---|---|---|
| link_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that both successful and failed transactions are included, and the return format includes an error message. It does not mention authentication or rate limits, but for a simple read operation, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with separate Parameters and Returns sections. It is not overly verbose, but the bullet list could be condensed. Front-loaded with the primary action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a simple tool with 1 parameter and no output schema, the description covers the return fields and error case. It does not mention pagination or ordering, but for a small transaction list, this is acceptable. Sibling tools are listed but not cross-referenced.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description must add meaning. It explains link_id as 'Unique identifier of the payment link', which adds a bit beyond the schema's type and title, but does not provide sourcing or format guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Retrieve' and resource 'transactions associated with a specific payment link'. It distinguishes from siblings: create_payment_link creates links, fetch_payment_links retrieves links, while this tool retrieves transactions for a given link.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing transaction history for a payment link but does not explicitly state when to use vs alternatives. No exclusions or when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
create_payment_link - First observed
fetch_payment_links - First observed
fetch_transactions_for_link
TDQS
Scored across 3 tools
Each tool has a distinct purpose: creating a payment link, fetching all payment links, and fetching transactions for a specific link. There is no overlap or ambiguity.
All names start with verbs (create, fetch) and use underscores, but the structure varies: singular vs plural and preposition 'for' in fetch_transactions_for_link. Mostly consistent but not perfectly uniform.
With only 3 tools, the server feels thin for a payment gateway, but it is scoped to payment link management. This is borderline; more tools would improve coverage.
Covers create and read operations for payment links and transactions, but misses essential update/delete functionalities for payment links, leaving gaps in the lifecycle.
Maintenance
Related MCP Connectors
Let AI agents query data and act across all your business apps via MCP.
Discover and call 10,000+ production APIs from one MCP server. Pay-per-call billing for AI agents.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Related MCP Servers
FlicenseNot gradedqualityBmaintenanceEnables AI tools and agents to integrate with Cashfree's payment services (Payment Gateway, Payouts, and SecureID) using the Model Context Protocol, allowing transactions and account management through natural language.46 npm14-- AlicenseNot gradedqualityDmaintenanceEnables AI-powered customer support with real-time access to CRM, ticketing, and communication tools via MCP, supporting context-aware conversations and automated actions.Apache 2.0
- 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
- AlicenseNot gradedqualityBmaintenanceProvides a secure MCP gateway for AI agents to access APIs without exposing raw credentials, with scoped access, audit logging, and OAuth support.MIT