AI-native SQL client for humans and agents. Query, explore, visualize, and open agent database work as editable SQL workspaces.
280
stars
1,480
commits
TypeScript
primary language
Sep 9, 2026
updated
Dory is an AI-native SQL client for humans and agents.
Dory is a SQL workspace where humans can query, explore, and visualize data, and where AI agents can safely work with databases through MCP.
Unlike a plain database MCP server that only sends query results back to a chat, Dory turns agent work into editable SQL workspaces: SQL tabs, result sets, charts, saved queries, and execution context can all be opened, inspected, modified, and continued by humans.
Use Dory as your everyday SQL client, or as the database execution layer for agents like Claude Code, Codex CLI, and other MCP-compatible tools.
🍺 Install via Homebrew • 🍎 Download for macOS • Download for Windows • 📦 Quick Start • 🏠 Self-Hosting • MCP Guide • 🤝 Contributing • ⭐ Star
No signup required. Click "Try Dory without an account" to start instantly.

AI agents can now write SQL, inspect schemas, and answer analytical questions. But raw agent output is not enough for real data work.
Teams still need to:
Dory is built for this workflow.
Dory provides the same underlying database actions to both the UI and agents:
| Capability | Plain DB MCP Server | Dory |
|---|---|---|
| Run SQL from agents | ✅ | ✅ |
| Explore schema | ✅ | ✅ |
| Editable SQL tabs | ❌ | ✅ |
| Persistent result sets | ❌ | ✅ |
| Charts and filters | ❌ | ✅ |
| Human review workflow | Limited | ✅ |
| Saved queries and workspace context | Limited | ✅ |
| Works as a daily SQL client | ❌ | ✅ |
Agent database work should not disappear into a chat transcript.
@getdory/cli is the agent entrypoint for running Dory without opening the desktop app.
--data desktopUnderstand unfamiliar databases at a glance with an interactive map of tables and relationships.

