Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 37 additions & 16 deletions docs/tools/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,56 @@ hidden: false

The RevenueCat MCP (Model Context Protocol) Server enables AI assistants to manage subscription apps, products, entitlements, and everything in-between without requiring direct dashboard access. This powerful tool provides 26 different capabilities for complete subscription management through natural language interactions.

## Getting Started
## What is MCP?

[Model Context Protocol](https://modelcontextprotocol.io/) is a standard that allows AI assistants to securely access external tools and data sources. The RevenueCat MCP server acts as a bridge between AI assistants (like Claude, GPT-4, etc.) and the RevenueCat API, enabling natural language interactions with your subscription infrastructure.

## Deployment

The RevenueCat MCP server is available as a cloud-hosted service:

**Best for:**

- Team collaboration and shared access
- Production environments
- Individual developer use
- Integration with multiple AI assistants or applications
- Centralized, always-available service

**Access:** `https://mcp.revenuecat.ai/mcp`

### 1. [Overview](./mcp/overview)
Learn what MCP is, explore deployment options, and understand the core features and capabilities of the RevenueCat MCP server.
## Core Features & Capabilities

### 2. [Setup](./mcp/setup)
Get your API keys and configure the MCP server for either cloud deployment or local VS Code/Cursor extension.
The MCP server provides 26 powerful tools for:

### 3. [Tools Reference](./mcp/tools-reference)
- **Project Management**: Access and view RevenueCat project details
- **App Management**: Create, read, update, and delete apps across multiple platforms (iOS, macOS, Android, Amazon, Stripe, RC Billing, Roku)
- **Product Management**: Manage subscription products and in-app purchases
- **Entitlement Management**: Control user access and permissions
- **Offering & Package Management**: Create and manage subscription offerings
- **Paywall Management**: Create and manage paywalls
- **Analytics Integration**: Built-in tracking for tool usage

## Getting Started

### 1. [Setup](./mcp/setup)
Get your API keys and configure the MCP server for your AI assistant.

### 2. [Tools Reference](./mcp/tools-reference)
Complete reference documentation for all 26 available tools, organized by category with detailed parameter tables.

### 4. [Usage Examples](./mcp/usage-examples)
### 3. [Usage Examples](./mcp/usage-examples)
Natural language interaction examples and common usage patterns to help you get the most out of the MCP server.

### 5. [Best Practices & Troubleshooting](./mcp/best-practices-and-troubleshooting)
### 4. [Best Practices & Troubleshooting](./mcp/best-practices-and-troubleshooting)
Security considerations, best practices, troubleshooting guides, and advanced usage patterns.

## Quick Start

Choose your deployment option:

**Cloud Server**: Perfect for team collaboration and production use
**Cloud Server**: Perfect for team collaboration, production use, and individual development
- Access: `https://mcp.revenuecat.ai/mcp`
- Authentication: Bearer token with your RevenueCat API v2 key

**Local Extension**: Ideal for individual development
- Install from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=RevenueCat.revenuecat-mcp-extension)
- Configure with your API key directly in VS Code/Cursor

## What You Can Do

With natural language commands, you can:
Expand All @@ -48,4 +69,4 @@ With natural language commands, you can:
- **Generate Paywalls**: Build paywalls for your offerings
- **Monitor Configuration**: Review and validate your subscription setup

Start with the [Overview](./mcp/overview) to understand the fundamentals, or jump to [Setup](./mcp/setup) if you're ready to begin configuration.
Ready to get started? Jump to [Setup](./mcp/setup) to configure the MCP server for your AI assistant.
52 changes: 17 additions & 35 deletions docs/tools/mcp/best-practices-and-troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,26 @@ hidden: false
- `$rc_lifetime` for lifetime purchases
- `$rc_custom_*` for custom packages

### Workspace Organization (Local Extension)

- **One workspace per project**: Keep different RevenueCat projects in separate workspaces
- **Environment separation**: Use different API keys for different environments
- **Documentation**: Keep your `mcp.json` structure documented for team members

## Troubleshooting

### Common Issues

#### MCP Server Not Enabled (Local Extension)

**Symptoms**: No responses from RevenueCat commands in chat
**Solution**:
#### OAuth Issues

1. Go to **Cursor Settings → MCP**
2. Click **Enable**
3. Click **Refresh**
If you're using OAuth to authenticate with the RevenueCat MCP, you may encounter the following issues:

