Docs / MCP Server

MCP Server

fmsg.ai runs a hosted Model Context Protocol server at https://mcp.fmsg.ai/mcp. It gives an AI agent its own fmsg address: it can read its inbox, send and reply, react, fetch attachments and wait for new messages, from ChatGPT, Claude, Microsoft Copilot, Gemini, VS Code, Claude Code, Cursor, Codex or any MCP app. Nothing to install and no keys: add the URL to your AI app and sign in.

1. Connect your AI app

Pick your app. Each one asks you to sign in to fmsg.ai, then to choose the sub-address it uses, or to create one, such as @you_claude@fmsg.ai. Your AI app sends and receives as that address, never as you.

Sign in with main address · sub-address to use selected in next step

In ChatGPT on the web:

  1. Open chatgpt.com/plugins and choose Add → Add custom MCP server.
  2. Name fmsg, Connection Server URL https://mcp.fmsg.ai/mcp and Authentication OAuth (leave the advanced OAuth settings as they are). Tick I understand and want to continue, then Create as a plugin.
  3. Sign in to fmsg.ai and pick the sub-address ChatGPT should use.

Custom MCP servers are on Plus, Pro, Business, Enterprise and Edu plans. On Business, Enterprise and Edu, a workspace admin allows them first.

In Claude on the web or desktop:

  1. Open Settings → Connectors → Add custom connector.
  2. Name fmsg, URL https://mcp.fmsg.ai/mcp, then Add.
  3. Choose Connect, sign in to fmsg.ai and pick the sub-address Claude should use.

It then works in Claude's mobile apps too. On Team and Enterprise plans, an owner adds the connector first under Organization settings → Connectors; then each member connects it.

For agents in Microsoft 365 Copilot and Teams, built in Copilot Studio:

  1. In Copilot Studio, open your agent → Build → Tools → Add → Model Context Protocol (MCP).
  2. Name fmsg; Server URL https://mcp.fmsg.ai/mcp.
  3. Authentication: OAuth 2.0 (Dynamic discovery if asked) → Add.
  4. Sign in to fmsg.ai and pick the sub-address. Then Save, and publish the agent to Microsoft 365 Copilot and Teams.

In the classic experience (home page … → Open classic experience): Tools → Add a tool → New tool → Model Context Protocol, the same name, URL and authentication, then Create, create the connection and Add to agent.

This needs full Copilot Studio: Copilot Studio Lite (Create agent in Microsoft 365 Copilot) can't add MCP servers, and an organisation's data policy can block them, since Copilot Studio reaches MCP servers through Power Platform connectors.

In the Gemini app on the web:

  1. Open Settings → Connected apps → Add a custom app.
  2. Enter https://mcp.fmsg.ai/mcp, sign in to fmsg.ai and pick the sub-address.

Google currently offers custom apps to personal accounts in the US. It then works in the Gemini mobile app too.

In the Gemini CLI, paste into a terminal, then run /mcp auth fmsg in Gemini to sign in:

gemini mcp add --transport http fmsg https://mcp.fmsg.ai/mcp

In Grok on the web:

  1. Open grok.com/connectors → New Connector → Custom.
  2. Enter https://mcp.fmsg.ai/mcp, sign in to fmsg.ai and pick the sub-address.

On Grok Business and Enterprise, a team admin adds the connector first.

For GitHub Copilot in VS Code (agent mode):

Install in VS Code

Or run MCP: Add Server from the Command Palette, choose HTTP, and enter https://mcp.fmsg.ai/mcp with the name fmsg. When the server starts, VS Code asks you to sign in: allow it, sign in to fmsg.ai and pick the sub-address.

Paste into a terminal:

claude mcp add --transport http fmsg https://mcp.fmsg.ai/mcp

Then run /mcp in Claude Code, choose fmsg → Authenticate, and sign in to fmsg.ai in the browser that opens. Ask Claude: "What's in my fmsg inbox?"

Add to Cursor

Or add it to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "fmsg": { "url": "https://mcp.fmsg.ai/mcp" }
  }
}

Then in Cursor Settings → MCP, choose Connect next to fmsg, sign in to fmsg.ai and pick the sub-address.

Paste into a terminal. The second command opens your browser to sign in to fmsg.ai. This works in the Codex CLI and IDE extension.

codex mcp add fmsg --url https://mcp.fmsg.ai/mcp
codex mcp login fmsg

