Skip to main content
Glama
FlareSend MCP

FlareSend MCP

by sosmongare

flaresend-mcp

Hosted remote MCP server and multi-client agent plugin for FlareSend — WhatsApp messaging API.

Piece

What it is

MCP server

Streamable HTTP at /mcp (Cloudflare Workers; Dockerfile for Fly.io)

Auth

Per-request Authorization: Bearer <instance API key> — forwarded to FlareSend, never stored or logged

Plugin

plugins/flaresend/ with Cursor, Codex, and Claude plugin manifests (Bird-style)

API docs (documented endpoints only): flaresend-api-documentation

Get an API key: FlareSend dashboard → your connected instance → copy the instance API key. That key selects the sending WhatsApp number. Do not put instance_id in message bodies.


Quick start (pick your client)

Client

What to use

Cursor Marketplace

Install FlareSend plugin → set FLARESEND_API_KEY

Cursor (manual)

Settings → MCP, or ~/.cursor/mcp.json

OpenAI Codex

~/.codex/config.toml with bearer_token_env_var (or install .codex-plugin)

GitHub Copilot

VS Code MCP / Copilot CLI ~/.copilot/mcp-config.json (type: "http")

Claude Code

Plugin .claude-plugin / HTTP MCP with Bearer header

Grok Bot / Agent SDK

Streamable HTTP URL + Bearer header

MCP Inspector

Local test: npm run dev → Add Servers → Streamable HTTP

Production URL (after deploy): https://mcp.flaresend.com/mcp
Local URL: http://127.0.0.1:8787/mcp

All of these clients talk to the same hosted MCP. Only the config file shape differs. There is no stdio binary.


Related MCP server: whatsapp-triage

1. Cursor Marketplace (once published)

  1. Install the FlareSend plugin from the Cursor Marketplace.

  2. Plugins → Configure → set FLARESEND_API_KEY to your instance API key.

  3. The plugin’s plugins/flaresend/mcp.json points at https://mcp.flaresend.com/mcp.

  4. Start a chat and ask something like “list my FlareSend instances” or “check if 2547… is on WhatsApp”.

See SUBMITTING.md for the publish checklist.


2. Cursor — custom MCP connector

Option A — Cursor Settings UI

  1. Cursor → Settings → MCP (or Features → MCP).

  2. Add new global MCP server (or project server).

  3. Choose URL / remote HTTP (not a command/stdio server).

  4. URL: https://mcp.flaresend.com/mcp (or http://127.0.0.1:8787/mcp while developing).

  5. Add header:

    • Name: Authorization

    • Value: Bearer YOUR_INSTANCE_API_KEY

  6. Save and ensure the server shows as connected.

Option B — mcp.json file

Create or edit ~/.cursor/mcp.json (or project .cursor/mcp.json):

Hosted:

{
  "mcpServers": {
    "flaresend": {
      "url": "https://mcp.flaresend.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_INSTANCE_API_KEY"
      }
    }
  }
}

Local wrangler:

{
  "mcpServers": {
    "flaresend": {
      "url": "http://127.0.0.1:8787/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_INSTANCE_API_KEY"
      }
    }
  }
}

Restart Cursor or reload MCP if the server does not appear.


3. OpenAI Codex

Codex reads MCP from TOML (not JSON). Prefer an env var for the secret — do not paste the key into config.toml.

Add to ~/.codex/config.toml (or a trusted project’s .codex/config.toml):

[mcp_servers.flaresend]
url = "https://mcp.flaresend.com/mcp"
bearer_token_env_var = "FLARESEND_API_KEY"

Then export the key in your shell (or OS env):

export FLARESEND_API_KEY="your-instance-api-key"

Local server while developing:

[mcp_servers.flaresend]
url = "http://127.0.0.1:8787/mcp"
bearer_token_env_var = "FLARESEND_API_KEY"

Optional plugin shim for Codex-style installs: plugins/flaresend/.codex-plugin/plugin.json + .mcp.json.

CLI alternative (if your Codex build supports it):

codex mcp add flaresend --url https://mcp.flaresend.com/mcp
# then set bearer_token_env_var / FLARESEND_API_KEY as above

4. GitHub Copilot (VS Code + Copilot CLI)

Copilot CLI

~/.copilot/mcp-config.json (or project .mcp.json / .github/mcp.json):

{
  "mcpServers": {
    "flaresend": {
      "type": "http",
      "url": "https://mcp.flaresend.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_INSTANCE_API_KEY"
      },
      "tools": ["*"]
    }
  }
}

Or interactively:

