Help › Connect an AI bot with MCP

Connect an AI bot with MCP

Give Cursor, Claude, ChatGPT, Grok, or a custom agent a key so it can draft, send, and read mail in your FlareMail inbox.

4 min read

On this page

FlareMail speaks MCP (Model Context Protocol). That means any AI app that can connect to a remote MCP server — Cursor, Claude Desktop, ChatGPT, Grok, or a bot you wrote — can use your mailbox the way the FlareMail app does: list mail, read a thread, save a draft, or send.

Settings — Bots & MCP Accounts Sending domains Webhooks Bots & MCP AI Bots & MCP Create keys so AI apps can send and read mail. MCP URL https://flaremail-api.tcrxx0.workers.dev/mcp Copy URL Grok bot Create key Grok bot fm_live_a1b2c3d4… · never used Revoke Cursor fm_live_9f31e2ab… · last used today Revoke Copy the client JSON into Cursor, Claude Desktop, or any MCP app.
Settings → Bots & MCP. Grok uses the OAuth fields; other apps use a named API key.

Grok Custom Connector (OAuth)

Grok’s Custom Connector form asks for OAuth credentials, not a Bearer token. Use the public PKCE client — leave the secret blank:

  • Client IDflaremail-mcp
  • Client Secret — leave empty
  • Authorization Endpointhttps://flaremail-api.tcrxx0.workers.dev/oauth/authorize
  • Token Endpointhttps://flaremail-api.tcrxx0.workers.dev/oauth/token
  • Scopes — type email and press Enter
  • Token Auth Methodnone (PKCE only, recommended)

The MCP server URL is https://flaremail-api.tcrxx0.workers.dev/mcp. After you save, Grok opens a FlareMail login page. Sign in with the same email and password as the app, then click Allow access.

Create a key in Settings

  1. Open Bots & MCPIn the app, open Settings ( ,) and choose Bots & MCP in the sidebar.
  2. Name the botUse a label you’ll recognize later, like Grok bot or Cursor. Each bot should get its own key so you can revoke one without breaking the others.
  3. Create keyFlareMail shows the secret token once. Copy it immediately — it cannot be retrieved later.
  4. Copy the MCP URLThe URL is your Worker’s /mcp endpoint. Paste it into the client together with Authorization: Bearer fm_live_….

Point the client at FlareMail

Most MCP apps take a small JSON snippet. Settings copies one for you. It looks like this:

{
  "mcpServers": {
    "flaremail": {
      "url": "https://flaremail-api.tcrxx0.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer fm_live_YOUR_KEY"
      }
    }
  }
}
  • Cursor — put it in .cursor/mcp.json in the project, or in your user MCP config.
  • Claude Desktop — add the same block to claude_desktop_config.json.
  • ChatGPT and other bots — paste the URL and Bearer token wherever the product asks for a remote MCP server.
  • Grok on the web — use the OAuth fields above, not this JSON snippet.

What the bot can do

Once connected, the agent can call FlareMail tools on your account:

  • send_email / send_draft / reply_to_email / create_draft / schedule_email — write mail.
  • list_emails / get_email / search_emails — read mail.
  • import_contacts / import_drafts / list_contacts / get_contact — directory. Always pass a mailbox (one of your addresses) so people land in the right identity.
  • whoami / list_mailboxes / inbox_counts — which account and addresses it is using.

Admin: rename, audit, revoke

All of this stays in Settings → Bots & MCP:

  • Rename a key by editing its label — useful when you have several bots.
  • Last used shows whether a key is actually being called.
  • Revoke immediately invalidates the token. Create a new key if that bot should come back.

In-app polish and summaries are a different feature — see AI assist. MCP is for external agents acting on the mailbox.