Chatfuel

How to Connect Codex to Chatfuel

Run codex mcp add chatfuel-api --url https://mcp.chatfuel.com/panel/api, then codex mcp login chatfuel-api. The ChatGPT desktop app shares this setup.

Last updated on

Codex connects to Chatfuel with codex mcp add and a sign-in through codex mcp login. The setup is shared between Codex CLI and the ChatGPT desktop app, so a Chatfuel server added in one appears in the other.

How to add the Chatfuel server

Run the two commands to add the server and sign in to Chatfuel:

codex mcp add chatfuel-api --url https://mcp.chatfuel.com/panel/api
codex mcp login chatfuel-api

The chatfuel-api server gives Codex the full Chatfuel GraphQL API. For the ready-made tools for everyday bot management, add the chatfuel server with https://mcp.chatfuel.com/panel in the same way:

codex mcp add chatfuel --url https://mcp.chatfuel.com/panel
codex mcp login chatfuel

The two servers are separate connections, so you sign in to each. How they differ is in MCP or API MCP: which Chatfuel link to use.

How to add Chatfuel in the ChatGPT desktop app

The ChatGPT desktop app keeps its servers in ~/.codex/config.toml, the same file Codex CLI uses. A server added with codex mcp add already appears there. To add it in the app instead, open Settings → MCP servers → Add server, then click Authenticate. The full desktop steps are in how to connect ChatGPT to Chatfuel.

How to connect Codex with a CLI token

Use a CLI token when Codex can't sign in through the browser, for example in CI. Codex reads the token from an environment variable each time it starts:

export CHATFUEL_TOKEN=<token>
codex mcp add chatfuel-api --url https://mcp.chatfuel.com/panel/api --bearer-token-env-var CHATFUEL_TOKEN

Add the export line to your shell profile so the token is there after a restart. Where to create the token is in Chatfuel MCP sign-in, read-only access and CLI token.

What can I ask Codex?

Examples:

  • "Show me the GraphQL operations for bookings and write a script that lists this week's appointments."
  • "Who has access to my bot, and what role does each person have?"
  • "Review my recent chats and list suggested fixes. Don't change anything."

More requests are in Chatfuel MCP example prompts.

Common issues

Codex says the server needs login

Run codex mcp login chatfuel-api (or codex mcp login chatfuel) and sign in to Chatfuel again. The sign-in may have expired or been revoked in Connected apps in the Chatfuel dashboard.

Codex can't find CHATFUEL_TOKEN after a restart

The export line was set only in the old terminal session. Add it to your shell profile, open a new terminal and start Codex again.

On this page