drizzle-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| --url | No | Connect to this database URL instead of the config's dbCredentials. | |
| --config | No | The Drizzle config file path (default: drizzle.config.ts in the current folder). Required for clients that don't start servers in your project folder, such as Claude Desktop. | |
| --driver | No | The database driver to use: pg, postgres, pglite, better-sqlite3 or libsql (default: the one installed). | |
| --redact | No | Hide columns whose names match this regex (default: password, secret, token, apiKey…). | |
| --timeout | No | Statement time limit in milliseconds (default: 15000). | |
| --max-rows | No | The most rows a tool returns (default: 100). | |
| --max-text | No | Cut strings longer than this (default: 500). | |
| --allow-writes | No | Add the execute tool, which allows changing data. Writes are opt-in; without this flag the server is read-only. | |
| --show-secrets | No | Don't hide any columns. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server shows the project's database through its Drizzle schema, like Drizzle Studio.
Start with schema to see the tables, then schema with a table for its columns and relations. Tables and columns can be named by their TypeScript key (createdAt) or SQL name (created_at); results use TypeScript keys, as db.query does.
Use browse to read rows with filters, sorting and related rows, count for totals and breakdowns, and query for any SELECT. drift compares the schema with the database and migrations lists pending migrations.
Everything runs in read-only transactions unless the server was started with --allow-writes. Values in columns that look like secrets are hidden, and results are capped.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| schemaA | Lists the tables in the Drizzle schema with their TypeScript and SQL names, or with |
| browseA | Reads rows from a table, like Drizzle Studio: pick columns, filter, sort, page, and include related rows through the schema's relations. Returns rows keyed by TypeScript property, plus the total matching. |
| countA | Counts the rows in a table that match a filter. With |
| queryA | Runs one SQL statement in a read-only transaction and returns up to 100 rows. Use $1, $2 (Postgres) or ? (SQLite) with |
| explainA | Shows the plan the database would use for a query, to check that indexes are used. With |
| driftA | Compares the Drizzle schema with the live database: tables and columns on one side only, and columns whose type or nullability differ. Use it when queries fail on columns the code expects, or after changing the schema. |
| migrationsA | Lists the migrations drizzle-kit generated, and whether each has been applied to the database, is pending, or was edited after it was applied. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| schema | Every table in the schema, with its columns and relations. |
TDQS
Scored across 7 tools
Each tool has a distinct primary role: schema introspection, row browsing, counting, raw SQL, query plans, migration status, and schema drift. There is some overlap between browse and query for reading data, and between schema and drift for schema information, but the descriptions make the intended use cases clear.
All tool names are single lowercase words with no camelCase/snake_case mixing, so the set is visually consistent. However, the names mix verbs (browse, count, query, explain) and nouns (schema, migrations, drift), so the convention is readable but not perfectly uniform.
Seven tools is well-scoped for a database/schema inspection server. Each tool covers a distinct inspection workflow without obvious redundancy.
The surface covers schema inspection, data browsing, counting, raw querying, query planning, migration status, and drift detection, which is strong for a read-only inspection server. Minor gaps might include applying migrations or richer migration details, but those may be intentionally out of scope.