How to give Claude Code, Codex, and Cursor social publishing tools via MCP

5 min readAI agents & MCPView as Markdown

You can connect Claude Code, OpenAI Codex, Cursor, or OpenCode to social publishing in one command using PubNio's remote Streamable HTTP MCP server at https://pubnio.com/mcp. Browser OAuth scopes workspace access cleanly without copying static API keys or exposing raw social provider tokens to the model.

1. Register the remote Streamable HTTP endpoint

Local stdio MCP servers require installing Node/Python binaries, keeping dependencies up to date, and storing long-lived API keys in plaintext config files. PubNio's hosted MCP server runs over Streamable HTTP with OAuth 2.1 browser consent.

install-pubnio-mcp.sh
# Claude Code
claude mcp add --transport http pubnio https://pubnio.com/mcp

# OpenAI Codex
codex mcp add pubnio --url https://pubnio.com/mcp && codex mcp login pubnio

# OpenCode
opencode mcp add pubnio --url https://pubnio.com/mcp && opencode mcp auth pubnio

2. The safe agent publishing loop

A reliable publishing agent never fires blind POST calls. PubNio exposes two Code Mode tools, search and execute, which reach the same HTTP operations as the API, so the agent follows a deterministic four-step loop:

  • Inspect workspaces and connected accounts before writing.
  • Stage remote media and wait for it to become ready.
  • Create a multi-platform draft, then validate it so typed preflight errors self-correct before publishing.
  • Publish or schedule with an explicit idempotency key and read the per-destination delivery status.

3. Keep credentials and approvals human-owned

OAuth account linking, token revocation, API keys, and webhook signing secrets remain outside MCP in the PubNio workspace. Teams that want human sign-off before going live simply instruct their agent to stop after validation.