LazyRelay
← Back to guides

Post to Social Media from Codex CLI

Connect LazyRelay's MCP server to OpenAI's Codex CLI and schedule, check, and verify social posts right from your terminal.

What you can ask Codex

The part most AI-agent schedulers skip

Most integrations stop at the API call — the agent asks for a post, the API says 200 OK, and that's treated as done. It isn't. Rate limits, silent moderation holds, and platform-side failures can all eat a "successful" request. LazyRelay's list_scheduled_posts tool returns real Proof-of-Publish status, so you can ask Codex to check whether a post actually went live, not just whether the request was accepted.

Setup

  1. In your LazyRelay dashboard, go to API Keys (top nav) and create a new key. Requires a paid plan — Starter and up. Copy it now, it's only shown once.
  2. Codex CLI reads its MCP servers from its config file (~/.codex/config.toml). Add a block like:
    [mcp_servers.lazyrelay]
    command = "npx"
    args = ["-y", "@lazyrelay/mcp-server"]
    env = { LAZYRELAY_API_KEY = "lzr_live_your_key_here" }
  3. Restart Codex CLI. LazyRelay's tools should now be available.

Prefer nothing running locally? LazyRelay also runs a hosted MCP server at https://lazyrelaylazyrelay-backend.onrender.com/mcp — point Codex's config at that URL instead and skip the API key, if your version of Codex CLI supports remote MCP servers. Full tool reference (list_connected_accounts, schedule_post, list_scheduled_posts, delete_scheduled_post, get_analytics_summary, get_mentions) at lazyrelay.com/docs.

Don't have an API key yet? Generate one from your dashboard's Settings tab — available on every paid plan (Starter, Pro, Business, Agency, and Agency Plus).

See plans and get started free