npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

razorpay-mcp

v0.1.5

Published

Razorpay MCP server providing stdio and SSE transports

Readme

Razorpay MCP Server

Connect your Razorpay payment gateway to AI assistants using the Model Context Protocol

A Model Context Protocol (MCP) server for interacting with the Razorpay payment gateway API. This package enables AI assistants like Cursor, Claude, and Copilot to directly access your Razorpay account data through a standardized interface.

Quick Start

The most reliable way to use this package:

# Install globally first
npm install -g [email protected]

# Then use the binary directly
razorpay-mcp-stdio --key-id rzp_test_yourkeyid --key-secret yoursecretkey

Cursor Configuration

After installing globally, add this configuration to your .cursor/mcp.json file:

{
  "mcpServers": {
    "razorpay": {
      "command": "razorpay-mcp-stdio",
      "args": [
        "--key-id",
        "rzp_test_yourkeyid",
        "--key-secret",
        "yoursecretkey"
      ]
    }
  }
}

For Windows Users

{
  "mcpServers": {
    "razorpay": {
      "command": "cmd",
      "args": [
        "/c",
        "razorpay-mcp-stdio",
        "--key-id",
        "rzp_test_yourkeyid",
        "--key-secret",
        "yoursecretkey"
      ]
    }
  }
}

For Web Applications (Using SSE)

  1. Start the SSE server:
# Install globally first
npm install -g [email protected]

# Then use the binary directly
razorpay-mcp-sse --key-id rzp_test_yourkeyid --key-secret yoursecretkey --port 3001
  1. Connect from your web app:
// Create SSE connection
const eventSource = new EventSource('http://localhost:3001/sse');

// Handle connection event
eventSource.onmessage = (event) => {
  const data = JSON.parse(event.data);
  
  // If this is a hello message, store the sessionId
  if (data.type === 'hello') {
    const sessionId = data.sessionId;
    console.log(`Connected with session ID: ${sessionId}`);
    
    // Now you can make API calls
    callRazorpayAPI(sessionId, 'getAllPayments', {count: 10});
  }
};

// Send API requests
async function callRazorpayAPI(sessionId, toolName, params) {
  const response = await fetch(`http://localhost:3001/messages?sessionId=${sessionId}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      type: 'toolCall',
      id: Date.now().toString(),
      name: toolName,
      params
    })
  });
  return response.json();
}

Docker Usage

You can also run this MCP server using Docker:

Build the Docker Image

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

# Build the Docker image
docker build -t razorpay-mcp .

Run the Container

For the stdio transport (for direct use with Cursor):

docker run --rm -it razorpay-mcp node dist/transports/stdio.cjs \
  --key-id rzp_test_yourkeyid --key-secret yoursecretkey

For the SSE server (for web applications):

docker run --rm -p 3001:3001 razorpay-mcp node dist/transports/sse.cjs \
  --key-id rzp_test_yourkeyid --key-secret yoursecretkey --port 3001

Available Razorpay Tools

| Tool Name | Description | Parameters | |-----------|-------------|------------| | getAllPayments | Fetch payments with pagination | count, skip, from, to | | getAllOrders | Fetch orders with pagination | count, skip, from, to | | getAllSettlements | Fetch settlements with pagination | count, skip, from, to | | getAllRefunds | Fetch refunds with pagination | count, skip, from, to | | getAllDisputes | Fetch disputes with pagination | count, skip, from, to | | getAllInvoices | Fetch invoices with pagination | count, skip, from, to | | getAllContacts | Fetch contacts with pagination | count, skip, from, to | | getAllTransactions | Fetch transactions with pagination | count, skip, from, to | | getAllVPAs | Fetch Virtual Payment Addresses | count, skip, from, to | | getAllCustomers | Fetch customers with pagination | count, skip, from, to | | getAccountBalance | Fetch account balance | accountId |

All pagination parameters are optional:

  • count: Number of items to fetch (default: 10, max: 100)
  • skip: Number of items to skip
  • from: Start timestamp
  • to: End timestamp

Resources

License

Apache-2.0