Razorpay MCP Server (Official)

by razorpay

226 327 downloads Not rated yet MIT license

About

The Razorpay MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Razorpay APIs, enabling advanced payment processing capabilities for developers and AI tools. It supports both a remote hosted option (recommended, zero setup) and a local…

Details

License
MIT license

Explore

- Capture, fetch, and update payments and card details.
- Create and manage payment links (standard/UPI).
- Manage orders, refunds, and settlements.
- Generate and close QR codes for payments.
- Fetch payouts, tokens, and instant settlements.
- Integration helpers: detect stack and generate checkout code.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Razorpay MCP Server (Official)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Choose your preferred setup method:
- Remote MCP Server - Hosted by Razorpay, no setup required
- Local MCP Server - Run on your own infrastructure

brew install node

choco install nodejs

npx --version

Inside your cursor settings in MCP, add this config.

{
  "mcpServers": {
    "rzp-mcp-server": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.razorpay.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Basic <Base64(key:secret)>"
      }
    }
  }
}

Replace key & secret with your Razorpay API KEY & API SECRET

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "rzp-mcp-server": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.razorpay.com/mcp",
        "--header",
        "Authorization: Basic <Merchant Token>"
      ]
    }
  }
}

Replace <Merchant Token> with your Razorpay merchant token. Check Authentication section for steps to generate token.

- Learn about how to configure MCP servers in Claude desktop: Link
- How to install Claude Desktop: Link

Add the following to your VS Code settings (JSON):

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "merchant_token",
        "description": "Razorpay Merchant Token",
        "password": true
      }
    ],
    "servers": {
      "razorpay-remote": {
        "command": "npx",
        "args": [
          "mcp-remote",
          "https://mcp.razorpay.com/mcp",
          "--header",
          "Authorization: Basic ${input:merchant_token}"
        ]
      }
    }
  }
}

Learn more about MCP servers in VS Code's agent mode documentation.

The Remote MCP Server uses merchant token-based authentication. To generate your merchant token:

1. Go to the Razorpay Dashboard and navigate to Settings > API Keys
2. Locate your API Key and API Secret:
- API Key is visible on the dashboard
- API Secret is generated only once when you first create it. Important: Do not generate a new secret if you already have one

3. Generate your merchant token by running this command in your terminal:

   echo <RAZORPAY_API_KEY>:<RAZORPAY_API_SECRET> | base64

Replace <RAZORPAY_API_KEY> and <RAZORPAY_API_SECRET> with your actual credentials

4. Copy the base64-encoded output - this is your merchant token for the Remote MCP Server

> Note: For local MCP Server deployment, you can use the API Key and Secret directly without generating a merchant token.

capture_payment

Change the payment status from authorized to captured.

fetch_payment

Fetch payment details with ID

fetch_payment_card_details

Fetch card details used for a payment

fetch_all_payments

Fetch all payments with filtering and pagination

update_payment

Update the notes field of a payment

initiate_payment

Initiate a payment using saved payment method with order and customer details

resend_otp

Resend OTP if the previous one was not received or expired

submit_otp

Verify and submit OTP to complete payment authentication

create_payment_link

Creates a new payment link (standard)

create_payment_link_upi

Creates a new UPI payment link

fetch_all_payment_links

Fetch all the payment links

fetch_payment_link

Fetch details of a payment link

send_payment_link

Send a payment link via SMS or email.

update_payment_link

Updates a new standard payment link

create_order

Creates an order

fetch_order

Fetch order with ID

fetch_all_orders

Fetch all orders

update_order

Update an order

fetch_order_payments

Fetch all payments for an order

create_refund

Creates a refund

fetch_refund

Fetch refund details with ID

fetch_all_refunds

Fetch all refunds

update_refund

Update refund notes with ID

fetch_multiple_refunds_for_payment

Fetch multiple refunds for a payment

fetch_specific_refund_for_payment

Fetch a specific refund for a payment

create_qr_code

