Codex MCP

Post to social media from Codex

Add Onlypult to OpenAI Codex once and use it from the CLI and the IDE extension: draft, schedule and publish posts on 15+ networks straight from your repo.

  • CLI + IDE extension
  • Hosted or local
  • Uploads from disk

How to add Onlypult to Codex

Codex keeps MCP servers in ~/.codex/config.toml — shared by the Codex CLI and the IDE extension. Add Onlypult with a command or by editing the file.

MCP server URL https://mcp.onlypult.com/mcp

Runs the Onlypult server on your machine, so Codex can upload files from your repo. Requires Node.js 18+.

  1. 1

    In Onlypult, open Settings → API Keys and create a key. It starts with op_ and is shown once — copy it somewhere safe.

  2. 2

    Run the command below — or paste the TOML block into ~/.codex/config.toml.

  3. 3

    Start Codex and run /mcp to see onlypult and its tools.

Terminal
codex mcp add onlypult --env ONLYPULT_API_KEY=op_your_api_key \
  -- npx -y @onlypult/mcp@latest
Or edit config ~/.codex/config.toml
[mcp_servers.onlypult]
command = "npx"
args = ["-y", "@onlypult/mcp@latest"]

[mcp_servers.onlypult.env]
ONLYPULT_API_KEY = "op_your_api_key"

Connects Codex to the hosted server over HTTP. The key is read from an environment variable, so it never sits in the config file.

  1. 1

    In Onlypult, open Settings → API Keys and create a key. It starts with op_ and is shown once — copy it somewhere safe.

  2. 2

    Export the key in your shell profile: export ONLYPULT_API_KEY=op_your_api_key.

  3. 3

    Add the block below to ~/.codex/config.toml and restart Codex.

Hosted server ~/.codex/config.toml
[mcp_servers.onlypult]
url = "https://mcp.onlypult.com/mcp"
bearer_token_env_var = "ONLYPULT_API_KEY"

Check it worked: ask Codex “Show my connected social profiles in Onlypult”.

Codex prompts that work

Codex reads your repo, so it can write from real release notes and attach real assets.

Announce what you built

“Read the last merged PR description and draft a LinkedIn post and an X post about the feature. Drafts only.”

Assets to posts

“Upload ./marketing/launch.mp4 and create an Instagram Reel and a YouTube Short draft titled “New in 2.4”.”

Content from docs

“Turn README.md into a five-post LinkedIn series, one every Monday at 10:00.”

Queue check

“What's scheduled in Onlypult for next week? List gaps and draft posts to fill them.”

Fix failures

“List failed posts from the last 7 days, explain why, and retry the retryable ones.”

Performance snapshot

“Show reach and engagement for our LinkedIn page this month versus last month.”

Skills for Codex

Add the Onlypult skills to Codex

Skills are plain SKILL.md files that teach Codex the workflow around each Onlypult tool: the right mode, timezone, limits and fallbacks. Put them where Codex reads skills and it picks the right one from your request.

Install for Codex

Clone the repository and copy the skills into ~/.codex/skills/.

