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

# Connect Codex

> Add a Neuron MCP endpoint and sign in with OAuth

This example connects Codex to the read-only parts of a Neuron's file server. You do not need to retrieve an OAuth token yourself.

## Before you start

Install a current Codex client and obtain this connection profile from the Neuron operator:

```text theme={null}
Endpoint:  https://neuron.example.com/MCP/Files
Client ID: <client-id>, or confirmation that DCR is enabled
Scopes:    <operator-supplied scopes>
```

If the Neuron is yours, follow [Connect to a local Neuron](/mcp/local-neuron) first.

<Warning>
  Installing a Neuron does not by itself guarantee a Codex-compatible OAuth client-registration path. The operator must configure either a static client for Codex or working DCR before this login can succeed.
</Warning>

## 1. Add the endpoint

When you have a pre-registered client ID:

```bash theme={null}
codex mcp add neuron-files --url https://neuron.example.com/MCP/Files --oauth-client-id YOUR_CLIENT_ID
```

When the operator has confirmed automatic OAuth client registration (CIMD or DCR):

```bash theme={null}
codex mcp add neuron-files --url https://neuron.example.com/MCP/Files
```

## 2. Sign in

Start the OAuth flow:

```bash theme={null}
codex mcp login neuron-files
```

Codex opens the Neuron's sign-in and authorization flow. Complete it in the browser. Codex stores the resulting credentials; do not copy an access token into the command or configuration file. When both CIMD and DCR are available, Codex chooses automatically. Use `codex mcp login --help` before forcing a registration method for an operator-specific setup.

See the [official Codex MCP reference](https://developers.openai.com/codex/mcp) for the current client flags, OAuth selection rules, and configuration-file format.

## 3. Verify the connection

```bash theme={null}
codex mcp list
codex
```

Inside Codex, run `/mcp`. Confirm `neuron-files` is connected, then ask:

```text theme={null}
Use neuron-files to list the files I can access. Do not modify anything.
```

If login, discovery, or permissions fail, use [Troubleshoot MCP](/mcp/troubleshooting).

## Use a different server

Replace the endpoint and OAuth connection profile with those supplied for `/MCP/EventLog`, `/MCP/Content`, or `/MCP/XMPP`. Do not assume these servers are deployed or that the same role grants access to every one.
