Razorpay MCP server

Provides a bridge between natural language commands and Razorpay's payment processing APIs, enabling seamless integration for payment operations, payment links, and order management.
Back to servers
Provider
Razorpay
Release date
Apr 27, 2025
Language
Go
Stats
187 stars

The Razorpay MCP Server implements Model Context Protocol (MCP) to enable seamless integration with Razorpay payment APIs, allowing you to build AI-powered tools and automation workflows that interact with Razorpay's payment ecosystem.

Installation Options

Using Public Docker Image (Recommended)

The simplest way to run the Razorpay MCP server is using the public Docker image:

For Claude Desktop

Add the following to your claude_desktop_config.json:

{
    "mcpServers": {
        "razorpay-mcp-server": {
            "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"
            }
        }
    }
}

Note: Replace your_razorpay_key_id and your_razorpay_key_secret with your actual Razorpay API credentials.

For VS Code

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

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "razorpay_key_id",
        "description": "Razorpay Key ID",
        "password": false
      },
      {
        "type": "promptString",
        "id": "razorpay_key_secret",
        "description": "Razorpay Key Secret",
        "password": true
      }
    ],
    "servers": {
      "razorpay": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "RAZORPAY_KEY_ID",
          "-e",
          "RAZORPAY_KEY_SECRET",
          "razorpay/mcp"
        ],
        "env": {
          "RAZORPAY_KEY_ID": "${input:razorpay_key_id}",
          "RAZORPAY_KEY_SECRET": "${input:razorpay_key_secret}"
        }
      }
    }
  }
}

Building From Docker

If you prefer to build the Docker image yourself:

git clone https://github.com/razorpay/razorpay-mcp-server.git
cd razorpay-mcp-server
docker build -t razorpay-mcp-server:latest .

Once built, replace razorpay/mcp with razorpay-mcp-server:latest in the configurations above.

Building From Source

To build directly from source:

git clone https://github.com/razorpay/razorpay-mcp-server.git
cd razorpay-mcp-server
go build -o razorpay-mcp-server ./cmd/razorpay-mcp-server

Then update your configuration to use the path to the binary:

{
  "razorpay": {
    "command": "/path/to/razorpay-mcp-server",
    "args": ["stdio","--log-file=/path/to/rzp-mcp.log"],
    "env": {
      "RAZORPAY_KEY_ID": "<YOUR_ID>",
      "RAZORPAY_KEY_SECRET": "<YOUR_SECRET>"
    }
  }
}

Configuration Options

The server requires the following configuration:

  • RAZORPAY_KEY_ID: Your Razorpay API key ID
  • RAZORPAY_KEY_SECRET: Your Razorpay API key secret

Optional parameters:

  • LOG_FILE: Path to log file for server logs
  • TOOLSETS: Comma-separated list of toolsets to enable (default: "all")
  • READ_ONLY: Run server in read-only mode (default: false)

Command Line Flags

The server supports these command line flags:

  • --key or -k: Your Razorpay API key ID
  • --secret or -s: Your Razorpay API key secret
  • --log-file or -l: Path to log file
  • --toolsets or -t: Comma-separated list of toolsets to enable
  • --read-only: Run server in read-only mode

Available Tools

The Razorpay MCP Server provides numerous tools for payment processing. Here are some key examples:

Payment Operations

  • capture_payment: Change payment status from authorized to captured
  • fetch_payment: Get payment details with ID
  • update_payment: Update payment notes

Payment Links

  • create_payment_link: Create standard payment links
  • create_payment_link_upi: Create UPI payment links
  • send_payment_link: Send links via SMS or email

Orders Management

  • create_order: Create an order
  • fetch_order: Get order details by ID
  • update_order: Update an order

Refunds

  • create_refund: Create refunds
  • fetch_refund: Get refund details
  • update_refund: Update refund notes

QR Codes

  • create_qr_code: Create QR codes
  • fetch_qr_code: Get QR code details
  • close_qr_code: Close a QR code

Settlements and Payouts

  • fetch_all_settlements: Get all settlements
  • create_instant_settlement: Create instant settlement
  • fetch_all_payouts: Get payout details

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later