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:

$pip install fanvue-mcp

Or run it directly without installation:

$uvx fanvue-mcp

Getting Started

1. Create an OAuth Application

First, you’ll need OAuth credentials:

  1. Visit the Fanvue Developer Portal
  2. Create a new application
  3. Copy your Client ID and Client Secret

2. Configure Your AI Assistant

Cursor

Add to your Cursor MCP settings:

1{
2 "mcpServers": {
3 "fanvue": {
4 "command": "uvx",
5 "args": ["fanvue-mcp"],
6 "env": {
7 "FANVUE_CLIENT_ID": "your_client_id",
8 "FANVUE_CLIENT_SECRET": "your_client_secret"
9 }
10 }
11 }
12}

Claude Code (VS Code Extension)

Add to your VS Code settings:

1{
2 "claude.mcpServers": {
3 "fanvue": {
4 "command": "uvx",
5 "args": ["fanvue-mcp"],
6 "env": {
7 "FANVUE_CLIENT_ID": "your_client_id",
8 "FANVUE_CLIENT_SECRET": "your_client_secret"
9 }
10 }
11 }
12}

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

1{
2 "mcpServers": {
3 "fanvue": {
4 "command": "uvx",
5 "args": ["fanvue-mcp"],
6 "env": {
7 "FANVUE_CLIENT_ID": "your_client_id",
8 "FANVUE_CLIENT_SECRET": "your_client_secret"
9 }
10 }
11 }
12}

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

"Show me my Fanvue profile information"

Send Messages

"Send a message to user with UUID abc-123 saying 'Thanks for subscribing!'"

Analyze Earnings

"What are my top 10 spenders this month?"

Create Content

"Create a new post for subscribers with the text 'New content coming soon!'"

Manage Followers

"List my most recent 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)

Resources