home / mcp / razorpay mcp server
Provides access to Razorpay payment APIs and tools via an MCP server for automated workflows and AI-powered integrations.
Configuration
View docs{
"mcpServers": {
"razorpay-razorpay-mcp-server": {
"url": "https://mcp.razorpay.com/mcp",
"headers": {
"RAZORPAY_KEY_ID": "your_key_id",
"RAZORPAY_KEY_SECRET": "your_key_secret"
}
}
}
}You deploy the Razorpay MCP Server to connect your applications or AI tools to Razorpay APIs, enabling automated payment workflows, data access, and action endpoints. You can run a remote MCP server with zero setup or host a local instance to access all available tools and customize your environment.
Connect your MCP client to Razorpay MCP Server to perform actions such as capturing payments, fetching payments, creating payment links, managing orders, refunds, QR codes, settlements, payouts, and more. Use the remote MCP server for quick access with automatic updates, or run a local MCP server to retain full control and access every tool.
Prerequisites depend on whether you choose a remote or local MCP server.
Option 1: Use Remote MCP Server (recommended for most users) to connect instantly without local setup.
Option 2: Run Local MCP Server on your infrastructure to access all tools and customize your environment.
{
"mcpServers": {
"rzp_remote": {
"type": "http",
"url": "https://mcp.razorpay.com/mcp",
"args": []
}
}
}Run the official Razorpay MCP Server locally using Docker. Provide your Razorpay key ID and key secret as environment variables.
{
"mcpServers": {
"razorpay_mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"RAZORPAY_KEY_ID",
"-e",
"RAZORPAY_KEY_SECRET",
"razorpay/mcp"
],
"env": {
"RAZORPAY_KEY_ID": "your_razorpay_key_id",
"RAZORPAY_KEY_SECRET": "your_razorpay_key_secret"
}
}
}
}If you prefer to build locally, you can either build the Docker image or compile from source and run directly.
# Build the Docker image from the repository (assuming you have Git and Docker)
# git clone https://github.com/razorpay/razorpay-mcp-server.git
# cd razorpay-mcp-server
# docker build -t razorpay-mcp-server:latest .
```
```bash
# Or build from source and run the binary directly
# git clone https://github.com/razorpay/razorpay-mcp-server.git
# cd razorpay-mcp-server
# go build -o razorpay-mcp-server ./cmd/razorpay-mcp-serverConfiguration details, security considerations, and troubleshooting options are provided to help you tailor the MCP server to your environment.
For the remote server, you typically provide a merchant token or base64-encoded credentials in your client configuration when composing requests. For the local server, set environment variables RAZORPAY_KEY_ID and RAZORPAY_KEY_SECRET to your Razorpay API credentials.
Use secure channels for all communications with the MCP server. Rotate credentials as recommended by Razorpay, and limit permissions to only what is needed by your tools and workflows. When running locally, keep your Docker images up to date and follow best practices for secret management.
If you encounter connection issues, verify that the MCP URL is reachable for remote mode or that Docker is running with the correct environment variables. Check that your Razorpay credentials are valid and have the necessary permissions for the actions you request.
Change the payment status from authorized to captured.
Fetch payment details with ID.
Fetch card details used for a payment.
Fetch all payments with filtering and pagination.
Update the notes field of a payment.
Initiate a payment using saved payment method with order and customer details.
Resend OTP if the previous one was not received or expired.
Verify and submit OTP to complete payment authentication.
Creates a new payment link (standard).
Creates a new UPI payment link.
Fetch all the payment links.
Fetch details of a payment link.
Send a payment link via SMS or email.
Updates a new standard payment link.
Creates an order.
Fetch order with ID.
Fetch all orders.
Update an order.
Fetch all payments for an order.
Creates a refund.
Fetch refund details with ID.
Fetch all refunds.
Update refund notes with ID.
Fetch multiple refunds for a payment.
Fetch a specific refund for a payment.
Creates a QR Code.
Fetch QR Code with ID.
Fetch all QR Codes.
Fetch QR Codes with Customer ID.
Fetch QR Codes with Payment ID.
Fetch Payments for a QR Code.
Closes a QR Code.
Fetch all settlements.
Fetch settlement details.
Fetch settlement reconciliation report.
Create an instant settlement.
Fetch all instant settlements.
Fetch instant settlement with ID.
Fetch all payout details with A/c number.
Fetch the payout details with payout ID.
Get all saved payment methods for a contact number.
Revoke a saved payment method (token) for a customer.