> Markdown version of [Codex](https://vaadin.com/docs/v24/building-apps/mcp/supported-tools/codex). Section index: [llms.txt](https://vaadin.com/docs/v24/building-apps/llms.txt)

# Codex

OpenAI Codex provides native support for HTTP-based MCP servers, making it straightforward to integrate with the Vaadin MCP server for enhanced code generation capabilities.

**Requirements:** Codex CLI version 0.43 or later

## <a id="configuration"></a>Configuration

Add the following to `~/.codex/config.toml`:

```toml
[mcp_servers.vaadin]
url = "https://mcp.vaadin.com/docs"
```

After configuration, restart Codex to load the new MCP server.

> **Note:** If you see "missing field command" errors, upgrade Codex with:
>
> ```bash
> npm install -g @openai/codex@latest
> ```

## <a id="configuration-file-format"></a>Configuration File Format

The Codex configuration uses TOML format:

- Each MCP server is defined under `[mcp_servers.name]`

- The `url` field points to the HTTP endpoint

- Multiple servers can be configured by adding additional sections

Example with multiple servers:

```toml
[mcp_servers.vaadin]
url = "https://mcp.vaadin.com/docs"

[mcp_servers.other_server]
url = "https://example.com/mcp"
```

## <a id="verify-the-setup"></a>Verify the Setup

After restarting Codex:

1. Start a new coding session

2. Ask Codex about Vaadin development (e.g., "Generate a Vaadin login form")

3. Codex queries the Vaadin MCP server to access relevant documentation

4. Generated code is based on current Vaadin best practices

You can verify active MCP servers by running:

```bash
codex mcp list
```

## <a id="resources"></a>Resources

- [Codex MCP Documentation](https://developers.openai.com/codex/mcp/)

- [Codex GitHub Repository](https://github.com/openai/codex)

- [Vaadin MCP Server Repository](https://github.com/vaadin/vaadin-mcp)
