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

> ## Agent Instructions
> These are the docs for Sevalla, a platform for deploying applications, databases, static sites, object storage and load balancers. The dashboard is at https://app.sevalla.com.
> Bold text in steps is an exact dashboard label.
> To act on a Sevalla account, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md), then the Sevalla CLI (https://docs.sevalla.com/developer-tools/cli.md), then the REST API (https://api-docs.sevalla.com, OpenAPI spec at https://api.sevalla.com/v3/openapi.json).
> Every page index is at https://docs.sevalla.com/llms.txt.

# Codex

> Connect OpenAI Codex (CLI, IDE extension and desktop app) to the Sevalla MCP server, sign in with OAuth or an API key, check the connection, and remove it.

Codex connects to the [Sevalla MCP server](/ai-agents/overview) at `https://mcp.sevalla.com/mcp` as a streamable HTTP server. The Codex CLI, IDE extension and desktop app share one configuration, so adding Sevalla once makes it available in all three.

## Before you begin

* A Sevalla account and a company to work in.
* Codex installed. See the [Codex MCP docs](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) for its own options.

## Add the server

<Steps>
  <Step title="Add Sevalla">
    In a terminal, run:

    ```bash theme={null}
    codex mcp add sevalla --url https://mcp.sevalla.com/mcp
    ```

    Codex writes the server to `~/.codex/config.toml`.

    Or add the server by hand to `~/.codex/config.toml`, or to `.codex/config.toml` in a project (Codex reads project files only in trusted projects):

    ```toml ~/.codex/config.toml theme={null}
    [mcp_servers.sevalla]
    url = "https://mcp.sevalla.com/mcp"
    ```
  </Step>

  <Step title="Sign in">
    Run:

    ```bash theme={null}
    codex mcp login sevalla
    ```

    Your browser opens the Sevalla dashboard: pick the company and the permissions, then click **Authorize** ([what each choice means](/ai-agents/overview#sign-in-with-oauth)).
  </Step>
</Steps>

## Check the connection

Run `codex mcp list`: the list includes `sevalla`. In the Codex TUI or the desktop app, type `/mcp` to see the active servers, then ask "List my Sevalla services".

## Use an API key instead

To skip OAuth, send an [API key](/developer-tools/api-keys) as a bearer token. `bearer_token_env_var` names the environment variable that holds the key, so `config.toml` holds no secret:

```toml ~/.codex/config.toml theme={null}
[mcp_servers.sevalla]
url = "https://mcp.sevalla.com/mcp"
bearer_token_env_var = "SEVALLA_API_KEY"
```

```bash theme={null}
export SEVALLA_API_KEY="svl_..."
codex
```

## Remove the server

Sign out, then remove the server:

```bash theme={null}
codex mcp logout sevalla
codex mcp remove sevalla
```

Removing the server doesn't delete the API key that sign-in created. To revoke it, [delete the key](/developer-tools/api-keys#delete-an-api-key) under **Tools** > **API keys**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.