copilot mcp add --transport http \
  --header "Authorization: Bearer YOUR_INSTANCE_API_KEY" \
  flaresend https://mcp.flaresend.com/mcp

VS Code / Copilot Chat Agent mode

Add a remote HTTP MCP server (VS Code 1.101+). Editor-managed config often uses a top-level servers object:

{
  "servers": {
    "flaresend": {
      "type": "http",
      "url": "https://mcp.flaresend.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:flaresend_api_key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "flaresend_api_key",
      "description": "FlareSend instance API key",
      "password": true
    }
  ]
}

Exact file location varies (mcp.json in the user profile or workspace). Prefer ${input:…} or env substitution so the key is not committed.


5. Claude Code

Plugin manifest: plugins/flaresend/.claude-plugin/plugin.json.

Or add an HTTP MCP server with:

{
  "mcpServers": {
    "flaresend": {
      "type": "http",
      "url": "https://mcp.flaresend.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_INSTANCE_API_KEY"
      }
    }
  }
}

Set FLARESEND_API_KEY in the environment if your Claude host expands ${FLARESEND_API_KEY}.


6. Grok Bot / Agent SDK / other Streamable HTTP clients

Same idea: URL + Authorization header. No stdio binary.

{
  "mcpServers": {
    "flaresend": {
      "type": "streamable-http",
      "url": "https://mcp.flaresend.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_INSTANCE_API_KEY"
      }
    }
  }
}

Some UIs omit type and only need url + headers — that is fine.

Inbound WhatsApp → Grok Bot: FlareSend webhooks cannot set custom headers. Use the optional relay in relay/ (see DEPLOY.md).


Do not open http://127.0.0.1:8787/mcp in a normal browser — you will get 401. That URL is only for MCP clients.

Terminals

# Terminal 1 — MCP server
cd flaresend-mcp
npm install
npm run dev
# Ready on http://127.0.0.1:8787

# Terminal 2 — Inspector UI
npx @modelcontextprotocol/inspector

In the Inspector UI

  1. Click Add Servers.

  2. Transport: Streamable HTTP (not Standard I/O).

  3. Name: flaresend

  4. URL: http://127.0.0.1:8787/mcp

  5. Auth / Custom Headers — enable:

    • Name: Authorization

    • Value: Bearer YOUR_INSTANCE_API_KEY (include Bearer and a space)

  6. Save → turn the server Connected.

  7. Open the Tools tab → pick a tool → fill fields (or Edit as JSON) → Execute Tool.

You should see initialize and tools/list as OK in Messages.

Safe tools to try first

Tool

Example input

list_instances

{}

check_number

{ "number": "254712345678" }

get_instance_status

{ "instanceId": "<uuid from list_instances>" }

send_message example (only to opted-in numbers):

{
  "recipients": ["254712345678"],
  "type": "text",
  "text": "Hello from FlareSend MCP"
}

Local auth shortcut

If Inspector keeps dropping headers, create .dev.vars (gitignored):

cp .dev.vars.example .dev.vars
# set FLARESEND_API_KEY=...

Restart npm run dev. Do not set FLARESEND_API_KEY on the production Worker — production callers must send their own Bearer token.


Tools

Messaging / instances: send_message, check_number, schedule_message, list_scheduled_messages, update_scheduled_message, cancel_scheduled_message, list_instances, get_instance, get_instance_status, reconnect_instance, health

Groups (Pro+): create_group, list_groups, get_group, get_group_invite_link, send_group_message, manage_group_participants

Channels (Pro+): create_channel, get_channel, update_channel, resolve_channel_invite, send_channel_message, follow_channel, unfollow_channel

Phone numbers: international digits only (no +). The server strips +, spaces, and dashes.

Media: text | image | video | audio | document via url or fileBase64 + fileName + mimeType.


Safety


Develop / deploy

npm test          # unit tests (mocked fetch)
npm run typecheck
npm run deploy    # Cloudflare Worker

Full deploy (custom domain, relay secrets, Fly.io): DEPLOY.md

Script

Purpose

npm run dev

Local MCP Worker

npm test

Vitest

npm run typecheck

TypeScript

npm run deploy

Deploy MCP Worker

npm run deploy:relay

Deploy webhook relay

npm run fly:build

Docker image for Fly.io


License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI agents to control WhatsApp, including sending messages and media, reading chats, managing groups and communities, with QR/pairing auth and session persistence.
      14
      15 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to manage WhatsApp instances, send messages and campaigns, handle incoming messages, webhooks, members, and metrics through 30 authenticated tools, with an optional WhatsApp-to-assistant bridge.
      Apache 2.0