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"

Install

Install Sequel MCP in Codex

Pick your app and Sequel installs itself: a one-click link where the client supports it, that client’s own few steps where it doesn’t. Every route signs in with your Sequel account over OAuth, so there is no API key to copy and nothing to keep in sync.

Already have an MCP client?

https://api.sequel.sh/mcp

Add it as a remote (streamable HTTP) server and sign in when prompted. Skills come with it; nothing else to install. Manual setup per client

Add Sequel to Codex

Terminal

codex mcp add sequel --url https://api.sequel.sh/mcp
  1. 1Run the command in your terminal. It writes the server to ~/.codex/config.toml.
  2. 2Run codex mcp login sequel and sign in in the browser.
  3. 3Start Codex and ask a question.

Data sources

Connect any source to 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.