iamhenry/revenuecat-mcp
3.3
If you are the rightful owner of revenuecat-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The RevenueCat MCP Server is a Model Context Protocol server that provides full access to the RevenueCat v2 REST API, enabling seamless integration with AI agents and IDEs like Cursor and VS Code.
Tools
25
Resources
0
Prompts
0
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
- Log in to your RevenueCat Dashboard
- Navigate to your project settings
- Generate a secret key with appropriate permissions
- 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 offeringGetOffering
- Retrieve offering detailsUpdateOffering
- Update offering propertiesDeleteOffering
- Delete an offeringListOfferings
- List all offerings with pagination
Products
CreateProduct
- Create a new productGetProduct
- Retrieve product detailsUpdateProduct
- Update product propertiesDeleteProduct
- Delete a productListProducts
- List all products with pagination
Entitlements
CreateEntitlement
- Create a new entitlementGetEntitlement
- Retrieve entitlement detailsUpdateEntitlement
- Update entitlement propertiesDeleteEntitlement
- Delete an entitlementListEntitlements
- List all entitlements with pagination
Packages
CreatePackage
- Create a new packageGetPackage
- Retrieve package detailsUpdatePackage
- Update package propertiesDeletePackage
- Delete a packageListPackages
- List all packages with pagination
Price Experiments
CreatePriceExperiment
- Create a new price experimentGetPriceExperiment
- Retrieve price experiment detailsUpdatePriceExperiment
- Update price experiment propertiesDeletePriceExperiment
- Delete a price experimentListPriceExperiments
- List all price experiments with pagination
Error Handling
The server maps RevenueCat HTTP errors to appropriate MCP error codes:
400 Bad Request
āVALIDATION_ERROR
401 Unauthorized
āUNAUTHENTICATED
403 Forbidden
āFORBIDDEN
404 Not Found
āNOT_FOUND
429 Too Many Requests
āRATE_LIMITED
500+ Server Errors
āINTERNAL
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
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Commit:
git commit -am 'Add feature'
- Push:
git push origin feature-name
- Submit a pull request
License
MIT License - see file for details.
Support
- š RevenueCat Documentation
- š Issue Tracker
- š¬ Discussions
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