
Drizzle MCP
io.github.FredobummaPublished by GitHub account Fredobummav0.1.1Updated Oct 29, 2026
Drizzle Studio for agents: explore your database through your Drizzle schema. Read-only by default.
Overview
Local MCP server that lets a coding agent inspect a Drizzle-managed database through the project's own schema, read-only by default.
- What you can do
- List tables and describe columns, keys, indexes, checks and relations from the Drizzle schema
- Browse rows with column selection, JSON filters, sorting, paging and related rows
- Count rows overall or grouped by value, and run one read-only SQL statement returning up to 100 rows
- Show query plans, with real timings via analyze on Postgres
- Compare the schema with the live database and list applied or pending drizzle-kit migrations
- Change data through an execute tool, only when started with the write flag
- When to use it
- Useful when an agent needs to see what is actually in a Drizzle-backed Postgres or SQLite database and write Drizzle code that matches the real schema, including TypeScript names, relations and defaults. Pair it with drizzle-kit's own MCP server when migrations are also needed.
- Requirements
- Runs locally via npx; needs Node.js 22 or newer and a project with drizzle.config.ts. It loads that config and the project's .env, and connects using the driver and drizzle-orm version already installed (pg, postgres.js, PGlite, better-sqlite3 or libsql/Turso). MySQL and Drizzle 1.0 are not supported. Clients that do not start in the project folder need a config path argument.
Installation
In SourceWeft
- Open Drizzle MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
drizzle-mcp
Drizzle Studio for agents. An MCP server that lets Claude Code, Cursor and other coding agents see your database through your Drizzle schema.
A generic database MCP sees tables and columns. This one reads the schema your code uses: TypeScript names next to SQL names, relations, enums and defaults. An agent can then answer "what's actually in the database?" and write Drizzle code that matches it.
For migrations, use Drizzle's own drizzle-kit mcp (drizzle-kit 1.0): it generates, pushes and checks them. drizzle-mcp reads what's in the database, read-only by default, so the two work side by side.
If it's useful to you, a star on GitHub helps other people find it. Questions, bug reports and ideas are welcome in the issues, and so are pull requests.
Here is what an agent gets back when it asks about a posts table:
Set up
Run it from the folder with drizzle.config.ts.
Claude Code
Cursor (.cursor/mcp.json) and VS Code (.vscode/mcp.json, with "servers" instead of "mcpServers"):
For clients that don't start servers in your project folder, such as Claude Desktop, add "--config", "/path/to/drizzle.config.ts" to args.
drizzle-mcp loads your config the way drizzle-kit does, including your .env. It connects with the database driver and the drizzle-orm version your project already has installed.
Tools
Filters are JSON, so values are always bound as parameters, never pasted into SQL:
If you edit the schema, the server picks up the change on the next call; no restart needed.
Safe by default
An agent shouldn't be able to wreck a database by accident, or because something it read told it to.
- Read-only. Every statement runs in a read-only transaction. SQLite reads use a read-only connection.
- One statement at a time.
select 1; commit; drop table usersis refused before it reaches the database. The Postgres drivers andbetter-sqlite3would refuse it again on their own; libsql would silently drop everything after the first statement. - Bounded. Statements time out after 15 seconds. Results are capped at 100 rows and fetched through a cursor, so a large table is never pulled into memory. Long values are cut short.
- Secrets hidden. Values in columns named like
password,token,secretorapiKeyare shown as[redacted]. - Writes are opt-in.
--allow-writesadds theexecutetool.querystays read-only either way.
Requirements
MySQL isn't supported yet.
drizzle-mcp needs Node.js 22 or newer. It's tested with drizzle-orm 0.45, the current stable release. Drizzle 1.0, now in release candidates, defines relations differently and isn't supported yet.
Options
How it works
- It loads
drizzle.config.tsand your.env, then imports the schema files the config points to (a file, a folder or a glob). Imports go through jiti, so TypeScript works without a build step. - It reads tables, columns and relations from drizzle-orm's own metadata. This is the same information
drizzle-kitand relational queries use. That's where the TypeScript names and relations come from. - It connects with your project's driver.
browseandcountbuild relational queries with your schema objects.queryruns plain SQL through the safeguards above.
Development
The tests run every tool against every driver. Postgres runs as PGlite, which is real Postgres compiled to WebAssembly. pg and postgres.js reach it over the Postgres wire protocol, so no Docker is needed.
Pull requests are welcome. Run pnpm check before opening one, and for anything large, open an issue first so we can agree on the approach.
License
MIT
Source: README.md at commit b2bfde0
Tools
0Version history
1- v0.1.1LatestOct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts