blacktwisthttps://blacktwist.app/api/mcpAuthorizationBearer YOUR_API_KEYYOUR_API_KEY with the key you generated in BlackTwist.Once saved, BlackTwist tools will be available in Codex. You can ask Codex to schedule posts, view drafts, check analytics, manage your queue, and more.export BLACKTWIST_TOKEN="YOUR_API_KEY"Then run:codex mcp add blacktwist --url https://blacktwist.app/api/mcp --bearer-token-env-var BLACKTWIST_TOKENReplace YOUR_API_KEY with the key you generated. You can verify the server was added with:codex mcp listIn the Codex terminal UI, you can also run /mcp to see your active MCP servers.~/.codex/config.toml. Create the file if it doesn't already exist:mkdir -p ~/.codex && touch ~/.codex/config.tomlAppend the following block to ~/.codex/config.toml:[mcp_servers.blacktwist]
url = "https://blacktwist.app/api/mcp"
bearer_token_env_var = "BLACKTWIST_TOKEN"Then make sure the environment variable is available before starting Codex:export BLACKTWIST_TOKEN="YOUR_API_KEY"Replace YOUR_API_KEY with your actual API key. After saving, restart Codex so the changes take effect.config.toml instead of using an environment variable, you can use:[mcp_servers.blacktwist]
url = "https://blacktwist.app/api/mcp"
[mcp_servers.blacktwist.http_headers]
Authorization = "Bearer YOUR_API_KEY"Replace YOUR_API_KEY with your actual API key. For most users, the Codex app settings method is the simplest option.Draft a Threads post about my new product launch and schedule it for tomorrow at 9am.Codex will call the BlackTwist tools to create the draft and schedule it. The first time a tool runs, Codex will prompt you for approval.~/.codex/config.toml:[mcp_servers.blacktwist]
url = "https://blacktwist.app/api/mcp"
bearer_token_env_var = "BLACKTWIST_TOKEN"
default_tools_approval_mode = "approve"Only enable this if you're comfortable letting Codex publish posts, edit drafts, and update settings without asking each time.config.toml. The Codex app, CLI, and IDE extension share this configuration, so once BlackTwist is connected in one place, it can be used across Codex surfaces.codex --verbose and check the logs for HTTP status errors. A 401 means the Bearer token is wrong or expired — regenerate it in Settings > MCP.startup_timeout_sec = 30 (or higher) to your [mcp_servers.blacktwist] block, especially on slow networks.~/.codex/config.toml (not config.json) and that the table header is exactly [mcp_servers.blacktwist].bearer_token_env_var): Make sure BLACKTWIST_TOKEN is exported in the shell that launches Codex. Adding it to your ~/.zshrc or ~/.bashrc ensures it's always available.BlackTwist
Give your social a twist.
© Copyright 2026 BlackTwist. All rights reserved.