#### MCP Server Disconnected
**Unknown MCP Client**

**Symptoms**: Previously working commands stop responding
**Solution**:
**Symptoms**: OAuth flow fails with an error indicating the client is not recognized
**Cause**: RevenueCat uses a simplified public client registration flow and does not allow automatic client additions. Your MCP client may not be registered with our OAuth server.
**Solution**: Contact [RevenueCat support](https://app.revenuecat.com/settings/support) with your client details so we can allowlist your MCP client.

**Outdated Redirect URIs**

1. Go to **Cursor Settings → MCP** (for local extension)
2. Click **Refresh**
3. If issues persist, reload the window
**Symptoms**: OAuth flow fails during the redirect step, or you receive an error about invalid redirect URI
**Cause**: MCP clients occasionally update their redirect URIs, and our OAuth server configuration may not yet reflect these changes.
**Solution**: Contact [RevenueCat support](https://app.revenuecat.com/settings/support) with the details of your MCP client and the expected redirect URI so we can update our configuration.

#### API Key Issues

Expand All @@ -59,38 +52,27 @@ hidden: false
1. Verify your API key is correct
2. Check key permissions (read vs write)
3. Ensure the key belongs to the correct project
4. For local extension: Re-run `RevenueCat: Set Project Secret Key`
5. For cloud server: Update your Authorization header

#### Missing mcp.json (Local Extension)

**Symptoms**: Extension doesn't work after setting API key
**Solution**:

1. The extension should create `mcp.json` automatically
2. If missing, remove and re-add your API key
3. Check that the MCP server port is correctly configured
4. Update your Authorization header with the correct API key

### Debug Information

For troubleshooting:

1. Check the VS Code Developer Console for debug logs (local extension)
2. Verify `mcp.json` contains the correct server configuration (local extension)
3. Test with simple commands like "Show me my project details"
4. Ensure API key has proper permissions in RevenueCat dashboard
1. Test with simple commands like "Show me my project details"
2. Ensure API key has proper permissions in RevenueCat dashboard
3. Check your AI assistant's MCP connection logs

## Security Considerations

- **Never commit `mcp.json`**: Always add it to `.gitignore` (local extension)
- **Use environment-specific keys**: Don't use production keys in development
- **Regular key rotation**: Change API keys periodically
- **Team access**: Use separate keys for each team member when possible
- **Monitor usage**: Regularly review API key usage in your RevenueCat dashboard
- **Secure storage**: Keep your API keys secure and never commit them to version control

## Error Handling

Both deployment options provide detailed error responses including:
The MCP server provides detailed error responses including:

- Authentication errors for missing or invalid tokens
- API errors with full RevenueCat API response details
Expand Down
51 changes: 0 additions & 51 deletions docs/tools/mcp/overview.mdx

This file was deleted.

46 changes: 3 additions & 43 deletions docs/tools/mcp/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: RevenueCat MCP Server Setup
sidebar_label: Setup
slug: setup
excerpt: Configure RevenueCat MCP Server for cloud or local deployment
excerpt: Configure RevenueCat MCP Server for your AI assistant
hidden: false
---

Expand All @@ -12,7 +12,7 @@ import AddToCursor from '@site/src/components/AddToCursor';

RevenueCat MCP Server offers two authentication methods depending on your client:

- **OAuth Authentication**: Available for VSCode and Cursor - provides seamless authentication without managing API keys
- **OAuth Authentication**: Available for VS Code and Cursor - provides seamless authentication without managing API keys
- **API v2 Secret Key**: Supported by all MCP clients - requires a RevenueCat API v2 secret key

Choose the method that works best for your client setup.
Expand Down Expand Up @@ -158,7 +158,7 @@ All MCP clients support API v2 secret key authentication. This method requires m
#### Getting Your API Key

1. Open your [RevenueCat dashboard](https://app.revenuecat.com/)
2. Navigate to your project's **API Keys** page
2. Navigate to your project's **API Keys** page
3. **Create a new API v2 secret key** and copy it

> **💡 Tip**: Create a dedicated API key for the MCP server to keep your credentials organized.
Expand All @@ -171,43 +171,3 @@ All MCP clients support API v2 secret key authentication. This method requires m
> **🔧 Third-Party Integration**:
>
If you'd like to integrate your services with RevenueCat MCP Server, please contact us at [RevenueCat Support](mailto:support@revenuecat.com) so we can set up OAuth clients for your application.

## Local MCP Extension Setup

### 1. Install Extension

1. Open VS Code or Cursor
2. Go to Extensions marketplace
3. Search for "RevenueCat MCP"
> **⚠️ Visual Studio Marketplace**:
>
> This only works if your VS Code fork has access to the Visual Studio Marketplace.
>
> If not, you can install the extension manually by downloading the [VSIX file](https://drive.google.com/file/d/1VcyqirfdJtrAMuDnMTBkU8USCbdvMTMn/view?usp=share_link).
4. Click **Install**

### 2. Configure Extension

1. Open Command Palette (`Cmd+Shift+P` or `Ctrl+Shift+P`)
2. Run: **RevenueCat: Set Project Secret Key**
3. Paste your API key when prompted

This creates an `mcp.json` file in your workspace with the MCP server configuration.

> **🔒 Security**: Add `mcp.json` to your `.gitignore` to avoid committing your API credentials.

### 3. Enable MCP in Cursor

1. Go to **Cursor Settings → MCP**
2. Click the **Enable** button
3. Click the **Refresh** icon to activate the server

## VS Code Extension Commands

The local extension provides additional VS Code commands for key management:

| Command | Description |
| ------------------------------------------ | ------------------------------------- |
| `RevenueCat: Set Project Secret Key` | Set or update your API key |
| `RevenueCat: Remove Project Secret Key` | Delete your stored API key |
| `RevenueCat: Show your project secret key` | Display your current API key (masked) |
2 changes: 1 addition & 1 deletion docs/tools/mcp/tools-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ excerpt: Complete reference for all 26 RevenueCat MCP server tools
hidden: false
---

Both deployment options provide the same 26 tools organized into functional categories:
The RevenueCat MCP server provides 26 tools organized into functional categories:

## Project Tools

Expand Down
2 changes: 1 addition & 1 deletion docs/tools/mcp/usage-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ excerpt: Natural language interaction examples with RevenueCat MCP server
hidden: false
---

Both deployment options support the same natural language interactions. Here are common examples:
The RevenueCat MCP server supports natural language interactions. Here are common examples:

## Basic Project Information

Expand Down
2 changes: 1 addition & 1 deletion docs/welcome/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ For AI assistants, see our [llms.txt file](/llms.txt) for structured access to k
<FeatureItem
title="RevenueCat MCP Server"
subtitle="Use AI to answer questions about your RevenueCat data."
link="/docs/tools/mcp/overview"
link="/docs/tools/mcp"
iconName="sparkle"
iconColor="var(--rc-blue-primary)"
/>
Expand Down
2 changes: 1 addition & 1 deletion sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ const aiToolsCategory = Category({
items: [
SubCategory({
label: "RevenueCat MCP Server",
slug: "mcp/overview",
slug: "mcp",
itemsPathPrefix: "mcp/",
items: [
Page({ slug: "setup" }),
Expand Down
4 changes: 4 additions & 0 deletions src/redirects/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,10 @@ const redirects = {
to: "/tools/targeting",
from: "/targeting.html",
},
{
to: "/tools/mcp",
from: "/tools/mcp/overview",
},
{
to: "/projects/authentication",
from: "/authentication",
Expand Down
8 changes: 8 additions & 0 deletions static/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ The prefix for the URL paths is: https://www.revenuecat.com/docs
- /api-v2-beta/ - REST API v2 beta reference (Redoc)
- /external-purchases-api-beta/ - External purchases API beta reference (Redoc)

## RevenueCat MCP Server (Model Context Protocol)

- /tools/mcp - Overview of RevenueCat MCP server for AI-powered subscription management
- /tools/mcp/setup - Configure cloud MCP server for your AI assistant (OAuth or API key auth)
- /tools/mcp/tools-reference - Complete reference for all 26 MCP server tools
- /tools/mcp/usage-examples - Natural language interaction examples with MCP
- /tools/mcp/best-practices-and-troubleshooting - Security and troubleshooting guide

## Overview and Getting Started
- /welcome/building-new - Adding subscriptions to your app
- /welcome/existing-apps - Using RevenueCat in existing apps
Expand Down