MCP Server
Connect MessengerFlow to AI assistants like Claude Desktop using the Model Context Protocol.
MCP Server
The MessengerFlow MCP server lets you manage your account through AI assistants like Claude Desktop, Cursor, and other MCP-compatible clients. Ask questions and perform actions using natural language.
What You Can Do
- Campaigns — list, create, update, start/stop, delete campaigns and view leads and activity
- Accounts — add, update, delete Facebook accounts and check stats and logs
- Leads — import CSV, scrape groups/pages and friend suggestions, find and join groups, merge, rename, export collections, build re-contact audiences
- Inbox — view conversations, search, send messages, manage read status
- Analytics — view dashboard stats, activity charts, and performance metrics
Prerequisites
- An active MessengerFlow subscription on the Momentum plan or above
- An MCP-compatible AI client (Claude, Cursor, etc.)
Setup
Claude (web, desktop and mobile)
Connect with your MessengerFlow login. No API key is needed:
- In Claude's connector settings, add a custom connector
- Enter
https://mcp.messengerflow.com/mcp - Sign in with your MessengerFlow account when prompted
Claude Code
claude mcp add --transport http messengerflow https://mcp.messengerflow.com/mcp
Then run /mcp inside Claude Code and sign in.
Claude Desktop with an API key
Create a key under Settings > Developers > API Keys, then
add the following to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"messengerflow": {
"command": "npx",
"args": ["@messengerflow/mcp-server"],
"env": {
"MESSENGERFLOW_API_KEY": "mf_your_key_here"
}
}
}
}
Restart Claude Desktop after saving the file.
Cursor
Open Settings > MCP Servers and add a new server with the same command and environment variable.
Other MCP Clients
Any client that supports the MCP stdio transport can use this server. The command is:
MESSENGERFLOW_API_KEY=mf_your_key npx @messengerflow/mcp-server
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
MESSENGERFLOW_API_KEY | Yes | — | Your API key (starts with mf_) |
MESSENGERFLOW_BASE_URL | No | https://app.messengerflow.com/api/v1 | API base URL |
Available Tools
The server exposes 8 tools that your AI assistant can call. Alongside the ones below, manage_proxies handles your own proxies, upload_media uploads images, video and voice from a link, and manage_settings covers your plan, notifications, saved replies, drafts and webhooks.
manage_campaigns
Create, update, start, stop, and delete campaigns. View campaign leads and activity. Add or remove accounts from campaigns. Campaigns created through MCP start paused, so nothing is sent until you ask for it to start.
Example prompts:
- "List my campaigns"
- "Create a campaign called Spring Launch using my NYC leads collection"
- "Stop my Q1 Outreach campaign"
- "Show me the leads for campaign X"
manage_accounts
Add, update, and delete Facebook accounts. View account stats and error logs. If an account needs a captcha or login check cleared, your assistant gives you a link to the account page, where you finish it in a Live Session.
Example prompts:
- "Show my accounts"
- "What are the stats for my main account?"
- "Disable account X"
manage_leads
Manage lead collections — import, scrape, merge, rename, delete, and export.
Example prompts:
- "List my lead collections"
- "How many leads are in the NYC Restaurants collection?"
- "Export my SMMA leads"
manage_inbox
View conversations, search messages, send replies, and manage read status.
Example prompts:
- "How many unread messages do I have?"
- "Show my recent conversations"
- "Search conversations for 'pricing'"
get_analytics
View dashboard stats, activity charts, and performance metrics.
Example prompts:
- "Show my dashboard stats"
- "How many messages did I send this week?"
- "Which campaigns are performing best?"
What Still Needs the App
- Clearing captchas and login checks, which happens in a Live Session
- Changing your login email, password or sign-in methods
- Creating and revoking API keys
- Changing or cancelling your plan. Your assistant can preview the cost of a change. On the hosted connector it can also give you a link to the billing portal; with an API key it gives you the billing page in the app
- Deleting a Facebook account when the server runs on an API key. The hosted connector can delete accounts
- Affiliate settings and payouts
Authentication
MCP is available on the Momentum plan and above, with an active subscription. The hosted connector and your API keys share one allowance of 100 requests per minute. When a limit is hit, your assistant is told how long to wait.
The hosted connector uses your MessengerFlow login. The local server uses the same API keys as the REST API, sent in the X-Api-Key header.
To create an API key:
- Log in to app.messengerflow.com
- Go to Settings > Developers > API Keys
- Click Create Key
- Copy the key and add it to your MCP client config
The key is shown only once at creation. If you lose it, revoke it and create a new one.
Source Code
The MCP server is open source: github.com/MessengerFlow/mcp
