MCP Integration
The Fanvue MCP (Model Context Protocol) server enables AI assistants like Claude and Cursor to interact directly with the Fanvue API. This integration allows you to use natural language to perform API operations, making it easier to build automations, manage content, and analyze data.
What is MCP?
Model Context Protocol (MCP) is an open protocol that standardizes how AI assistants connect to external data sources and tools. The Fanvue MCP server exposes all Fanvue API endpoints as tools that AI assistants can call on your behalf.
Installation
Install the Fanvue MCP server using pip or uvx:
Or run it directly without installation:
Getting Started
1. Create an OAuth Application
First, you’ll need OAuth credentials:
- Visit the Fanvue Developer Portal
- Create a new application
- Copy your Client ID and Client Secret
2. Configure Your AI Assistant
Cursor
Add to your Cursor MCP settings:
Claude Code (VS Code Extension)
Add to your VS Code settings:
Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart your AI assistant after saving the configuration.
Usage Examples
Once configured, you can interact with the Fanvue API using natural language:
Get Your Profile
Send Messages
Analyze Earnings
Create Content
Manage Followers
Available Operations
The MCP server provides access to all Fanvue API endpoints:
- Users: Profile and account management
- Chats: Messaging and conversations
- Posts: Content creation and management
- Media: Upload and manage media files
- Insights: Analytics and earnings data
- Creators: Follower and subscriber management
- Agencies: Multi-creator management
Authentication
The MCP server uses OAuth 2.0 for authentication. When you first use a tool that requires authentication, your AI assistant will prompt you to log in via your browser. The server handles token management automatically.
Environment Variables
You can customize the server behavior with these environment variables:
FANVUE_CLIENT_ID: Your OAuth Client ID (Required)FANVUE_CLIENT_SECRET: Your OAuth Client Secret (Required)MCP_SERVER_PORT: Server port (Default: 8080)MCP_SERVER_URL: Public URL for OAuth callbacks (Default: http://localhost:8080)FANVUE_API_URL: API base URL (Default: https://api.fanvue.com)FANVUE_AUTH_URL: Auth server URL (Default: https://auth.fanvue.com)DEBUG: Enable debug logging (Default: false)