Terminal
git clone https://github.com/onlypult/agent-skills.git
mkdir -p ~/.codex/skills
cp -r agent-skills/skills/* ~/.codex/skills/

Schedule a post

Draft, schedule or publish a post in the right timezone, on the right profile, with plan limits and platform options handled.

SKILL.md

Cross-post

Send one message to several networks, checking each platform’s text and media limits first.

SKILL.md

Reels, Shorts and Stories

Pick the right tool and flags for Instagram and Facebook Reels, YouTube Shorts and Stories.

SKILL.md

Upload media

Choose between a public URL, a browser upload and a direct upload from a local file path.

SKILL.md

Fix failed posts

Find what failed, explain why, fix the cause and retry only when a retry can work.

SKILL.md

Analytics report

Followers, reach, engagement and top posts, read correctly, with coverage gaps and derived metrics explained.

SKILL.md

Best time to post

Find the best days and hours from the engagement heatmap and schedule posts into those slots.

SKILL.md

Content calendar

Plan a week or a month around what already works, show the plan first, create posts after you approve.

SKILL.md

Hashtag sets

Manage a profile’s saved hashtag sets and reuse them instead of retyping tags.

SKILL.md

Your agent gets hands, not the publish button

Most "AI posting" setups are all-or-nothing. Onlypult lets you hand an agent the busywork and keep the final say — on every post.

Drafts by default

Ask for a draft and the agent sends is_draft: true. The post is saved to your calendar and goes nowhere until a person — or an explicit "publish now" — says so.

Per-tool permissions

In Claude, ChatGPT, Cursor and most MCP clients you approve tools one by one. Keep reads and drafts on "Always allow", leave publishing and deleting on "Ask every time".

Everything lands in your calendar

Every post an agent creates shows up in the Onlypult calendar next to your team’s posts. Edit it, reschedule it, or send it through approval before it goes live.

OAuth for chat apps, keys for code

Claude and ChatGPT connect with OAuth 2.1 — you sign in on onlypult.com and the chat app never sees your password. Coding agents use an op_ API key from Settings → API Keys.

Errors an agent can act on

Validation errors come back with a code and a retryable flag. The agent explains "your plan ends on the 5th, pick an earlier date" instead of retrying in a loop.

Prompt-injection aware

Captions and comments pulled in by analytics are marked as untrusted external content, so the agent summarizes them instead of following instructions hidden inside.

Every tool your agent gets

One MCP server covers the whole post lifecycle — context, publishing, media, hashtags, repair and analytics. 37 tools.

Posts & scheduling

14

Draft, schedule, publish, cross-post, edit, delete and repair.

posts_createposts_create_storyposts_create_reelsposts_create_shortsposts_publish_nowposts_cross_postposts_listposts_list_failedposts_getposts_updateposts_deleteposts_retryposts_retry_all_failedposts_limits

Analytics (read-only)

8

Reach, followers, top posts, best time, period over period.

analytics_profiles_listanalytics_metrics_listanalytics_overviewanalytics_audienceanalytics_postsanalytics_top_postsanalytics_best_timeanalytics_compare_periods

Account & profiles

6

Timezone, plan limits, connected profiles, boards and categories.

account_getprofiles_listprofiles_getprofiles_platforms_listprofiles_get_pinterest_boardsprofiles_get_youtube_categories

Hashtag sets

6

Reuse saved hashtag groups per profile instead of retyping them.

hashtags_listhashtags_createhashtags_deletehashtag_groups_createhashtag_groups_updatehashtag_groups_delete

Media

3

Public URLs, browser upload, or direct upload from disk.

media_get_upload_urlmedia_check_statusmedia_upload_file

Publish to 15+ networks from one chat

The agent picks profiles from your Onlypult workspace — every account you connected over official OAuth is available, with per-network options like Reels, Shorts, Stories, boards and first comments.

Codex tips and troubleshooting

Server doesn't start

For the local package, check Node.js 18+ and that npx is on your PATH. For the hosted server, check that ONLYPULT_API_KEY is exported in the shell Codex starts from.

Same config in CLI and IDE

The Codex IDE extension reads the same ~/.codex/config.toml, so you only add Onlypult once.

Approvals

Codex asks before running tools depending on your approval mode. Keep publishing and deleting under manual approval.

Hosted server and files

The hosted server can't read your disk. Use the local package for uploads from the repo, or pass public URLs.

“Cannot schedule after your plan end date”

Posts can't be scheduled past your plan's end date. The agent reads it from account_get and should pick an earlier date or ask you to renew. This error is marked retryable: false, so a well-behaved agent stops instead of looping.

Codex and Onlypult: FAQ

Does Codex support MCP servers?

Yes. The Codex CLI and IDE extension support local (stdio) and remote (HTTP) MCP servers, configured in ~/.codex/config.toml or with codex mcp add.

Can Codex post to social media?

Yes, through Onlypult. Codex can draft, schedule and publish to 15+ networks and attach files from your repo with the local package.

Where is the key stored?

With the local package, in the env section of config.toml. With the hosted server, in an environment variable referenced by bearer_token_env_var.

Is it included in my plan?

Yes. MCP is on every Onlypult plan, including the 7-day free trial.

MCP is included on every plan

  • Works on the 7-day free trial
  • No credit card to start
  • No separate developer tier
  • No per-profile API fee
See pricing

Let Codex write the announcement

Add Onlypult once and use it from the CLI and your IDE — every post lands as a draft you can review.

7-day free trial · No credit card · MCP and API on every plan

Try for free