An AI assistant grounded in real database schema and current query context.
Dory is a multi-database SQL client, with broad driver support and deeper integrations where Dory can provide more than generic SQL execution.
| Database | Status |
|---|---|
| ✅ Deeply integrated | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported |
Dory includes native ClickHouse operations surfaces for teams that need more than a generic SQL editor.
GRANT or CREATE USER statement
brew install dorylab/dory/dory
Make sure Docker is installed, then run:
docker run -d --name dory \
-p 3000:3000 \
-e DS_SECRET_KEY="$(openssl rand -base64 32 | tr -d '\n')" \
-e BETTER_AUTH_SECRET="$(openssl rand -hex 32)" \
-e BETTER_AUTH_URL="http://localhost:3000" \
-e DORY_AI_PROVIDER=openai \
-e DORY_AI_MODEL=gpt-4o-mini \
-e DORY_AI_API_KEY=your_api_key_here \
-e DORY_AI_URL=https://api.openai.com/v1 \
-e NEXT_PUBLIC_REQUIRE_EMAIL_VERIFICATION=false \
-e DORY_INIT_USER_EMAIL=admin@getdory.dev \
-e DORY_INIT_USER_PASSWORD=admin \
dorylab/dory:latest
Then:
Username: admin@getdory.dev
Password: admin
The initial administrator account is controlled by DORY_INIT_USER_EMAIL and DORY_INIT_USER_PASSWORD in .env.
To enable email verification, set RESEND_API_KEY to a valid resend key and EMAIL_FROM to a validated email.
For long-running self-hosted deployments, Docker Compose runs Dory with a dedicated PostgreSQL database and persistent volumes.
cp docker-compose.env.example .env
# Edit .env and replace all placeholder secrets/passwords.
docker compose up -d
For comprehensive self-hosting documentation, environment variables, and deployment guides, see the Self-Hosting Documentation.
Install the Dory skill for Codex, ChatGPT, Claude, and other agents that support the open Agent Skills format.
npx skills add https://github.com/dorylab/skills --skill dory
The skill teaches agents when to use Dory, how to use Dory MCP tools, and how to preserve generated SQL, result sets, and findings in an editable Dory Agent Run workspace.
The skill does not install the Dory CLI or configure MCP automatically. For live database access, connect Dory MCP with the setup commands below.
Use @getdory/cli to connect MCP-compatible agents to Dory. It can run a local stdio MCP server, host a long-running HTTP MCP endpoint, bridge to hosted Dory Web, or reuse Dory Desktop local data with --data desktop.
For the full MCP setup guide, including CLI stdio, headless HTTP, and hosted Dory bridge options, see Dory MCP Guide.
Run a local stdio MCP server when your agent client is on the same machine:
codex mcp add dory -- npx -y @getdory/cli mcp serve --stdio --data standalone
codex mcp list
claude mcp add dory -- npx -y @getdory/cli mcp serve --stdio --data standalone
claude mcp list
Run a local HTTP MCP endpoint when you want a long-running service:
npx -y @getdory/cli mcp token create --data standalone --name "local-http"
export DORY_MCP_TOKEN="dory_mcp_..."
npx -y @getdory/cli mcp serve \
--http \
--host 127.0.0.1 \
--port 3318 \
--token "$DORY_MCP_TOKEN" \
--data standalone
Add that HTTP endpoint to Codex CLI:
codex mcp add \
--url http://127.0.0.1:3318/api/mcp \
--bearer-token-env-var DORY_MCP_TOKEN \
dory
Add it to Claude Code:
claude mcp add \
--transport http \
dory \
http://127.0.0.1:3318/api/mcp \
--header "Authorization: Bearer $DORY_MCP_TOKEN"
Bridge hosted Dory Web to local MCP clients:
npx -y @getdory/cli mcp login --url https://your-dory-host
codex mcp add dory-hosted -- npx -y @getdory/cli mcp bridge --url https://your-dory-host
claude mcp add dory-hosted -- npx -y @getdory/cli mcp bridge --url https://your-dory-host
For the standalone @getdory/mcp bridge package, see packages/mcp. For the full CLI and headless runtime guide, see packages/cli.
Dory is built with a pluggable AI provider architecture. You can freely switch between different model vendors by changing environment variables, with no code changes required.
Currently supported providers:
| Provider | Env DORY_AI_PROVIDER | Description |
|---|---|---|
| OpenAI | openai | Default provider. Uses official OpenAI API. |
| OpenAI-Compatible | openai-compatible | Any service exposing an OpenAI-compatible API. |
| Anthropic | anthropic | Claude models via Anthropic official API. |
google | Gemini models via Google Generative AI API. | |
| Qwen (Alibaba) | qwen | Qwen models via DashScope OpenAI-compatible endpoint. |
| xAI | xai | Grok models via xAI API. |
See the latest roadmap here:
Apache-2.0
1,061 commits
165 commits
161 commits
59 commits
TypeScript
98.6%
AI-native SQL client for humans and agents. Query, explore, visualize, and open agent database work as editable SQL workspaces.
280
stars
1,480
commits
TypeScript
primary language
Sep 9, 2026
updated
Dory is an AI-native SQL client for humans and agents.
Dory is a SQL workspace where humans can query, explore, and visualize data, and where AI agents can safely work with databases through MCP.
Unlike a plain database MCP server that only sends query results back to a chat, Dory turns agent work into editable SQL workspaces: SQL tabs, result sets, charts, saved queries, and execution context can all be opened, inspected, modified, and continued by humans.
Use Dory as your everyday SQL client, or as the database execution layer for agents like Claude Code, Codex CLI, and other MCP-compatible tools.
🍺 Install via Homebrew • 🍎 Download for macOS • Download for Windows • 📦 Quick Start • 🏠 Self-Hosting • MCP Guide • 🤝 Contributing • ⭐ Star
No signup required. Click "Try Dory without an account" to start instantly.

AI agents can now write SQL, inspect schemas, and answer analytical questions. But raw agent output is not enough for real data work.
Teams still need to:
Dory is built for this workflow.
Dory provides the same underlying database actions to both the UI and agents:
| Capability | Plain DB MCP Server | Dory |
|---|---|---|
| Run SQL from agents | ✅ | ✅ |
| Explore schema | ✅ | ✅ |
| Editable SQL tabs | ❌ | ✅ |
| Persistent result sets | ❌ | ✅ |
| Charts and filters | ❌ | ✅ |
| Human review workflow | Limited | ✅ |
| Saved queries and workspace context | Limited | ✅ |
| Works as a daily SQL client | ❌ | ✅ |
Agent database work should not disappear into a chat transcript.
@getdory/cli is the agent entrypoint for running Dory without opening the desktop app.
--data desktopUnderstand unfamiliar databases at a glance with an interactive map of tables and relationships.

