by razorpay
Enables seamless interaction with Razorpay APIs via Model Context Protocol, allowing developers and AI agents to capture payments, manage orders, process refunds, handle settlements, and more through a unified MCP interface.
Provides a Model Context Protocol (MCP) server that wraps Razorpay’s payment ecosystem, exposing a comprehensive set of tools (payments, orders, refunds, settlements, QR codes, payout, etc.) for programmatic access.
npx mcp-remote https://mcp.razorpay.com/mcp --header "Authorization:Basic <merchant-token>"
. Supply the merchant token (Base64‑encoded key:secret
) via an environment variable or directly in the config.razorpay/mcp
(or a custom‑built image) with RAZORPAY_KEY_ID
and RAZORPAY_KEY_SECRET
environment variables, or build the Go binary from source and execute it with the appropriate flags (--key
, --secret
, etc.).mcpServers
JSON snippet shown in the documentation.TOOLSETS
env variable.API_KEY:API_SECRET
token passed in the Authorization
header. Local deployments can use the raw key and secret via environment variables.create_refund
, close_qr_code
, create_instant_settlement
). Running locally gives full access.npx
is needed. For local deployment you can either pull the Docker image or compile the Go binary.--log-file
flag or set LOG_FILE
environment variable to define the log path; default is ./logs
.TOOLSETS
environment variable to a comma‑separated list of desired tool groups, or omit to enable all.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.
Choose your preferred setup method:
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 for a contact number | Token | ✅ |
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.
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:
# Install Node.js (which includes npm and npx) using Homebrew
brew install node
# Alternatively, download from https://nodejs.org/
# Install Node.js (which includes npm and npx) using Chocolatey
choco install nodejs
# Alternatively, download from https://nodejs.org/
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.
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:
Go to the Razorpay Dashboard and navigate to Settings > API Keys
Locate your API Key and API Secret:
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
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.
For users who prefer to run the MCP server on their own infrastructure or need access to all tools (including those restricted in the remote server), you can deploy the server locally.
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
withrazorpay/mcp:v1.0.0
(or your desired version tag) in the configurations below. Available tags can be found on Docker Hub.
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.
Add the following to your VS Code settings (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.
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.
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.
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>"
}
}
}
The server requires the following configuration:
RAZORPAY_KEY_ID
: Your Razorpay API key IDRAZORPAY_KEY_SECRET
: Your Razorpay API key secretLOG_FILE
(optional): Path to log file for server logsTOOLSETS
(optional): Comma-separated list of toolsets to enable (default: "all")READ_ONLY
(optional): Run server in read-only mode (default: false)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 modeYou 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)
This project is licensed under the terms of the MIT open source license. Please refer to LICENSE for the full terms.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "razorpay-remote": { "command": "npx", "args": [ "mcp-remote", "https://mcp.razorpay.com/mcp", "--header", "Authorization:Basic ${AUTH_HEADER}" ], "env": { "AUTH_HEADER": "Basic <Base64(key:secret)>" } } } }
Discover more MCP servers with similar functionality and use cases
by stripe
Enables popular agent frameworks to integrate with Stripe APIs via function calling, providing tools for MCP, Python, and TypeScript.
by goat-sdk
GOAT is the largest agentic finance toolkit for AI agents, enabling them to become economic actors by leveraging blockchains, cryptocurrencies, and wallets.
by financial-datasets
Provides AI assistants with tools to retrieve income statements, balance sheets, cash flow statements, stock prices, market news, and crypto information via the Model Context Protocol.
by armorwallet
Armor Crypto MCP provides a unified interface for AI agents to interact with the crypto ecosystem, including wallet management, swaps, staking, and multi-chain operations.
by alpacahq
Alpaca’s MCP server lets you trade stocks and options, analyze market data, and build strategies through Alpaca's Trading API.
by XeroAPI
Provides a bridge between the Model Context Protocol and Xero's API, enabling standardized access to Xero accounting and business features.
by kukapay
Integrates the Freqtrade cryptocurrency trading bot with an MCP server, exposing the bot's REST API as tools that AI agents can call for fully automated trading operations.
by kukapay
Offers over 50 cryptocurrency technical analysis indicators and corresponding trading strategies, enabling AI agents and developers to assess market trends and generate buy, hold, or sell signals.
by stefanoamorelli
SEC EDGAR MCP is an open-source MCP server that connects AI models to the rich dataset of SEC EDGAR filings. It makes the trove of public company data accessible to AI assistants (LLMs) for financial research, investment insights, and corporate transparency use cases.