> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Codex

> Connect Codex CLI and the Codex app to MoleSignal Inbound MCP with OAuth 2.1 or an API token.

Codex supports MoleSignal's Streamable HTTP endpoint and OAuth discovery.

## Connect with OAuth 2.1

<Steps>
  <Step title="Register MoleSignal">
    ```bash theme={null}
    codex mcp add molesignal \
      --url https://molesignal.example.com/api/v1/mcp
    ```
  </Step>

  <Step title="Authorize the connection">
    ```bash theme={null}
    codex mcp login molesignal
    ```

    Complete the MoleSignal authorization page in the browser.
  </Step>

  <Step title="Verify the server">
    ```bash theme={null}
    codex mcp get molesignal
    codex mcp list
    ```

    Restart the active Codex task or open a new task so the MCP tool list is refreshed.
  </Step>
</Steps>

<Warning>
  Do not add `--oauth-resource`. MoleSignal already publishes the protected resource through
  OAuth discovery. Adding the same value again can produce `duplicate field resource`.
</Warning>

## Connect with an API token

Use a personal or Service Account API token for a non-interactive Codex process:

```bash theme={null}
export MOLESIGNAL_MCP_TOKEN="<api-token>"

codex mcp add molesignal \
  --url https://molesignal.example.com/api/v1/mcp \
  --bearer-token-env-var MOLESIGNAL_MCP_TOKEN
```

Codex stores the environment-variable name rather than the token value. Make the variable
available to the process that launches Codex.

## Verify tool discovery

Ask Codex:

> Use the MoleSignal MCP server. Search for incident tools and list active incidents. Do not make
> changes.

The first request should use `tool_search`, then `call_read_tool` for a deferred read.

See the [official Codex MCP documentation](https://developers.openai.com/codex/mcp/).
