Skip to content

Commit 06c2b04

Browse files
authored
Add MCP docs (#952)
1 parent 4ea140a commit 06c2b04

File tree

7 files changed

+745
-0
lines changed

7 files changed

+745
-0
lines changed

docs/tools/mcp.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: RevenueCat MCP Server
3+
sidebar_label: RevenueCat MCP
4+
slug: mcp
5+
excerpt: AI-powered subscription management through natural language interactions
6+
hidden: false
7+
---
8+
9+
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.
10+
11+
## Getting Started
12+
13+
### 1. [Overview](./mcp/overview)
14+
Learn what MCP is, explore deployment options, and understand the core features and capabilities of the RevenueCat MCP server.
15+
16+
### 2. [Setup](./mcp/setup)
17+
Get your API keys and configure the MCP server for either cloud deployment or local VS Code/Cursor extension.
18+
19+
### 3. [Tools Reference](./mcp/tools-reference)
20+
Complete reference documentation for all 26 available tools, organized by category with detailed parameter tables.
21+
22+
### 4. [Usage Examples](./mcp/usage-examples)
23+
Natural language interaction examples and common usage patterns to help you get the most out of the MCP server.
24+
25+
### 5. [Best Practices & Troubleshooting](./mcp/best-practices-and-troubleshooting)
26+
Security considerations, best practices, troubleshooting guides, and advanced usage patterns.
27+
28+
## Quick Start
29+
30+
Choose your deployment option:
31+
32+
**Cloud Server**: Perfect for team collaboration and production use
33+
- Access: `https://mcp.revenuecat.ai/mcp`
34+
- Authentication: Bearer token with your RevenueCat API v2 key
35+
36+
**Local Extension**: Ideal for individual development
37+
- Install from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=RevenueCat.revenuecat-mcp-extension)
38+
- Configure with your API key directly in VS Code/Cursor
39+
40+
## What You Can Do
41+
42+
With natural language commands, you can:
43+
44+
- **Manage Apps**: Create, update, and configure apps across all platforms
45+
- **Handle Products**: Set up subscription products and in-app purchases
46+
- **Control Entitlements**: Define and manage user access permissions
47+
- **Organize Offerings**: Create and structure subscription offerings and packages
48+
- **Generate Paywalls**: Build paywalls for your offerings
49+
- **Monitor Configuration**: Review and validate your subscription setup
50+
51+
Start with the [Overview](./mcp/overview) to understand the fundamentals, or jump to [Setup](./mcp/setup) if you're ready to begin configuration.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: Best Practices & Troubleshooting
3+
sidebar_label: Best Practices & Troubleshooting
4+
slug: best-practices-and-troubleshooting
5+
excerpt: Best practices, troubleshooting, and security considerations for RevenueCat MCP
6+
hidden: false
7+
---
8+
9+
## Best Practices
10+
11+
### API Key Management
12+
13+
- **Use dedicated keys**: Create separate API keys for different environments (development, staging, production)
14+
- **Principle of least privilege**: Use read-only keys when write access isn't needed
15+
- **Regular rotation**: Periodically rotate your API keys for security
16+
17+
### Naming Conventions
18+
19+
- **Package identifiers**: Follow RevenueCat conventions:
20+
- `$rc_monthly` for monthly subscriptions
21+
- `$rc_annual` for annual subscriptions
22+
- `$rc_three_month`, `$rc_six_month` for other durations
23+
- `$rc_lifetime` for lifetime purchases
24+
- `$rc_custom_*` for custom packages
25+
26+
### Workspace Organization (Local Extension)
27+
28+
- **One workspace per project**: Keep different RevenueCat projects in separate workspaces
29+
- **Environment separation**: Use different API keys for different environments
30+
- **Documentation**: Keep your `mcp.json` structure documented for team members
31+
32+
## Troubleshooting
33+
34+
### Common Issues
35+
36+
#### MCP Server Not Enabled (Local Extension)
37+
38+
**Symptoms**: No responses from RevenueCat commands in chat
39+
**Solution**:
40+
41+
1. Go to **Cursor Settings → MCP**
42+
2. Click **Enable**
43+
3. Click **Refresh**
44+
45+
#### MCP Server Disconnected
46+
47+
**Symptoms**: Previously working commands stop responding
48+
**Solution**:
49+
50+
1. Go to **Cursor Settings → MCP** (for local extension)
51+
2. Click **Refresh**
52+
3. If issues persist, reload the window
53+
54+
#### API Key Issues
55+
56+
**Symptoms**: Authentication errors or "unauthorized" responses
57+
**Solution**:
58+
59+
1. Verify your API key is correct
60+
2. Check key permissions (read vs write)
61+
3. Ensure the key belongs to the correct project
62+
4. For local extension: Re-run `RevenueCat: Set Project Secret Key`
63+
5. For cloud server: Update your Authorization header
64+
65+
#### Missing mcp.json (Local Extension)
66+
67+
**Symptoms**: Extension doesn't work after setting API key
68+
**Solution**:
69+
70+
1. The extension should create `mcp.json` automatically
71+
2. If missing, remove and re-add your API key
72+
3. Check that the MCP server port is correctly configured
73+
74+
### Debug Information
75+
76+
For troubleshooting:
77+
78+
1. Check the VS Code Developer Console for debug logs (local extension)
79+
2. Verify `mcp.json` contains the correct server configuration (local extension)
80+
3. Test with simple commands like "Show me my project details"
81+
4. Ensure API key has proper permissions in RevenueCat dashboard
82+
83+
## Security Considerations
84+
85+
- **Never commit `mcp.json`**: Always add it to `.gitignore` (local extension)
86+
- **Use environment-specific keys**: Don't use production keys in development
87+
- **Regular key rotation**: Change API keys periodically
88+
- **Team access**: Use separate keys for each team member when possible
89+
- **Monitor usage**: Regularly review API key usage in your RevenueCat dashboard
90+
91+
## Error Handling
92+
93+
Both deployment options provide detailed error responses including:
94+
95+
- Authentication errors for missing or invalid tokens
96+
- API errors with full RevenueCat API response details
97+
- Validation errors for invalid parameters
98+
99+
All errors are returned in a consistent format with `isError: true` and descriptive error messages.
100+
101+
## Getting Help
102+
103+
- **RevenueCat Documentation**: [docs.revenuecat.com](https://docs.revenuecat.com)
104+
- **API Reference**: [docs.revenuecat.com/reference](https://docs.revenuecat.com/reference)
105+
- **Support**: Contact RevenueCat support through the dashboard
106+
- **Community**: Join the RevenueCat community discussions
107+
108+
---
109+
110+
_This MCP server leverages the Model Context Protocol to provide seamless integration between RevenueCat's API and your development workflow. Happy monetizing! 🚀_

docs/tools/mcp/overview.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: RevenueCat MCP Server Overview
3+
sidebar_label: Overview
4+
slug: overview
5+
excerpt: AI-powered subscription management through natural language interactions
6+
hidden: false
7+
---
8+
9+
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.
10+
11+
## What is MCP?
12+
13+
[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.
14+
15+
## Deployment Options
16+
17+
The RevenueCat MCP server is available in two deployment configurations, each with the same core functionality but different setup and use cases:
18+
19+
### Cloud MCP Server
20+
21+
**Best for:**
22+
23+
- Team collaboration and shared access
24+
- Production environments
25+
- Integration with multiple AI assistants or applications
26+
- When you need a centralized, always-available service
27+
28+
**Access:** `https://mcp.revenuecat.ai/mcp`
29+
30+
### Local MCP Extension (VS Code/Cursor)
31+
32+
**Best for:**
33+
34+
- Individual developer use
35+
- Local development and testing
36+
- Quick setup and immediate use
37+
- Integration with your existing Cursor/VS Code workflow
38+
39+
**Install:** Available in the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=RevenueCat.revenuecat-mcp-extension)
40+
41+
## Core Features & Capabilities
42+
43+
Both deployment options provide identical functionality with 26 powerful tools for:
44+
45+
- **Project Management**: Access and view RevenueCat project details
46+
- **App Management**: Create, read, update, and delete apps across multiple platforms (iOS, macOS, Android, Amazon, Stripe, RC Billing, Roku)
47+
- **Product Management**: Manage subscription products and in-app purchases
48+
- **Entitlement Management**: Control user access and permissions
49+
- **Offering & Package Management**: Create and manage subscription offerings
50+
- **Paywall Management**: Create and manage paywalls
51+
- **Analytics Integration**: Built-in tracking for tool usage

docs/tools/mcp/setup.mdx

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: RevenueCat MCP Server Setup
3+
sidebar_label: Setup
4+
slug: setup
5+
excerpt: Configure RevenueCat MCP Server for cloud or local deployment
6+
hidden: false
7+
---
8+
9+
## Prerequisites
10+
11+
- RevenueCat project with API v2 access
12+
- RevenueCat API v2 secret key
13+
14+
## Getting Your API Key
15+
16+
1. Open your [RevenueCat dashboard](https://app.revenuecat.com/)
17+
2. Navigate to your project's **API Keys** page
18+
3. **Create a new API v2 secret key** and copy it
19+
20+
> **💡 Tip**: Create a dedicated API key for the MCP server to keep your credentials organized.
21+
22+
> **⚠️ Permissions**:
23+
>
24+
> - Use a **write-enabled key** if you plan to create/modify resources
25+
> - A **read-only key** works if you only need to view data
26+
27+
## Cloud MCP Server Setup
28+
29+
### Using with MCP Inspector
30+
31+
For testing and development:
32+
33+
```bash
34+
npx @modelcontextprotocol/inspector@latest
35+
```
36+
37+
Configure the inspector with:
38+
39+
- **Transport Type**: Streamable HTTP
40+
- **URL**: `https://mcp.revenuecat.ai/mcp`
41+
- **Authentication**: Bearer Token with your RevenueCat API v2 secret key
42+
43+
### Using with VS Code Copilot
44+
45+
Add to your VS Code settings:
46+
47+
```json
48+
{
49+
"mcp": {
50+
"servers": {
51+
"revenuecat": {
52+
"type": "http",
53+
"url": "https://mcp.revenuecat.ai/mcp",
54+
"headers": {
55+
"Authorization": "Bearer YOUR_API_V2_SECRET_KEY"
56+
}
57+
}
58+
}
59+
}
60+
}
61+
```
62+
63+
### Using with Claude Desktop
64+
65+
Add to your Claude Desktop configuration:
66+
67+
```json
68+
{
69+
"mcpServers": {
70+
"revenuecat": {
71+
"command": "npx",
72+
"args": ["-y", "@modelcontextprotocol/server-fetch"],
73+
"env": {
74+
"FETCH_BASE_URL": "https://mcp.revenuecat.ai/mcp",
75+
"FETCH_HEADERS": "{\"Authorization\": \"Bearer YOUR_API_V2_SECRET_KEY\"}"
76+
}
77+
}
78+
}
79+
}
80+
```
81+
82+
## Local MCP Extension Setup
83+
84+
### 1. Install Extension
85+
86+
1. Open VS Code or Cursor
87+
2. Go to Extensions marketplace
88+
3. Search for "RevenueCat MCP"
89+
> **⚠️ Visual Studio Marketplace**:
90+
>
91+
> This only works if your VS Code fork has access to the Visual Studio Marketplace.
92+
>
93+
> If not, you can install the extension manually by downloading the [VSIX file](https://drive.google.com/file/d/1VcyqirfdJtrAMuDnMTBkU8USCbdvMTMn/view?usp=share_link).
94+
4. Click **Install**
95+
96+
### 2. Configure Extension
97+
98+
1. Open Command Palette (`Cmd+Shift+P` or `Ctrl+Shift+P`)
99+
2. Run: **RevenueCat: Set Project Secret Key**
100+
3. Paste your API key when prompted
101+
102+
This creates an `mcp.json` file in your workspace with the MCP server configuration.
103+
104+
> **🔒 Security**: Add `mcp.json` to your `.gitignore` to avoid committing your API credentials.
105+
106+
### 3. Enable MCP in Cursor
107+
108+
1. Go to **Cursor Settings → MCP**
109+
2. Click the **Enable** button
110+
3. Click the **Refresh** icon to activate the server
111+
112+
## VS Code Extension Commands
113+
114+
The local extension provides additional VS Code commands for key management:
115+
116+
| Command | Description |
117+
| ------------------------------------------ | ------------------------------------- |
118+
| `RevenueCat: Set Project Secret Key` | Set or update your API key |
119+
| `RevenueCat: Remove Project Secret Key` | Delete your stored API key |
120+
| `RevenueCat: Show your project secret key` | Display your current API key (masked) |

0 commit comments

Comments
 (0)