The Razorpay MCP Server is a Model Context Protocol (MCP) implementation that allows seamless integration with Razorpay's payment processing APIs. This server enables AI tools and applications to interact with Razorpay services using a standardized protocol.
The remote server option is hosted by Razorpay, requiring no local infrastructure setup while providing automatic updates and high availability.
You need Node.js installed (which includes npx):
For macOS:
brew install node
For Windows:
choco install nodejs
Verify installation:
npx --version
Add this configuration to your Cursor MCP settings:
{
"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)>"
}
}
}
}
Add 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>"
]
}
}
}
Add 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}"
]
}
}
}
}
To generate your merchant token:
echo <RAZORPAY_API_KEY>:<RAZORPAY_API_SECRET> | base64
For self-hosted deployment or accessing all tools including restricted ones.
{
"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"
}
}
}
}
{
"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}"
}
}
}
}
}
git clone https://github.com/razorpay/razorpay-mcp-server.git
cd razorpay-mcp-server
docker build -t razorpay-mcp-server:latest .
After building, replace razorpay/mcp
with razorpay-mcp-server:latest
in the configurations.
git clone https://github.com/razorpay/razorpay-mcp-server.git
cd razorpay-mcp-server
go build -o razorpay-mcp-server ./cmd/razorpay-mcp-server
Sample VS Code configuration:
{
"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>"
}
}
}
Required environment variables:
RAZORPAY_KEY_ID
: Your API key IDRAZORPAY_KEY_SECRET
: Your API key secretOptional settings:
LOG_FILE
: Path to log fileTOOLSETS
: Comma-separated list of toolsets (default: "all")READ_ONLY
: Run in read-only mode (default: false)Command line flags:
--key
or -k
: API key ID--secret
or -s
: API key secret--log-file
or -l
: Log file path--toolsets
or -t
: Toolsets to enable--read-only
: Enable read-only modeTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "rzp-sse-mcp-server" '{"command":"npx","args":["mcp-remote","https://mcp.razorpay.com/sse","--header","Authorization:${AUTH_HEADER}"],"env":{"AUTH_HEADER":"Bearer <Base64(key:secret)>"}}'
See the official Claude Code MCP documentation for more details.
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.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"rzp-sse-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.razorpay.com/sse",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer <Base64(key:secret)>"
}
}
}
}
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.
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"rzp-sse-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.razorpay.com/sse",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer <Base64(key:secret)>"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect