Drizzle Sentinel MCP
🛡️ Drizzle Sentinel MCP
Drizzle ORMスキーマ検査、マイグレーション安全リンティング、スキーマドリフト検出のための本番グレードTypeScript MCPサーバー。
🌟 概要と目的
自律型コーディングエージェント(Claude Code、Cursor、Codex)は、デフォルト値なしでNOT NULLカラムを追加したり、稼働中のカラムを削除したり、外部キーにインデックスを付け忘れたりするなど、安全でないデータベースマイグレーションを幻覚的に生成することがよくあります。
Drizzle Sentinel MCPは、最新のTypeScriptエンジニアリングスタック(Turborepo + Drizzle ORM + Express / Next.js)向けに構築されています。公式のModel Context Protocolを介して、エージェント駆動型開発ワークフローにクローズドループのデータベースガバナンスを直接注入します。
Related MCP server: schema-lint-mcp
🏗️ システムアーキテクチャ
graph TD
Agent[Agentic IDE / Claude Code / Cursor] -->|MCP Protocol / stdio| Sentinel[🛡️ Drizzle Sentinel MCP Server]
subgraph Tools [MCP Governance Toolsuite]
Sentinel --> T1[🔍 inspect_drizzle_schema]
Sentinel --> T2[🚨 lint_drizzle_migration]
Sentinel --> T3[🩺 detect_schema_drift]
Sentinel --> T4[⚡ explain_query_plan]
end
T1 --> Parser[Drizzle Schema AST Parser]
T2 --> Engine[Rules Engine: NO_DROP, DEFAULT_ON_NOT_NULL, UNINDEXED_FK]
T3 --> Drift[Drift Doctor & Safe Patch Generator]
T4 --> Sandbox[Read-Only Query Sandbox & Smell Detector]
Parser --> AppCode[TypeScript Drizzle Schemas]
Engine --> Migrations[Drizzle Migration .sql Files]
Drift --> Database[(PostgreSQL / SQLite / MySQL)]🛠️ 提供されるMCPツール
inspect_drizzle_schema: TypeScriptのDrizzleスキーマを深く解析し、テーブルとリレーションをマッピングし、インデックスカバレッジが不足している外部キーを特定します。lint_drizzle_migration: SQLマイグレーション文を本番安全ルールに照らして評価します:NO_RAW_DROP_TABLE: 破壊的なテーブル削除をブロックします。NO_RAW_DROP_COLUMN: エキスパンド・コントラクト方式のマイグレーションを強制します。REQUIRE_DEFAULT_ON_NOT_NULL: 既存テーブルでのマイグレーション失敗とテーブルロックを防止します。NO_UNINDEXED_FOREIGN_KEYS: 外部キーのインデックスカバレッジ不足を警告します。
detect_schema_drift: 宣言されたTypeScriptスキーマと実稼働中のデータベーステーブルを比較し、欠落しているカラム/テーブルを特定して、非破壊・ゼロダウンタイムの修復SQLを生成します。explain_query_plan: 厳格な読み取り専用実行サンドボックスを強制し、パフォーマンス上の問題(MISSING_LIMIT、WILDCARD_PROJECTION、SORT_MEMORY_RISK)をフラグ付けします。
📁 リポジトリ構成
drizzle-sentinel-mcp/
├── packages/
│ ├── mcp-server/ # TypeScript MCP server implementation
│ │ ├── src/tools/ # Tool handlers (inspect, lint, drift, sandbox)
│ │ ├── src/services/ # AST & schema parsers
│ │ └── src/index.ts # Stdio server entrypoint
│ └── rules-engine/ # AST & regex defensive migration rules
├── apps/
│ └── demo-service/ # Express + Drizzle ORM reference application
├── tests/ # Vitest comprehensive unit & integration test suite
├── turbo.json # Turborepo task pipeline
├── CLAUDE.md # Agentic guidelines & operating rules
└── README.md🚀 クイックスタートとセットアップ
1. 依存関係のインストールとビルド
npm install
npm run build2. テストスイートの実行
npm test3. Claude Code / Cursor MCP設定への登録
サーバーをclaude_desktop_config.jsonまたは.cursor/mcp.jsonに追加します:
{
"mcpServers": {
"drizzle-sentinel": {
"command": "node",
"args": ["<path-to-repo>/packages/mcp-server/dist/index.js"]
}
}
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceGive AI agents structured database intelligence. Deterministic SQL, NULL trap detection, EXPLAIN pre-flight. MIT licensed.1MIT
- FlicenseBqualityDmaintenanceValidates schema files against customizable lint rules using Claude or Gemini AI, supporting JSON and SQL schemas with rules for naming, structure, and migration safety.1
- AlicenseAqualityDmaintenanceAnalyzes database migrations for risks like lock contention and data loss before they run. Supports Flyway and Liquibase formats, providing risk scores and rollback generation.640MIT
- FlicenseBqualityFmaintenanceProvides database schema management, query execution, and schema introspection through Drizzle ORM and drizzle-kit CLI tools, supporting SQLite and PostgreSQL.515
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Manage Supabase projects end to end across database, auth, storage, realtime, and migrations. Moni…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/akmalkhaniub/drizzle-sentinel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server