This guide walks through connecting a SQLite file to Codex (OpenAI’s terminal coding agent) using QueryBear’s managed MCP server.Documentation Index
Fetch the complete documentation index at: https://docs.querybear.com/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll need
- A QueryBear account (sign up free)
- A SQLite file
- Codex CLI installed
Step 1: Add the SQLite connection to QueryBear
Dashboard → Connections → New connection → SQLite, with the file path.Step 2: Add QueryBear to Codex
~/.codex/config.toml:
Step 3: Authorize and verify
Start a Codex session. First tool call opens OAuth in browser.“What QueryBear tools do you have? List my connections.”
Try it
“In the local analytics.sqlite DB, give me daily active users for the last 30 days.”
SQLite + Codex gotchas
- TOML typos silently disable the server. Re-check the block if
querybeardoesn’t appear in the tool list. - Restart Codex CLI fully after editing config.
ATTACH DATABASEis blocked at the parser.- Most
PRAGMAstatements are restricted to safe ones.
Related
- SQLite MCP server — SQLite-specific deep dive
- Codex client — Codex overview
- Security model — what the gateway protects against