Creates a QR Code

fetch_qr_code

Fetch QR Code with ID

fetch_all_qr_codes

Fetch all QR Codes

fetch_qr_codes_by_customer_id

Fetch QR Codes with Customer ID

fetch_qr_codes_by_payment_id

Fetch QR Codes with Payment ID

fetch_payments_for_qr_code

Fetch Payments for a QR Code

close_qr_code

Closes a QR Code

fetch_all_settlements

Fetch all settlements

fetch_settlement_with_id

Fetch settlement details

fetch_settlement_recon_details

Fetch settlement reconciliation report

create_instant_settlement

Create an instant settlement

fetch_all_instant_settlements

Fetch all instant settlements

fetch_instant_settlement_with_id

Fetch instant settlement with ID

fetch_all_payouts

Fetch all payout details with A/c number

fetch_payout_by_id

Fetch the payout details with payout ID

fetch_tokens

Get all saved payment methods by customer ID or contact number

revoke_token

Revoke a saved payment method (token) for a customer

create_registration_link

Create a registration link (auth link) for subscription registration

detect_stack

Detect project language/framework for checkout integration

integrate_razorpay_checkout

Generate end-to-end Razorpay Standard Checkout integration code for supported frameworks

Currently, the Razorpay MCP Server provides the following tools:

| Tool | Description | API | Remote Server Support |
|:-------------------------------------|:-------------------------------------------------------|:------------------------------------|:---------------------|
| capture_payment | Change the payment status from authorized to captured. | Payment | ✅ |
| fetch_payment | Fetch payment details with ID | Payment | ✅ |
| fetch_payment_card_details | Fetch card details used for a payment | Payment | ✅ |
| fetch_all_payments | Fetch all payments with filtering and pagination | Payment | ✅ |
| update_payment | Update the notes field of a payment | Payment | ✅ |
| initiate_payment | Initiate a payment using saved payment method with order and customer details | Payment | ✅ |
| resend_otp | Resend OTP if the previous one was not received or expired | Payment | ✅ |
| submit_otp | Verify and submit OTP to complete payment authentication | Payment | ✅ |
| create_payment_link | Creates a new payment link (standard) | Payment Link | ✅ |
| create_payment_link_upi | Creates a new UPI payment link | Payment Link | ✅ |
| fetch_all_payment_links | Fetch all the payment links | Payment Link | ✅ |
| fetch_payment_link | Fetch details of a payment link | Payment Link | ✅ |
| send_payment_link | Send a payment link via SMS or email. | Payment Link | ✅ |
| update_payment_link | Updates a new standard payment link | Payment Link | ✅ |
| create_order | Creates an order | Order | ✅ |
| fetch_order | Fetch order with ID | Order | ✅ |
| fetch_all_orders | Fetch all orders | Order | ✅ |
| update_order | Update an order | Order | ✅ |
| fetch_order_payments | Fetch all payments for an order | Order | ✅ |
| create_refund | Creates a refund | Refund | ❌ |
| fetch_refund | Fetch refund details with ID | Refund | ✅ |
| fetch_all_refunds | Fetch all refunds | Refund | ✅ |
| update_refund | Update refund notes with ID | Refund | ✅ |
| fetch_multiple_refunds_for_payment | Fetch multiple refunds for a payment | Refund | ✅ |
| fetch_specific_refund_for_payment | Fetch a specific refund for a payment | Refund | ✅ |
| create_qr_code | Creates a QR Code | QR Code | ✅ |
| fetch_qr_code | Fetch QR Code with ID | QR Code | ✅ |
| fetch_all_qr_codes | Fetch all QR Codes | QR Code | ✅ |
| fetch_qr_codes_by_customer_id | Fetch QR Codes with Customer ID | QR Code | ✅ |
| fetch_qr_codes_by_payment_id | Fetch QR Codes with Payment ID | QR Code | ✅ |
| fetch_payments_for_qr_code | Fetch Payments for a QR Code | QR Code | ✅ |
| close_qr_code | Closes a QR Code | QR Code | ❌ |
| fetch_all_settlements | Fetch all settlements | Settlement | ✅ |
| fetch_settlement_with_id | Fetch settlement details | Settlement | ✅ |
| fetch_settlement_recon_details | Fetch settlement reconciliation report | Settlement | ✅ |
| create_instant_settlement | Create an instant settlement | Settlement | ❌ |
| fetch_all_instant_settlements | Fetch all instant settlements | Settlement | ✅ |
| fetch_instant_settlement_with_id | Fetch instant settlement with ID | Settlement | ✅ |
| fetch_all_payouts | Fetch all payout details with A/c number | Payout | ✅ |
| fetch_payout_by_id | Fetch the payout details with payout ID | Payout | ✅ |
| fetch_tokens | Get all saved payment methods by customer ID or contact number | Token | ✅ |
| revoke_token | Revoke a saved payment method (token) for a customer | Token | ✅ |
| create_registration_link | Create a registration link (auth link) for subscription registration | Registration Link | ❌ |
| detect_stack | Detect project language/framework for checkout integration | N/A (MCP Integration Helper) | ✅ |
| integrate_razorpay_checkout | Generate end-to-end Razorpay Standard Checkout integration code for supported frameworks | N/A (MCP Integration Helper) | ✅ |

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "razorpay mcp server (official)": {
            "razorpay-mcp-server": {
                "command": "docker",
                "args": [
                    "run",
                    "--rm",
                    "-i",
                    "-e",
                    "RAZORPAY_KEY_ID",
                    "-e",
                    "RAZORPAY_KEY_SECRET",
                    "razorpay-mcp-server:latest"
                ],
                "env": {
                    "RAZORPAY_KEY_ID": "your_razorpay_key_id",
                    "RAZORPAY_KEY_SECRET": "your_razorpay_key_secret"
                }
            }
        }
    }
}

