This MCP server enables Claude to generate and manage UPI payment deeplinks through Setu's payment infrastructure. It provides tools for creating payment links, checking payment status, and processing refunds.
To use the Setu UPI Deeplinks MCP server, you need to install the package using pip:
pip install setu_mcp_upi_deeplinks
Or using uv:
uv pip install setu_mcp_upi_deeplinks
The server requires the following environment variables to connect to Setu's API:
UPI_DEEPLINKS_SCHEME_ID=your-scheme-id
UPI_DEEPLINKS_SECRET=your-secret
UPI_DEEPLINKS_PRODUCT_INSTANCE_ID=your-product-instance-id
SETU_AUTH_TYPE=OAUTH # Optional, defaults to OAUTH
SETU_MODE=SANDBOX # Optional, defaults to SANDBOX
To integrate this MCP server with Claude Desktop, you need to modify the Claude configuration file:
MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration to the JSON file:
{
"mcpServers": {
"setu_mcp_upi_deeplinks": {
"command": "uvx",
"args": [
"setu_mcp_upi_deeplinks"
],
"env": {
"UPI_DEEPLINKS_SCHEME_ID": "your-scheme-id",
"UPI_DEEPLINKS_SECRET": "your-secret",
"UPI_DEEPLINKS_PRODUCT_INSTANCE_ID": "your-product-instance-id"
}
}
}
}
The server provides five main tools for payment management:
Use the create-payment-link
tool to generate a new UPI payment link:
Required inputs:
amount
: Payment amount in paisebill_id
: Unique identifier for the paymentpayee_name
: Name of the recipientOptional input:
note
: Transaction description or noteExample usage with Claude:
I need to create a UPI payment link for Rs. 1000 with the bill ID "INV12345" for "John Doe".
Use the check-payment-status
tool to verify a payment's status:
Required input:
bill_id
: The bill ID of the paymentExample usage with Claude:
Can you check the status of payment with bill ID "INV12345"?
Use the expire-payment
tool to invalidate an existing payment link:
Required input:
bill_id
: The bill ID of the payment to expireExample usage with Claude:
Please expire the payment link for bill ID "INV12345".
Use the initiate-refund
tool to process a refund:
Required inputs:
bill_id
: The bill ID of the paymentrefund_type
: Type of refund ("FULL" or "PARTIAL")Example usage with Claude:
I need to initiate a full refund for the payment with bill ID "INV12345".
For testing in sandbox mode, use the mock-payment
tool:
Required inputs:
bill_id
: The bill ID of the paymentupi_id
: The UPI ID for the payeeamount
: Amount to be paid in RupeesExample usage with Claude:
Can you simulate a payment of Rs. 1000 for bill ID "INV12345" using UPI ID "example@upi"?
If you encounter issues with the MCP server, check that:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.