Dryrun 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
智能化PostgreSQL schema管理工具,支持离线linting和迁移安全检查
Dryrun 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
智能化PostgreSQL schema管理工具,支持离线linting和迁移安全检查
Dryrun 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/boringSQL/dryrun
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"dryrun": {
"command": "npx",
"args": ["-y", "dryrun"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Dryrun 执行以下任务... Claude: [自动调用 Dryrun MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"dryrun": {
"command": "npx",
"args": ["-y", "dryrun"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
The PostgreSQL MCP server that doesn't need connection to the production.
dryrun gives AI agents, IDEs, and CI full schema awareness. From offline snapshot, not live database connection. Lint your schema, validate queries, check migration safety, and explore foreign key graphs. All without credentials leaving the DBA's machine.
dryrun is part of the boringSQL suite alongside RegreSQL and Fixturize.
dryrun is two things: a CLI tool and an MCP server. The CLI extracts and analyzes your schema. The MCP server exposes that analysis to AI assistants. They're separate on purpose.
Homebrew:
brew install boringsql/boringsql/dryrun
From source:
Requires Go 1.26+. If you don't have it, install via go.dev/dl.
git clone https://github.com/boringsql/dryrun.git
cd dryrun
go build -o bin/dryrun ./cmd/dryrun
The binary is at bin/dryrun.
There are two ways to get started, pick whichever fits your setup.
Point dryrun at any schema JSON file (see examples/demo for a ready-made one):
cd examples/demo
dryrun lint
[ERROR] public.audit_log: table has no primary key
fix: add a primary key (bigint GENERATED ALWAYS AS IDENTITY recommended)
[WARN ] public.audit_log: gap in range partitions: ends at '2024-07-01' but next starts at '2024-10-01'
fix: inserts into the gap will fail unless a DEFAULT partition exists
[ERROR] public.task_comments: table has no primary key
fix: add a primary key (bigint GENERATED ALWAYS AS IDENTITY recommended)
[WARN ] public.projects.created_at: timestamp column uses timestamp without time zone instead of timestamptz
fix: use timestamptz for timestamp columns
[ERROR] public.tasks.project_id: FK 'tasks_project_id_fkey' on column(s) (project_id) has no covering index
fix: add an index on FK columns to avoid sequential scans on DELETE/UPDATE
[WARN ] public.users.email: column 'email' uses character varying(255), prefer text
fix: VARCHAR(n) adds a hidden CHECK constraint with no performance benefit
[WARN ] public.user_notifications: table is missing 'created_at' column
fix: add: created_at timestamptz NOT NULL DEFAULT now()
22 violation(s): 6 error, 16 warning, 0 info (13 tables checked)
No database needed. Works entirely from the JSON file.
If you can connect to a PostgreSQL instance (local, dev, or production), one command does everything:
dryrun init --db "$DATABASE_URL"
This creates dryrun.toml (with [project] id and default profile), the .dryrun/ data directory, and introspects the database into .dryrun/schema.json. Snapshots are keyed by (project_id, database_id); set database_id per profile when a project has multiple databases (e.g. auth, billing). See docs/dryrun-toml.md for the full config reference.
The person with credentials exports the schema once:
dryrun dump-schema --source "$DATABASE_URL" --pretty --name "production" -o schema.json
They commit schema.json to the repo (or share it however you like). Everyone else initializes and imports:
dryrun init
dryrun import schema.json
dryrun init creates dryrun.toml and .dryrun/. dryrun import loads the snapshot. No database needed on their machine.
The CLI connects to your PostgreSQL database, introspects the full catalog (tables, views, indexes, constraints, partitions, functions, enums, RLS policies, triggers, extensions, GUCs), and writes a single JSON snapshot. That snapshot is the source of truth for everything else.
Once you have the snapshot, the CLI works offline:
Dryrun是一个智能化的PostgreSQL schema管理工具,支持离线linting和迁移安全检查
该工具使用 BSD-2-Clause 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ BSD 2-Clause — 极度宽松,几乎可以任意使用,仅需保留版权声明。
经综合评估,Dryrun 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | dryrun |
| 原始描述 | 开源MCP工具:PostgreSQL schema intelligence MCP server with offline linting, migration safety。⭐26 · Go |
| Topics | PostgreSQLschemalintingmigration-safety |
| GitHub | https://github.com/boringSQL/dryrun |
| License | BSD-2-Clause |
| 语言 | Go |
收录时间:2026-05-25 · 更新时间:2026-05-30 · License:BSD-2-Clause · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端