# Connect PubNio MCP to OpenAI Codex

Human page: https://pubnio.com/codex
Hosted MCP URL: https://pubnio.com/mcp

## Summary

Add PubNio to OpenAI Codex with codex mcp add pubnio --url https://pubnio.com/mcp followed by codex mcp login pubnio. Once browser OAuth finishes, Codex can use the search and execute tools to list workspaces and connected accounts, publish from text plus an account or platform, and verify confirmed delivery outcomes.

## Install (Terminal · OpenAI Codex CLI)

```shell
codex mcp add pubnio --url https://pubnio.com/mcp
codex mcp login pubnio
```

## Setup steps

1. **Add PubNio's hosted MCP URL:** Run codex mcp add pubnio --url https://pubnio.com/mcp to register PubNio as a remote Streamable HTTP tool server.
2. **Authenticate with browser OAuth:** Run codex mcp login pubnio and sign in with your PubNio workspace account. PubNio enforces workspace membership and owner permissions on every write.
3. **Ship release posts alongside code changes:** Prompt Codex after merging a PR to create release notes, publish them, and confirm each channel from the post result.

## Example prompt

> Read the latest release tag, publish it to our LinkedIn and Facebook Page with the release diagram URL, then wait for each destination.

## Expected Code Mode flow

```text
search   -> find media and post operations
execute  -> import media { url: "https://..." } => { mediaId: "med_01j9...", status: "processing" }
execute  -> check media readiness => { status: "ready" }
execute  -> create post { text, media: [{ mediaId: "med_01j9..." }], platforms: ["linkedin", "facebook"] } => { postId: "pst_01j9..." }
execute  -> read post until settled => linkedin: published, facebook: published
```

## FAQs

### Can Codex retry a failed social post without creating duplicates?

Yes. Creating a post returns a resolved idempotency key, each destination settles independently, and a retry only replaces a failed target with no provider receipt. Retrying one target never re-posts an already live sibling.

### What if Codex tries to publish when an account token expired?

Listing accounts reports readiness and creating a post returns a typed problem before any provider write. An expired account points to a browser reconnect.
