Connect your data to Codex

Give OpenAI Codex CLI real-time database access for data-grounded coding sessions.

What Codex can do with Sequel

Grounded answers from real data

Codex with Sequel queries your actual databases before generating code or explanations. Every schema reference, column name, and data shape is verified against what's really there.

Terminal-native data access

No context switching — Codex can pull database data mid-session to inform code generation, write migrations based on actual schemas, and validate assumptions without leaving the terminal.

Agentic data workflows

Codex's multi-step agent can chain Sequel tool calls together: discover schema, sample data, run analysis, then generate code — all in one automated flow.

Example prompts

Everything you can ask Codex about your data.

Ask in plain English. Sequel turns it into a query, runs it read-only, and Codex hands back the answer. No SQL, no dashboards, no CSV exports.

Connect Codex
What you can ask Codex
  • What's the schema of our main database?
  • Show me sample data from the `events` table
  • How many active users do we have in the `users` table?
  • Find all tables that reference `organization_id`
  • What columns exist on the `subscriptions` table and what are their types?

Setup

Add Sequel to Codex

Drop the Sequel MCP server into Codex, then ask it anything about your connected data. Sequel is read-only by default and shows each query before it runs.

~/.codex/config.yaml

mcp_servers:
  sequel:
    type: http
    url: https://api.sequel.sh/mcp
    headers:
      Authorization: "Bearer sql_your_api_key"

Sequel CLI

Install Sequel MCP to Codex

The Sequel CLI installs Sequel into Codex in one step — it signs you in, provisions a scoped API key, and writes the right config to the right place. No keys to copy by hand.

Prefer npm? npm install -g @sequelsh/cli@latest works too.

  1. 1

    Install the Sequel CLI

    One line installs the latest CLI with whatever package manager you have.

    curl -fsSL https://sequel.sh/install | sh
  2. 2

    Sign in

    Authenticate in your browser and pick an organization.

    sequel login
  3. 3

    Install into Codex

    One command installs Sequel into Codex and writes its MCP config.

    sequel install codex

Frequently asked questions

How do I configure Sequel for Codex CLI?

Add the Sequel MCP server to ~/.codex/config.yaml as shown above. Create the file if it doesn't exist. Replace `sql_your_api_key` with a real key from Settings → API Keys, then restart Codex.

Does Codex CLI support HTTP MCP servers?

Yes. Codex CLI supports MCP over HTTP (Streamable HTTP transport). The `type: http` field in the config tells Codex to use this transport when connecting to Sequel.

Can I limit which databases Codex can access?

Sequel MCP is scoped to your organization's connected data sources. You can create separate API keys for different environments and revoke them at any time from Settings → API Keys.

Is this the same as the original OpenAI Codex model?

No — Codex CLI is OpenAI's agentic terminal coding tool, separate from the original Codex language model. It uses the latest OpenAI models (GPT-4o and o-series) with MCP tool support.

Put your data inside Codex

Connect in minutes — then ask across all your data, not just one source.