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

revenuecat-mcp

v1.0.0

Published

MCP server exposing complete RevenueCat v2 REST API for IDE integration with AI agents

Readme

RevenueCat MCP Server

A Model Context Protocol (MCP) server that exposes the complete RevenueCat v2 REST API for seamless integration with AI agents and IDEs like Cursor and VS Code.

Features

  • Complete API Coverage: All 25 CRUD operations across 5 RevenueCat resources
  • IDE Integration: Native MCP support for Cursor, VS Code, and other compatible IDEs
  • Type Safety: Full TypeScript implementation with comprehensive validation
  • Production Ready: Retry logic, error handling, and structured logging
  • Lightweight: Single executable under 5MB

Supported Resources

| Resource | Create | Read | Update | Delete | List | |----------|--------|------|--------|--------|------| | Offerings | ✅ | ✅ | ✅ | ✅ | ✅ | | Products | ✅ | ✅ | ✅ | ✅ | ✅ | | Entitlements | ✅ | ✅ | ✅ | ✅ | ✅ | | Packages | ✅ | ✅ | ✅ | ✅ | ✅ | | Price Experiments | ✅ | ✅ | ✅ | ✅ | ✅ |

Installation

Option 1: Global Installation (Recommended)

npm install -g revenuecat-mcp

Option 2: From Source

git clone https://github.com/iamhenry/revenuecat-mcp.git
cd revenuecat-mcp
npm install
npm run build
npm install -g .

Configuration

1. Environment Setup

Create a .env file in your project or set environment variables:

REVENUECAT_SECRET_KEY=sk_your_secret_key_here
RC_API_URL=https://api.revenuecat.com/v2  # Optional
LOG_LEVEL=info                            # Optional

2. Get Your RevenueCat Credentials

  1. Log in to your RevenueCat Dashboard
  2. Navigate to your project settings
  3. Generate a secret key with appropriate permissions
  4. Note your project ID from the URL or project settings

IDE Integration

Cursor

# Add the MCP server to Cursor
claude mcp add revenuecat revenuecat-mcp

# Test the integration
claude mcp test revenuecat

VS Code

Add to your MCP configuration file:

{
  "servers": {
    "revenuecat": {
      "command": "revenuecat-mcp"
    }
  }
}

Usage Examples

List Products

echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "ListProducts", "arguments": {"project_id": "your_project_id"}}}' | revenuecat-mcp

Create Offering

echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "CreateOffering", "arguments": {"project_id": "your_project_id", "name": "Premium Offering", "description": "Our premium subscription offering"}}}' | revenuecat-mcp

Get Product Details

echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "GetProduct", "arguments": {"project_id": "your_project_id", "id": "prod_123456"}}}' | revenuecat-mcp

Available MCP Tools

Offerings

  • CreateOffering - Create a new offering
  • GetOffering - Retrieve offering details
  • UpdateOffering - Update offering properties
  • DeleteOffering - Delete an offering
  • ListOfferings - List all offerings with pagination

Products

  • CreateProduct - Create a new product
  • GetProduct - Retrieve product details
  • UpdateProduct - Update product properties
  • DeleteProduct - Delete a product
  • ListProducts - List all products with pagination

Entitlements

  • CreateEntitlement - Create a new entitlement
  • GetEntitlement - Retrieve entitlement details
  • UpdateEntitlement - Update entitlement properties
  • DeleteEntitlement - Delete an entitlement
  • ListEntitlements - List all entitlements with pagination

Packages

  • CreatePackage - Create a new package
  • GetPackage - Retrieve package details
  • UpdatePackage - Update package properties
  • DeletePackage - Delete a package
  • ListPackages - List all packages with pagination

Price Experiments

  • CreatePriceExperiment - Create a new price experiment
  • GetPriceExperiment - Retrieve price experiment details
  • UpdatePriceExperiment - Update price experiment properties
  • DeletePriceExperiment - Delete a price experiment
  • ListPriceExperiments - List all price experiments with pagination

Error Handling

The server maps RevenueCat HTTP errors to appropriate MCP error codes:

  • 400 Bad RequestVALIDATION_ERROR
  • 401 UnauthorizedUNAUTHENTICATED
  • 403 ForbiddenFORBIDDEN
  • 404 Not FoundNOT_FOUND
  • 429 Too Many RequestsRATE_LIMITED
  • 500+ Server ErrorsINTERNAL

Development

Prerequisites

  • Node.js ≥18
  • npm or yarn
  • RevenueCat account with API access

Local Development

# Clone the repository
git clone https://github.com/iamhenry/revenuecat-mcp.git
cd revenuecat-mcp

# Install dependencies
npm install

# Set up environment
cp .env.example .env
# Edit .env with your credentials

# Build the project
npm run build

# Test locally
npm run dev

Project Structure

src/
├── index.ts                    # MCP server entry point
├── core/
│   ├── config.ts              # Environment configuration
│   ├── entities/              # TypeScript interfaces
│   ├── use-cases/             # Business logic
│   └── validation/            # Input validation
├── infrastructure/
│   ├── revenuecat-client.ts   # HTTP client
│   └── logger.ts              # Structured logging
└── presentation/
    └── mcp-server.ts          # MCP protocol handler

Security

  • NO secrets are logged (automatic redaction)
  • Environment variables are validated at startup
  • Input validation for all API calls
  • Secure error handling without data leakage

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and add tests
  4. Commit: git commit -am 'Add feature'
  5. Push: git push origin feature-name
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release with complete RevenueCat v2 API coverage
  • Support for all 5 resources with full CRUD operations
  • MCP integration for popular IDEs
  • Production-ready error handling and logging