MessengerFlow

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, merge, rename, export collections
  • Inbox — view conversations, search, send messages, manage read status
  • Analytics — view dashboard stats, activity charts, and performance metrics

Prerequisites

  1. A MessengerFlow account
  2. An API key from Settings > Developers > API Keys
  3. An MCP-compatible AI client (Claude Desktop, Cursor, etc.)

Setup

Claude Desktop

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

VariableRequiredDefaultDescription
MESSENGERFLOW_API_KEYYesYour API key (starts with mf_)
MESSENGERFLOW_BASE_URLNohttps://app.messengerflow.com/api/v1API base URL

Available Tools

The server exposes 5 tools that your AI assistant can call:

manage_campaigns

Create, update, start, stop, and delete campaigns. View campaign leads and activity. Add or remove accounts from campaigns.

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.

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?"

Authentication

The MCP server authenticates using the same API keys as the REST API. Your key is sent via the X-Api-Key header on every request. Rate limits (100 requests/minute) apply.

To create an API key:

  1. Log in to app.messengerflow.com
  2. Go to Settings > Developers > API Keys
  3. Click Create API Key
  4. 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-server