Drizzle Kit MCP server
The Drizzle Kit MCP server lets you ask your coding agent to generate migrations, check migration history or pull a schema from an existing database. The agent calls the Drizzle Kit installed in your project.
Connecting the server gives your agent access to operations that write project files and change the database selected by your config. Generating a migration writes a file but does not apply it to the database. Your client’s permissions and approval settings govern tool execution.
Install rc5 in your project
These examples use drizzle-kit@rc and drizzle-orm@rc. Install them in the package that owns your Drizzle schema and config:
npm i drizzle-orm@rc
npm i -D drizzle-kit@rc
In a monorepo, use the workspace package that uses Drizzle. Start the MCP server from that directory so it can find both packages and your config.
The server uses your project’s Drizzle Kit configuration. For push or pull, that config also needs database credentials.
Connect your MCP client
Choose your client below. For CLI setup, run the command from your Drizzle package with the client’s CLI installed.
Register the server for this project:
claude mcp add --transport stdio --scope project drizzle -- npx --no-install drizzle-kit mcpThis writes the entry to .mcp.json. When Claude Code asks to approve the project server, approve it to connect. Use /mcp inside Claude Code to check its status.
See Claude Code’s MCP setup for configuration scopes and client-specific options.
Restart or reconnect the server in your client, then check that its Drizzle tools are available.
Your client manages the server process. You do not need an HTTP port or a separate terminal running it.
Use the right configuration
Drizzle Kit looks for drizzle.config.* in the server’s working directory. If you use a different config file, tell your agent which path to use. Relative paths resolve from that directory, not the client’s.
Try it with your agent
Once connected, describe the work you want done. For example, inspect migration history without changing it:
Use the Drizzle MCP server to check my migration history.
Explain any conflicts or warnings without changing files or the database.Generate a migration for a schema change you’ve already made:
Use the Drizzle MCP server to generate a migration for my schema changes.
Show me the SQL and explain what it changes. Don't apply it to the database.For PostgreSQL, you can also compare your configured schema with your migrations:
Use the Drizzle MCP server to check whether my PostgreSQL schema
and migrations are in sync. Explain any differences without changing files.Apply reviewed migration files through your existing migration workflow. rc5 does not expose a migrate MCP tool.
Add the Drizzle skill
Add the Drizzle skill to help your agent choose a migration workflow, handle rename decisions and interpret results.
Install the skill from your project’s Drizzle Kit, then ask your agent to use it:
Use the Drizzle skill and MCP server. In src/db/schema.ts, rename
users.full_name to users.display_name and generate a migration.
Show me the SQL before applying anything to the database.For tool arguments and response details, see the MCP reference.