URL: /docs/mcp/install/codex

---
title: Codex
description: Connect the Revised MCP server to the Codex CLI over OAuth or with a bearer token from the environment.
---

The endpoint is `https://getrevised.com/api/mcp`.

## OAuth (recommended)

Codex separates adding a server from authenticating to it, so this is two commands.

```bash
codex mcp add revised --url https://getrevised.com/api/mcp
codex mcp login revised
```

`codex mcp login` opens a browser tab for the OAuth handshake. Sign in to your Revised account and accept the consent screen; Codex stores the token and refreshes it, so no key is written to a config file.

<Note>
  `--url` is what makes this a Streamable HTTP server. Without it, Codex reads the remaining arguments as a command to launch a local stdio server, which is not what this endpoint is.
</Note>

## API key

For CI, a container, or anywhere without a browser to sign in from. Create a key at [getrevised.com/account](https://getrevised.com/account) — free on every plan.

Codex takes the **name of an environment variable**, not the token itself, so the key stays out of `~/.codex/config.toml`:

```bash
export REVISED_KEY=rvd_yourprefix_yoursecret
codex mcp add revised \
  --url https://getrevised.com/api/mcp \
  --bearer-token-env-var REVISED_KEY
```

The variable has to be set in the environment Codex runs in, not just the shell you ran `codex mcp add` in.

## By hand

Both commands write to `~/.codex/config.toml`. The OAuth form is just:

```toml
[mcp_servers.revised]
url = "https://getrevised.com/api/mcp"
```

Editing the file directly works; you still need `codex mcp login revised` to authenticate.

## Verify

```bash
codex mcp list
codex mcp get revised
```

Then, in a session:

> What plan am I on with Revised?

Codex should call `whoami` and report the plan, the reveals left this month and the rate limit. If it calls nothing, the server is not connected — check `codex mcp get revised` for the entry.

## Remove it

```bash
codex mcp logout revised
codex mcp remove revised
```

## Notes

- Nine tools are exposed. `reveal_domain` is the only one that can spend; see [Tools](/docs/mcp/tools).
- MCP calls and REST calls share one per-minute counter per key. See [Rate limits](/docs/api/rate-limits).
- The server sends instructions on connect covering what the metrics mean and when a reveal costs quota, so the assistant does not have to be told.
