# Connect Codex to Resilis

Source: https://resilis.io/guides/codex/

Add the Resilis MCP server to Codex CLI, complete OAuth sign-in, and check the connection before asking Codex to work with your cloud resources.

## Before you start

Install Codex CLI and sign in to a Resilis account with access to the organization you want to use. Keep your application source in a workspace Codex can access.

- [OpenAI MCP guide for Codex CLI](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)

## Add the Resilis MCP server

Register Resilis as a remote MCP server from your terminal:

### Terminal

```sh
codex mcp add resilis --url https://mcp.resilis.io
```

## Sign in and review access

Start the OAuth flow. In the browser, sign in to Resilis, select an organization if prompted, and review the requested access before approving it.

### Terminal

```sh
codex mcp login resilis
```

## Check the connection

List configured MCP servers. Then ask Codex to inspect the application in your workspace and prepare a deployment plan. Choose the project, environment, and compute target, and review the build settings and environment variables before you submit the workspace. Check deployment status and logs after it starts.

### Terminal

```sh
codex mcp list
```

## Ask for a deployment plan

Use a request like this after Codex can access the application files:

### Prompt

```text
Inspect this application workspace and prepare a Resilis deployment plan. Ask me which project, environment, and compute target to use. Show the detected build settings and required environment variables so I can review them before the deployment starts.
```

- [Read the Resilis MCP guide](/docs/agents-and-mcp)
- [Follow the local workspace setup](/docs/getting-started)
