Productivity

WhatsApp MCP in Codex CLI: Add Blueticks With One config.toml Entry

Codex CLI reads MCP servers from config.toml or codex mcp add. Point it at the Blueticks package with a bt_live_ key and the agent gets WhatsApp tools.

Daniel Roth4 min read

WhatsApp MCP in Codex CLI: Add Blueticks With One config.toml Entry
On this page

Short answer: create a bt_live_ key in Blueticks, then run one codex mcp add command (or add one [mcp_servers.blueticks] table to ~/.codex/config.toml). Codex then has WhatsApp tools for reading chats and sending messages from your own number.

This page is the setup only. For what a coding agent can do with it, see Cursor on WhatsApp and Claude Code on WhatsApp. The idea is the same; only the config differs.

Can you connect Codex CLI to WhatsApp?

Yes, through MCP. Per the Codex docs, MCP settings live in ~/.codex/config.toml, or in a .codex/config.toml inside a trusted project. A stdio server is a [mcp_servers.<name>] table with a command, optional args and optional env.

Blueticks ships @blueticks/mcp, an npm package that runs as a local stdio server. It reads your key from the BLUETICKS_API_KEY environment variable. It needs a Blueticks account with a WhatsApp number connected.

How do you set it up? Four steps

  1. Create a key. Open the Blueticks API page, click Create key, and copy the bt_live_ value straight away. Blueticks shows it once.
  2. Add the server. Either use the CLI:
codex mcp add blueticks --env BLUETICKS_API_KEY=bt_live_your_key_here -- npx -y @blueticks/mcp

or put this in ~/.codex/config.toml:

toml
[mcp_servers.blueticks]
command = "npx"
args = ["-y", "@blueticks/mcp"]
 
[mcp_servers.blueticks.env]
BLUETICKS_API_KEY = "bt_live_your_key_here"
  1. See that it is registered. Run codex mcp list in a terminal, or type /mcp inside the codex TUI.
  2. Check it. Ask: "Using Blueticks, list my five most recent WhatsApp chats." Codex should call a Blueticks tool and answer from your account.

The package, its environment variable and the key are documented in the MCP docs and the authentication docs.

What if the server is slow to start?

Codex gives a server startup_timeout_sec to start, 10 seconds by default per its docs. The first npx run downloads the package, which can take longer on a slow connection. If Codex reports a timeout, add a larger value to the same table, for example startup_timeout_sec = 30, and start Codex again.

Which tools does the agent get?

The package gives the agent tools for chats, contacts, groups, scheduled messages, audiences, campaigns, webhooks, the engine and utilities. The exact tool names depend on the package version, so let the agent list them. Reading chats and sending messages are the two it uses most. Everything the agent sends goes out from your own WhatsApp number, so read the agent's draft before you approve a send.

What about the hosted connector URL?

Blueticks also runs a hosted MCP endpoint at https://api.blueticks.co/mcp, which signs in with OAuth instead of a key. It is the route for Claude and ChatGPT, described on the hosted WhatsApp MCP page. This page uses the key path.

How do you keep the key safe?

Treat it as a password. Per the authentication docs, do not commit it to source control.

  • Prefer the user-level ~/.codex/config.toml over a project .codex/config.toml, because a project file is easy to commit by accident. If you use the project file, add it to .gitignore.
  • Rotate it by creating a new key, switching over, then revoking the old one in the dashboard. A revoked key returns a 401 on every request.

FAQ

Is there a free plan?

The API and the hosted connector allow 5 requests per 6 hours on the free plan, shared between them. Paid plans have no request limit. See the pricing page.

Where do I get help?

Start with the hosted WhatsApp MCP page and the MCP docs.

Share this article

The Dispatch, every week.

One sharp WhatsApp growth tactic in your inbox each week. Joined by 238,000+ founders, marketers and support leads.

Free forever. No spam, unsubscribe in one click.

Also on TikTok: @blueticksagents