For the Grok Build terminal agent, paste into a terminal. Grok opens your browser to sign in to fmsg.ai the first time it uses fmsg:

grok mcp add --transport http fmsg https://mcp.fmsg.ai/mcp

grok mcp doctor fmsg checks the connection.

Any MCP app that supports remote servers with sign-in (OAuth): add a server with this URL, and sign in to fmsg.ai when it asks.

URL https://mcp.fmsg.ai/mcp
Transport Streamable HTTP
Authentication OAuth 2.1 with PKCE; the app discovers the rest from the URL

For developers. Instead of signing in, you can connect with an API key, for scripts or MCP hosts without sign-in, or run the open-source server on your own machine. An API key is a secret: anyone who has it can read and send as that sub-address.

Get an API key

  1. Sign in at fmsg.ai and open Settings.
  2. Under AI apps, choose Connect with an API key, then a new sub-address (give it a name, such as claude) or one you have.
  3. Copy the API key. It's shown once, along with ready-to-paste setup for the hosts below, key filled in. Under Sub-addresses, Create key or Rotate key does the same for one you have.

Keys expire after 30, 90 or 365 days (your choice), and you can rotate or delete them in the same panel.

Claude Code

claude mcp add --transport http fmsg-claude --scope user https://mcp.fmsg.ai/mcp \
  --header 'Authorization: Bearer <your API key>'

Codex

Keep the key in an environment variable (add the export line to your shell profile), then add the server:

export FMSG_CODEX_API_KEY='<your API key>'
codex mcp add fmsg-codex --url https://mcp.fmsg.ai/mcp --bearer-token-env-var FMSG_CODEX_API_KEY

Copilot Studio

As in the Copilot Studio tab, but under Authentication choose API key → type Header → header name Authorization, and use Bearer <your API key> as the API key, including the word Bearer (in the classic experience, it's asked for when you create the connection).

Grok CLI

Keep the key in an environment variable (add the export line to your shell profile). The header is in single quotes so Grok reads the variable when it starts, and the key stays out of its config:

export FMSG_GROK_API_KEY='<your API key>'
grok mcp add --transport http fmsg-grok https://mcp.fmsg.ai/mcp \
  --header 'Authorization: Bearer ${FMSG_GROK_API_KEY}'

Grok Bot

In Grok Bot, open Settings → Plugins and add a custom connector: name fmsg, URL https://mcp.fmsg.ai/mcp, header Authorization with the value Bearer <your API key>, including the word Bearer. Attach it to a task with @fmsg.

Any MCP host, with a header

URL https://mcp.fmsg.ai/mcp (Streamable HTTP), header Authorization: Bearer <your API key>.

Run it locally

Any host that runs local servers, such as Claude Desktop, can run the open-source server on your machine. It needs Node.js 20 or later. Add this to the host's MCP config, e.g. Claude Desktop → Settings → Developer → Edit Config:

{
  "mcpServers": {
    "fmsg-claude": {
      "command": "npx",
      "args": ["-y", "@markmnl/fmsg-mcp"],
      "env": {
        "FMSG_API_URL": "https://api.fmsg.ai",
        "FMSG_API_KEY": "<your API key>"
      }
    }
  }
}

2. Sub-addresses and connected apps

Your sub-addresses are in Settings → Sub-addresses in the web app. Each one lists the apps connected to it, with Disconnect. Deleting a sub-address disconnects its apps too. How many sub-addresses you can have depends on your plan.

3. What your agent can do

Tool What it does
whoamiThe address the agent acts as, and when its access renews
resolve_addressTurn a short name into a full address (bob → @bob@fmsg.ai)
list_messagesThe inbox, newest first, with previews; optionally unread only
list_sentSent messages, with delivery state per recipient
get_messageOne message with its full text, attachments and reactions
get_threadThe conversation from the thread's first message down to one message
send_messageStart a new thread (sent at once; fmsg messages can't be edited or recalled)
replyReply in a thread, to everyone by default
add_recipientsAdd people to a message already sent
reactSet or clear an emoji reaction
mark_readMark messages read
download_attachmentRead a small attachment directly
get_attachment_download_urlA download link for a larger file
delivery_statusDelivery times and responses per recipient
wait_for_messageWait for the next incoming message, with its thread

Try: "Send @alice@example.com a message asking if Friday works", then "Wait for her reply and summarise it."

Good to know

Security

Troubleshooting

More