Assistant setup

Connect Codex CLI to 1Post

Connect Codex CLI to 1Post by adding the MCP server at https://api.get1post.com/v1/mcp with your API key, or at https://api.get1post.com/v1/mcp/oauth to sign in. Codex CLI then lists your accounts, schedules posts and reads results with your role. The steps and the exact Codex CLI settings are below; actions that cancel or reply need confirmation.

Updated 2026-10-26

Set up Codex CLI

  1. 01

    Make a key

    In 1Post, make a key with write scope under Settings, then API keys, and export it as ONEPOST_API_KEY in your shell.

  2. 02

    Open the file

    Edit ~/.codex/config.toml, or .codex/config.toml in a trusted project.

  3. 03

    Add the server

    Add the table below. bearer_token_env_var names the variable that holds the key.

  4. 04

    Check the connection

    Start Codex and ask it to list your 1Post accounts.

The Codex CLI settings

~/.codex/config.toml
[mcp_servers.onepost]
url = "https://api.get1post.com/v1/mcp"
bearer_token_env_var = "ONEPOST_API_KEY"
Or add with sign-in
codex mcp add onepost --url https://api.get1post.com/v1/mcp/oauth
codex mcp login onepost

The key stays in the environment, not in the file.

A request and its reply

Once connected, Codex CLI sends tool calls like this one when you ask it to schedule a post. Account ids come from list_accounts.

Tool call
{
  "name": "create_post",
  "arguments": {
    "accounts": [
      "ACCOUNT_ID"
    ],
    "text": "Doors open at nine.",
    "schedule_at": "2026-11-02T15:00:00Z"
  }
}
Reply, abridged
{
  "id": "POST_ID",
  "status": "scheduled",
  "scheduled_at": "2026-11-02T15:00:00.000Z",
  "accounts": [
    {
      "account_id": "ACCOUNT_ID",
      "status": "queued"
    }
  ]
}

What the connection can do

ToolWhat it doesNeeds
list_accountsLists connected accounts and their stateRead
create_postSaves, schedules or publishes a postWrite
get_postReads one post and the result for each accountRead
cancel_postCancels a post that has not startedWrite and confirm: true

The connection acts with the role of the member who made the key or signed in, so a contributor's posts still go to review. The full tool list is on the MCP page.

Try it

Start a trial

7-day trial for $1. Connect your accounts and schedule a week of posts in one sitting.

Start a trial
Free in your browser

Free tools

Count characters the way each network does, split threads and preview posts. No account needed.

Open the tools
For builders

API and MCP

Post to every network from your own code or assistant with one key, signed webhooks and idempotent requests.

See the API

Questions

Where does the key go?

Into an environment variable. The file only names the variable, so the file can be shared safely.

What can Codex CLI do once it is connected?

It can list your accounts, create and update posts, read results and analytics, and cancel or reply when you confirm. It cannot do more than the member behind the key or sign-in.

Sources

Get this week’s posts scheduled

Connect your accounts, write once and let 1Post publish on time while you get on with the rest of your day.