McpServers

{
    "razorpay-mcp-server": {
        "command": "docker",
        "args": [
            "run",
            "--rm",
            "-i",
            "-e",
            "RAZORPAY_KEY_ID",
            "-e",
            "RAZORPAY_KEY_SECRET",
            "razorpay-mcp-server:latest"
        ],
        "env": {
            "RAZORPAY_KEY_ID": "your_razorpay_key_id",
            "RAZORPAY_KEY_SECRET": "your_razorpay_key_secret"
        }
    }
}

The Razorpay MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Razorpay APIs, enabling advanced payment processing capabilities for developers and AI tools.

Quick Start

Choose your preferred setup method:
- Remote MCP Server - Hosted by Razorpay, no setup required
- Local MCP Server - Run on your own infrastructure

Available Tools

Currently, the Razorpay MCP Server provides the following tools:

| Tool | Description | API | Remote Server Support |
|:-------------------------------------|:-------------------------------------------------------|:------------------------------------|:---------------------|
| capture_payment | Change the payment status from authorized to captured. | Payment | ✅ |
| fetch_payment | Fetch payment details with ID | Payment | ✅ |
| fetch_payment_card_details | Fetch card details used for a payment | Payment | ✅ |
| fetch_all_payments | Fetch all payments with filtering and pagination | Payment | ✅ |
| update_payment | Update the notes field of a payment | Payment | ✅ |
| initiate_payment | Initiate a payment using saved payment method with order and customer details | Payment | ✅ |
| resend_otp | Resend OTP if the previous one was not received or expired | Payment | ✅ |
| submit_otp | Verify and submit OTP to complete payment authentication | Payment | ✅ |
| create_payment_link | Creates a new payment link (standard) | Payment Link | ✅ |
| create_payment_link_upi | Creates a new UPI payment link | Payment Link | ✅ |
| fetch_all_payment_links | Fetch all the payment links | Payment Link | ✅ |
| fetch_payment_link | Fetch details of a payment link | Payment Link | ✅ |
| send_payment_link | Send a payment link via SMS or email. | Payment Link | ✅ |
| update_payment_link | Updates a new standard payment link | Payment Link | ✅ |
| create_order | Creates an order | Order | ✅ |
| fetch_order | Fetch order with ID | Order | ✅ |
| fetch_all_orders | Fetch all orders | Order | ✅ |
| update_order | Update an order | Order | ✅ |
| fetch_order_payments | Fetch all payments for an order | Order | ✅ |
| create_refund | Creates a refund | Refund | ❌ |
| fetch_refund | Fetch refund details with ID | Refund | ✅ |
| fetch_all_refunds | Fetch all refunds | Refund | ✅ |
| update_refund | Update refund notes with ID | Refund | ✅ |
| fetch_multiple_refunds_for_payment | Fetch multiple refunds for a payment | Refund | ✅ |
| fetch_specific_refund_for_payment | Fetch a specific refund for a payment | Refund | ✅ |
| create_qr_code | Creates a QR Code | QR Code | ✅ |
| fetch_qr_code | Fetch QR Code with ID | QR Code | ✅ |
| fetch_all_qr_codes | Fetch all QR Codes | QR Code | ✅ |
| fetch_qr_codes_by_customer_id | Fetch QR Codes with Customer ID | QR Code | ✅ |
| fetch_qr_codes_by_payment_id | Fetch QR Codes with Payment ID | QR Code | ✅ |
| fetch_payments_for_qr_code | Fetch Payments for a QR Code | QR Code | ✅ |
| close_qr_code | Closes a QR Code | QR Code | ❌ |
| fetch_all_settlements | Fetch all settlements | Settlement | ✅ |
| fetch_settlement_with_id | Fetch settlement details | Settlement | ✅ |
| fetch_settlement_recon_details | Fetch settlement reconciliation report | Settlement | ✅ |
| create_instant_settlement | Create an instant settlement | Settlement | ❌ |
| fetch_all_instant_settlements | Fetch all instant settlements | Settlement | ✅ |
| fetch_instant_settlement_with_id | Fetch instant settlement with ID | Settlement | ✅ |
| fetch_all_payouts | Fetch all payout details with A/c number | Payout | ✅ |
| fetch_payout_by_id | Fetch the payout details with payout ID | Payout | ✅ |
| fetch_tokens | Get all saved payment methods by customer ID or contact number | Token | ✅ |
| revoke_token | Revoke a saved payment method (token) for a customer | Token | ✅ |
| create_registration_link | Create a registration link (auth link) for subscription registration | Registration Link | ❌ |
| detect_stack | Detect project language/framework for checkout integration | N/A (MCP Integration Helper) | ✅ |
| integrate_razorpay_checkout | Generate end-to-end Razorpay Standard Checkout integration code for supported frameworks | N/A (MCP Integration Helper) | ✅ |

Use Cases

- Workflow Automation: Automate your day to day workflow using Razorpay MCP Server. - Agentic Applications: Building AI powered tools that interact with Razorpay's payment ecosystem using this Razorpay MCP server.

Remote MCP Server (Recommended)

The Remote MCP Server is hosted by Razorpay and provides instant access to Razorpay APIs without any local setup. This is the recommended approach for most users.

Benefits of Remote MCP Server

- Zero Setup: No need to install Docker, Go, or manage local infrastructure
- Always Updated: Automatically stays updated with the latest features and security patches
- High Availability: Backed by Razorpay's robust infrastructure with 99.9% uptime
- Reduced Latency: Optimized routing and caching for faster API responses
- Enhanced Security: Secure token-based authentication with automatic token rotation
- No Maintenance: No need to worry about updates, patches, or server maintenance

Prerequisites

npx is needed to use mcp server.
You need to have Node.js installed on your system, which includes both npm (Node Package Manager) and npx (Node Package Execute) by default:

macOS
```bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Razorpay MCP Server (Official)

Relevant YouTube tutorials, setups, and demos