Use tinyposter from Codex (and other coding agents)
Codex, Cursor, Claude Code, Aider — any AI agent can use tinyposter. Three paths: MCP (cleanest), the CLI, or raw HTTP.
Pick your path
- Path A — MCP (recommended). Codex CLI talks straight to tinyposter's MCP server. No tools to install, no scripts to write. Best if your agent supports MCP.
- Path B — The CLI. Install
tinyposteras a global command. Works in any agent that can run shell. - Path C — Raw HTTP via
curl. Zero install. Works literally everywhere.
Path A — MCP via Codex CLI (recommended)
Codex CLI reads MCP servers from ~/.codex/config.toml. Add a single block and tinyposter's tools become available to the agent automatically.
- 01
Get a token
Open your tokens page. Click Create token, name it “Codex,” copy the
tp_…string. It only shows once. - 02
Edit ~/.codex/config.toml
Add this block (create the file if it doesn't exist). On macOS/Linux the file is at
~/.codex/config.toml; on Windows it's%USERPROFILE%\.codex\config.toml.~/.codex/config.tomltoml[mcp_servers.tinyposter] url = "https://tinyposter.app/api/mcp" [mcp_servers.tinyposter.headers] Authorization = "Bearer tp_PASTE_YOUR_TOKEN_HERE"Replace
tp_PASTE_YOUR_TOKEN_HEREwith your token. Keep the wordBearerand the space. - 03
Restart Codex and verify
Quit and re-open Codex. In any session, run
/mcp— you should see tinyposter listed, along with its tools.Try asking:
textUse tinyposter to list my connected social accounts.
codex mcp add tinyposter ... to write the config block for you. Run codex mcp --help to check what's available on your install. The TOML edit above always works regardless of version.Path B — Use the CLI
If your agent doesn't do MCP (older Codex builds, generic shell agents) but it can run terminal commands, install the tinyposter CLI.
- 01
Install the CLI
From a terminal, run:
bashnpm install -g tinyposterOr skip install and use it on demand:
bashnpx tinyposter <command>Needs Node.js 18 or newer. If you don't have Node, get it at nodejs.org.
- 02
Set the token
Get a token from your tokens page. Then either:
Option 1 — interactive:
bashtinyposter loginOption 2 — environment variable (best for agents/CI):
bashexport TINYPOSTER_TOKEN=tp_paste_your_token_here - 03
Tell your agent to use it
Most agents already know how to run terminal commands. Drop these instructions into your project notes or system prompt:
textWhen the user asks you to post to social media, use the tinyposter CLI: - tinyposter accounts # list connected platforms - tinyposter post "<text>" --to PLATFORMS - tinyposter schedule "<text>" --to PLATFORMS --at <ISO datetime> - tinyposter list # see recent posts - tinyposter cancel <id> # cancel a scheduled post Pass --json to get machine-readable output.
Path C — Raw HTTP with curl
If you can't install anything, every agent that runs shell can use curl. Set your token in an env var, then:
export TINYPOSTER_TOKEN=tp_paste_your_token
# List connected accounts
curl -s https://tinyposter.app/api/v1/accounts \
-H "Authorization: Bearer $TINYPOSTER_TOKEN"
# Post to multiple platforms
curl -s https://tinyposter.app/api/v1/posts \
-H "Authorization: Bearer $TINYPOSTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"hello from my agent","platforms":["TWITTER","LINKEDIN"]}'
# Schedule for later
curl -s https://tinyposter.app/api/v1/posts \
-H "Authorization: Bearer $TINYPOSTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"sunday note","platforms":["THREADS"],"scheduled_at":"2026-05-03T13:00:00Z"}'Cursor specific
Cursor supports MCP natively (no CLI needed). Full walkthrough on the MCP page under “Cursor.” If you want the CLI path instead, drop the same instructions from Path B into your .cursorrules or .cursor/rules.md.
Claude Code specific
For Claude Code, MCP is the cleanest path — see the Claude guide. If you want the CLI for some reason, install it as in Path B and add a note to your CLAUDE.md:
# Social posting
Use the `tinyposter` CLI for any social media tasks.
Token is in `$TINYPOSTER_TOKEN`. Run `tinyposter help` to see commands.Troubleshooting
▸Codex doesn't see tinyposter after I edit config.toml
Quit Codex fully and re-open. The TOML file is only read on launch. Also check the file is at the right path (~/.codex/config.toml on Mac/Linux) and that the table headers ([mcp_servers.tinyposter] and [mcp_servers.tinyposter.headers]) are spelled exactly as shown.
▸The agent says command not found
Either run with npx tinyposter instead of tinyposter, or install globally with npm install -g tinyposter. Check Node 18+ is installed: node --version.
▸It says 'Not logged in'
Either run tinyposter login once on your machine, or set TINYPOSTER_TOKEN in the agent's environment. For CI, set it as a secret.
▸I want to test without posting for real
Run tinyposter accounts or tinyposter usage — they don't consume posts. There's no sandbox mode (yet); for real posts you can pick a niche platform like Mastodon or Bluesky for low-stakes testing.
Next
- MCP reference — every tool, every input
- CLI guide — every command and flag
- HTTP API — what the CLI is calling under the hood