An AI assistant grounded in real database schema and current query context.
Dory is a multi-database SQL client, with broad driver support and deeper integrations where Dory can provide more than generic SQL execution.
| Database | Status |
|---|---|
| ✅ Deeply integrated | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported | |
| ✅ Supported |
Dory includes native ClickHouse operations surfaces for teams that need more than a generic SQL editor.
GRANT or CREATE USER statement
brew install dorylab/dory/dory
Make sure Docker is installed, then run:
docker run -d --name dory \
-p 3000:3000 \
-e DS_SECRET_KEY="$(openssl rand -base64 32 | tr -d '\n')" \
-e BETTER_AUTH_SECRET="$(openssl rand -hex 32)" \
-e BETTER_AUTH_URL="http://localhost:3000" \
-e DORY_AI_PROVIDER=openai \
-e DORY_AI_MODEL=gpt-4o-mini \
-e DORY_AI_API_KEY=your_api_key_here \
-e DORY_AI_URL=https://api.openai.com/v1 \
-e NEXT_PUBLIC_REQUIRE_EMAIL_VERIFICATION=false \
-e DORY_INIT_USER_EMAIL=admin@getdory.dev \
-e DORY_INIT_USER_PASSWORD=admin \
dorylab/dory:latest
Then:
Username: admin@getdory.dev
Password: admin
The initial administrator account is controlled by DORY_INIT_USER_EMAIL and DORY_INIT_USER_PASSWORD in .env.
To enable email verification, set RESEND_API_KEY to a valid resend key and EMAIL_FROM to a validated email.
For long-running self-hosted deployments, Docker Compose runs Dory with a dedicated PostgreSQL database and persistent volumes.
cp docker-compose.env.example .env
# Edit .env and replace all placeholder secrets/passwords.
docker compose up -d
For comprehensive self-hosting documentation, environment variables, and deployment guides, see the Self-Hosting Documentation.
Install the Dory skill for Codex, ChatGPT, Claude, and other agents that support the open Agent Skills format.
npx skills add https://github.com/dorylab/skills --skill dory
The skill teaches agents when to use Dory, how to use Dory MCP tools, and how to preserve generated SQL, result sets, and findings in an editable Dory Agent Run workspace.
The skill does not install the Dory CLI or configure MCP automatically. For live database access, connect Dory MCP with the setup commands below.
Use @getdory/cli to connect MCP-compatible agents to Dory. It can run a local stdio MCP server, host a long-running HTTP MCP endpoint, bridge to hosted Dory Web, or reuse Dory Desktop local data with --data desktop.
For the full MCP setup guide, including CLI stdio, headless HTTP, and hosted Dory bridge options, see Dory MCP Guide.
Run a local stdio MCP server when your agent client is on the same machine:
codex mcp add dory -- npx -y @getdory/cli mcp serve --stdio --data standalone
codex mcp list
claude mcp add dory -- npx -y @getdory/cli mcp serve --stdio --data standalone
claude mcp list
Run a local HTTP MCP endpoint when you want a long-running service:
npx -y @getdory/cli mcp token create --data standalone --name "local-http"
export DORY_MCP_TOKEN="dory_mcp_..."
npx -y @getdory/cli mcp serve \
--http \
--host 127.0.0.1 \
--port 3318 \
--token "$DORY_MCP_TOKEN" \
--data standalone
Add that HTTP endpoint to Codex CLI:
codex mcp add \
--url http://127.0.0.1:3318/api/mcp \
--bearer-token-env-var DORY_MCP_TOKEN \
dory
Add it to Claude Code:
claude mcp add \
--transport http \
dory \
http://127.0.0.1:3318/api/mcp \
--header "Authorization: Bearer $DORY_MCP_TOKEN"
Bridge hosted Dory Web to local MCP clients:
npx -y @getdory/cli mcp login --url https://your-dory-host
codex mcp add dory-hosted -- npx -y @getdory/cli mcp bridge --url https://your-dory-host
claude mcp add dory-hosted -- npx -y @getdory/cli mcp bridge --url https://your-dory-host
For the standalone @getdory/mcp bridge package, see packages/mcp. For the full CLI and headless runtime guide, see packages/cli.
Dory is built with a pluggable AI provider architecture. You can freely switch between different model vendors by changing environment variables, with no code changes required.
Currently supported providers:
| Provider | Env DORY_AI_PROVIDER | Description |
|---|---|---|
| OpenAI | openai | Default provider. Uses official OpenAI API. |
| OpenAI-Compatible | openai-compatible | Any service exposing an OpenAI-compatible API. |
| Anthropic | anthropic | Claude models via Anthropic official API. |
google | Gemini models via Google Generative AI API. | |
| Qwen (Alibaba) | qwen | Qwen models via DashScope OpenAI-compatible endpoint. |
| xAI | xai | Grok models via xAI API. |
See the latest roadmap here:
Apache-2.0
1,061 commits
165 commits
161 commits
59 commits
TypeScript
98.6%