Drizzle Sentinel MCP
🛡️ Drizzle Sentinel MCP
Drizzle ORM 스키마 검사, 마이그레이션 안전 린팅, 스키마 드리프트 감지를 위한 프로덕션급 TypeScript MCP 서버.
🌟 개요 및 목적
자율 코딩 에이전트(Claude Code, Cursor, Codex)는 기본값이 없는 NOT NULL 컬럼 추가, 활성 컬럼 삭제, 외래 키 인덱스 누락 등 안전하지 않은 데이터베이스 마이그레이션을 자주 환각(hallucinate)하거나 생성합니다.
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: 확장-축소(expand-contract) 마이그레이션을 강제합니다.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