Before you start

You need Codex CLI and a SocialRouter account. No API key: Codex signs you in itself. Sign up at socialrouter.io if you have not yet. Codex connects straight to the hosted endpoint, so there is nothing to install.
1

Add the server

This writes to ~/.codex/config.toml. Use .codex/config.toml at a repo root to scope it to one project instead; the block it writes is:
That form holds no credential, so it is safe to commit. Each teammate signs in as themselves and is billed for what they run.
2

Sign in

Codex opens your browser on the SocialRouter consent screen. Approve, and it keeps the token from then on. codex mcp logout socialrouter undoes it.
Use a key where a browser flow cannot run, such as CI or a container. Codex stores the name of an environment variable rather than the key itself:
Create the key in the dashboard. It is shown once, at creation. Put the export line in your shell profile to make it stick. With a token configured, no sign-in ever runs.
3

Check it is connected

socialrouter should be listed. Inside a session, /mcp shows the servers and the tools they add.
4

Ask for something

Get me Satya Nadella’s LinkedIn profile.
Codex finds the right service on its own. If you are not sure what to ask, try “What social media data can you pull with SocialRouter?”

If something goes wrong

Call the endpoint yourself to see the real answer:
A 401 means the credential is wrong or revoked. If you are using a key, it can also mean SOCIALROUTER_API_KEY is not set in the shell you ran this from, which is the same shell Codex reads it from.
Run codex mcp login socialrouter again. If it still fails, remove the server (codex mcp remove socialrouter) and add it back. A stale entry from an older config can keep pointing at a credential that no longer works. Authentication has the rest.
If exporting a variable is awkward, send it as a static header in ~/.codex/config.toml, which lives outside your repos:
Never do this in a committed project config.

Next steps

Tools reference

What list_services, run, get_extraction and get_account do.

What you can pull

Every platform and service Codex can call.