Sponsored by Deepsite.site

Razorpay MCP Server (Official)

Created By
razorpay8 months ago
Razorpay's Official MCP Server
Content

Razorpay MCP Server (Official)

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.

Available Tools

Currently, the Razorpay MCP Server provides the following tools:

ToolDescriptionAPI
capture_paymentChange the payment status from authorized to captured.Payment
fetch_paymentFetch payment details with IDPayment
fetch_payment_card_detailsFetch card details used for a paymentPayment
fetch_all_paymentsFetch all payments with filtering and paginationPayment
update_paymentUpdate the notes field of a paymentPayment
create_payment_linkCreates a new payment link (standard)Payment Link
create_payment_link_upiCreates a new UPI payment linkPayment Link
fetch_all_payment_linksFetch all the payment linksPayment Link
fetch_payment_linkFetch details of a payment linkPayment Link
send_payment_linkSend a payment link via SMS or email.Payment Link
update_payment_linkUpdates a new standard payment linkPayment Link
create_orderCreates an orderOrder
fetch_orderFetch order with IDOrder
fetch_all_ordersFetch all ordersOrder
update_orderUpdate an orderOrder
fetch_order_paymentsFetch all payments for an orderOrder
create_refundCreates a refundRefund
fetch_refundFetch refund details with IDRefund
fetch_all_refundsFetch all refundsRefund
update_refundUpdate refund notes with IDRefund
fetch_multiple_refunds_for_paymentFetch multiple refunds for a paymentRefund
fetch_specific_refund_for_paymentFetch a specific refund for a paymentRefund
create_qr_codeCreates a QR CodeQR Code
fetch_qr_codeFetch QR Code with IDQR Code
fetch_all_qr_codesFetch all QR CodesQR Code
fetch_qr_codes_by_customer_idFetch QR Codes with Customer IDQR Code
fetch_qr_codes_by_payment_idFetch QR Codes with Payment IDQR Code
fetch_payments_for_qr_codeFetch Payments for a QR CodeQR Code
close_qr_codeCloses a QR CodeQR Code
fetch_all_settlementsFetch all settlementsSettlement
fetch_settlement_with_idFetch settlement detailsSettlement
fetch_settlement_recon_detailsFetch settlement reconciliation reportSettlement
create_instant_settlementCreate an instant settlementSettlement
fetch_all_instant_settlementsFetch all instant settlementsSettlement
fetch_instant_settlement_with_idFetch instant settlement with IDSettlement
fetch_all_payoutsFetch all payout details with A/c numberPayout
fetch_payout_by_idFetch the payout details with payout IDPayout

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.

Setup

Prerequisites

  • Docker
  • Golang (Go)
  • Git

To run the Razorpay MCP server, use one of the following methods:

You can use the public Razorpay image directly. No need to build anything yourself - just copy-paste the configurations below and make sure Docker is already installed.

Note: To use a specific version instead of the latest, replace razorpay/mcp with razorpay/mcp:v1.0.0 (or your desired version tag) in the configurations below. Available tags can be found on Docker Hub.

Usage with Claude Desktop

This will use the public razorpay image

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

Please replace the your_razorpay_key_id and your_razorpay_key_secret with your keys.

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

Usage with 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}"
        }
      }
    }
  }
}

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

Build from Docker (Alternative)

You need to clone the Github repo and build the image for Razorpay MCP Server using docker. Do make sure docker is installed and running in your system.

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

Once the razorpay-mcp-server:latest docker image is built, you can replace the public image(razorpay/mcp) with it in the above configurations.

Build from source

You can directly build from the source instead of using docker by following these steps:

# Clone the repository
git clone https://github.com/razorpay/razorpay-mcp-server.git
cd razorpay-mcp-server

# Build the binary
go build -o razorpay-mcp-server ./cmd/razorpay-mcp-server

Once the build is ready, you need to specify the path to the binary executable in the command option. Here's an example for VS Code settings:

{
  "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

The server requires the following configuration:

  • RAZORPAY_KEY_ID: Your Razorpay API key ID
  • RAZORPAY_KEY_SECRET: Your Razorpay API key secret
  • LOG_FILE (optional): Path to log file for server logs
  • TOOLSETS (optional): Comma-separated list of toolsets to enable (default: "all")
  • READ_ONLY (optional): Run server in read-only mode (default: false)

Command Line Flags

The server supports the following 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

Debugging the Server

You can use the standard Go debugging tools to troubleshoot issues with the server. Log files can be specified using the --log-file flag (defaults to ./logs)

License

This project is licensed under the terms of the MIT open source license. Please refer to LICENSE for the full terms.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server