SQL Sentinel MCP Server
개요
제작자가 쓴 설명(영어 원문)
SQL Server monitoring and diagnostics for AI agents using Extended Events. No ODBC drivers required.
PopNx MCP의 세 기둥
이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.
- 사용자 의견i아직 리뷰가 없어요리뷰는 다음 단계에서 계정 기능과 함께 열려요
- 우리의 기본 점검i1개 중 1개 통과공개된 정보로 점검했으며, 코드는 아직 스캔하지 않았어요
- 사용 정도i아주 새로움★ –
할 수 있는 일
이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.
- 연결 방식: 내 컴퓨터에서 실행
- 전송 방식: stdio
- 카테고리: 데이터베이스 및 데이터셋
설치
쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.
설치하기 전에
- 기본 점검: 1개 중 1개 통과
- 내 컴퓨터에서 내 사용자 계정의 권한(파일, 네트워크, 앱)으로 실행돼요.
- 레지스트리에 입력해야 할 키가 나와 있지 않아요.
필요한 것
- DockerDocker 설치
어떤 앱을 쓰세요?
위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.
Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요
{
"mcpServers": {
"sql-sentinel": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/tkmawarire/sql-sentinel-mcp"
]
}
}
}터미널에서 이 명령어를 실행하세요
claude mcp add sql-sentinel -- docker run -i --rm ghcr.io/tkmawarire/sql-sentinel-mcp또는 설정을 직접 복사하기
프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요
{
"mcpServers": {
"sql-sentinel": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/tkmawarire/sql-sentinel-mcp"
]
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
또는 설정을 직접 복사하기
프로젝트의 .vscode/mcp.json에 붙여 넣으세요
{
"servers": {
"sql-sentinel": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/tkmawarire/sql-sentinel-mcp"
]
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.
선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.
이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.
할 수 있는 일
내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.
기본 점검i
누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 8일 점검
- ✓ 통과
제작자와 저장소 일치
레지스트리 이름이 GitHub 계정 tkmawarire 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요
- … 아직 점검 안 함
계속 관리되고 있음
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
- … 아직 점검 안 함
라이선스 있음
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
- – 해당 없음
엔드포인트 응답
내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요
- – 해당 없음
OAuth로 로그인
내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요
- … 아직 점검 안 함
도구 설명에 숨겨진 지시 없음
내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요
데이터베이스 및 데이터셋 카테고리의 다른 서버와 비교i
- 이 카테고리의 다른 서버 1144개 중 0%보다 스타가 많아요
- 이 카테고리의 다른 서버 1144개 중 5%보다 최근에 레지스트리에 공개됐어요
- 기본 점검 결과가 이 카테고리의 다른 서버 1144개 중 100%와 같거나 더 좋아요
레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.
자주 묻는 질문
SQL Sentinel MCP Server, 안전한가요?
해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.
어떤 키나 코드가 필요한가요?
레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.
내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?
내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).
아직 관리되고 있나요?
GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(2.3.1)은 9개월 전 레지스트리에 올라왔어요.
어떤 앱에서 쓸 수 있나요?
Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 .NET, Docker도 있어야 해요.
대신 쓸 수 있는 건 뭐가 있나요?
같은 카테고리에는: Supabase, MongoDB MCP Server, Elasticsearch MCP Server
대안
같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.
카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i
제작자의 README
README 열기
제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.
SQL Sentinel MCP Server
A production-ready MCP (Model Context Protocol) server for SQL Server monitoring, diagnostics, and database operations. Built with .NET 9 and Microsoft.Data.SqlClient for native SQL Server connectivity — no ODBC drivers required.
Features
- Session Management — Create, start, stop, drop, and list Extended Events sessions
- Smart Filtering — Filter by application, database, user, duration, host, and text patterns
- Query Fingerprinting — Normalize and group similar queries differing only in literal values
- Sequence Analysis — Trace execution order with timing gaps and cumulative duration
- Deadlock Detection — Capture and analyze XML deadlock reports with victim/process details
- Blocking Analysis — Monitor blocked process events with wait resource and SQL text
- Wait Stats — Query
sys.dm_os_wait_statsdirectly, categorized by type (CPU, I/O, Lock, Memory, etc.) - Health Check — Comprehensive server diagnostic: slow queries, deadlocks, blocking, wait stats, and insights
- Real-Time Streaming — Stream captured events for a specified duration
- Production-Safe — Auto-excludes noise (
sp_reset_connection,SETstatements, trace queries) - Database Operations — List tables, describe schemas, query data, insert, update, and drop tables
- AI-Optimized — Structured JSON output with optional Markdown formatting
Requirements
- SQL Server 2012+ with Extended Events enabled (default)
- Required permissions:
GRANT ALTER ANY EVENT SESSION TO [your_login];
GRANT VIEW SERVER STATE TO [your_login];
- For blocked process detection:
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE; EXEC sp_configure 'blocked process threshold', 5; RECONFIGURE;
Installation
Option 1: Docker (Recommended)
No .NET SDK required. Works on any system with Docker installed.
docker pull ghcr.io/tkmawarire/sql-sentinel-mcp:latest
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": { "sql-sentinel": { "command": "docker", "args": ["run", "-i", "--rm", "--network", "host", "-e", "SQL_SENTINEL_CONNECTION_STRING=Server=localhost;Database=master;User Id=sa;Password=YourPassword;TrustServerCertificate=true", "ghcr.io/tkmawarire/sql-sentinel-mcp:latest"] } } }
Claude Code
claude mcp add sql-sentinel \
-e SQL_SENTINEL_CONNECTION_STRING="Server=localhost;Database=master;User Id=sa;Password=YourPassword;TrustServerCertificate=true" \ -- docker run -i --rm --network host \ -e SQL_SENTINEL_CONNECTION_STRING \ ghcr.io/tkmawarire/sql-sentinel-mcp:latest
Network access: The
-iflag is required for stdio transport. Use--network hostso the container can reach SQL Server on your host machine. For remote SQL Server, omit--network hostand use the accessible hostname in your connection string.
Connection string: Set
SQL_SENTINEL_CONNECTION_STRINGvia-e. All tools read the connection string from this environment variable.
Option 2: .NET Global Tool (NuGet)
Requires .NET 9 SDK or later.
dotnet tool install -g SQLSentinel.Mcp
{
"mcpServers": { "sql-sentinel": { "command": "sql-sentinel-mcp", "env": { "SQL_SENTINEL_CONNECTION_STRING": "Server=localhost;Database=master;User Id=sa;Password=YourPassword;TrustServerCertificate=true" } } } }
Option 3: Build from Source
git clone https://github.com/tkmawarire/sql-sentinel.git
cd sql-sentinel dotnet build
Run directly:
dotnet run --project SqlServer.Profiler.Mcp/
Or publish a self-contained single binary:
# Windows
dotnet publish SqlServer.Profiler.Mcp/ -c Release -r win-x64 --self-contained
Linux
dotnet publish SqlServer.Profiler.Mcp/ -c Release -r linux-x64 --self-contained
macOS (Apple Silicon)
dotnet publish SqlServer.Profiler.Mcp/ -c Release -r osx-arm64 --self-contained
macOS (Intel)
dotnet publish SqlServer.Profiler.Mcp/ -c Release -r osx-x64 --self-contained
Output will be in bin/Release/net9.0/{runtime}/publish/
Connection Strings
All tools read the connection string from the SQL_SENTINEL_CONNECTION_STRING environment variable. Set it once before starting the server:
export SQL_SENTINEL_CONNECTION_STRING="Server=localhost;Database=master;User Id=sa;Password=YourPassword;TrustServerCertificate=false;Encrypt=true"
SQL Authentication:
Server=localhost;Database=master;User Id=sa;Password=YourPassword;TrustServerCertificate=false;Encrypt=true
Windows Authentication:
Server=localhost;Database=master;Integrated Security=true;TrustServerCertificate=false;Encrypt=true
Note: Only use
TrustServerCertificate=truein development environments with self-signed certificates.
For production, always use
TrustServerCertificate=falsewith a valid SSL certificate.
Azure SQL:
Server=yourserver.database.windows.net;Database=yourdb;User Id=user;Password=password;Encrypt=true
MCP Tools Reference
Session Lifecycle
| Tool | Description |
|---|---|
sqlsentinel_create_session | Create an Extended Events session with filters (not started) |
sqlsentinel_start_session | Start capturing events for an existing session |
sqlsentinel_stop_session | Stop capturing; events are retained |
sqlsentinel_drop_session | Drop session and discard all events |
sqlsentinel_list_sessions | List all MCP-created sessions with state and buffer usage |
sqlsentinel_quick_capture | Create and start a session in one step |
Event Retrieval
| Tool | Description |
|---|---|
sqlsentinel_get_events | Retrieve captured events with filtering, sorting, and deduplication |
sqlsentinel_get_stats | Aggregate statistics grouped by fingerprint, database, app, or login |
sqlsentinel_analyze_sequence | Analyze query execution sequence with timing and gaps |
sqlsentinel_get_connection_info | List databases, applications, logins, sessions, and blocking info |
sqlsentinel_stream_events | Real-time event capture for a specified duration (1–300s) |
Diagnostics
| Tool | Description |
|---|---|
sqlsentinel_get_deadlocks | Retrieve deadlock events with victim, processes, locks, and SQL text |
sqlsentinel_get_blocking | Retrieve blocked process events with wait resources and SQL text |
sqlsentinel_get_wait_stats | Query sys.dm_os_wait_stats categorized by type (no session required) |
sqlsentinel_health_check | Comprehensive report: slow queries, deadlocks, blocking, wait stats, insights |
Permissions
| Tool | Description |
|---|---|
sqlsentinel_check_permissions | Check current login permissions and blocked process threshold config |
sqlsentinel_grant_permissions | Grant required permissions to a login (requires sysadmin) |
Database Operations
| Tool | Description |
|---|---|
sqlsentinel_list_tables | List all user tables in the database (schema-qualified) |
sqlsentinel_describe_table | Detailed table schema: columns, indexes, constraints, foreign keys |
sqlsentinel_create_table | Create a new table via CREATE TABLE statement |
sqlsentinel_insert_data | Insert data via INSERT statement |
sqlsentinel_read_data | Execute SELECT queries and return results |
sqlsentinel_update_data | Update data via UPDATE statement |
sqlsentinel_drop_table | Drop a table via DROP TABLE statement |
Usage Examples
Quick Debug Session
Agent: sqlsentinel_quick_capture(
sessionName: "debug_api", applications: "MyWebApp", minDurationMs: 100 )
// User triggers the slow operation
Agent: sqlsentinel_get_events( sessionName: "debug_api", sortBy: "DurationDesc", limit: 20 )
Agent: sqlsentinel_drop_session(sessionName: "debug_api")
Find N+1 Queries
Agent: sqlsentinel_quick_capture(
sessionName: "n_plus_one_check", databases: "OrdersDB" )
// User loads a page
Agent: sqlsentinel_get_stats( sessionName: "n_plus_one_check", groupBy: "QueryFingerprint" )
// Look for queries with high execution counts
Trace Specific Operation
Agent: sqlsentinel_analyze_sequence(
sessionName: "my_session", correlationId: "order-12345", responseFormat: "Markdown" )
Deadlock Detection
Agent: sqlsentinel_quick_capture(
sessionName: "deadlock_monitor", eventTypes: "Deadlock" )
// Wait for deadlocks to occur
Agent: sqlsentinel_get_deadlocks( sessionName: "deadlock_monitor", responseFormat: "Markdown" )
Blocking Analysis
Agent: sqlsentinel_quick_capture(
sessionName: "blocking_check", eventTypes: "BlockedProcess" )
// Requires: sp_configure 'blocked process threshold', 5
Agent: sqlsentinel_get_blocking( sessionName: "blocking_check", responseFormat: "Markdown" )
Server Health Check
Agent: sqlsentinel_health_check(
sessionName: "my_session", slowQueryThresholdMs: 1000, responseFormat: "Markdown" )
Database Operations
Agent: sqlsentinel_list_tables()
Agent: sqlsentinel_describe_table( name: "dbo.Products" )
Agent: sqlsentinel_read_data( sql: "SELECT TOP 10 * FROM dbo.Products ORDER BY CreatedDate DESC" )
Wait Stats (No Session Required)
Agent: sqlsentinel_get_wait_stats(
topN: 20, responseFormat: "Markdown" )
Query Fingerprinting
Queries are normalized to group similar ones:
-- These become one fingerprint:
SELECT * FROM Users WHERE id = 123 SELECT * FROM Users WHERE id = 456
-- Fingerprint: abc123:SELECT * FROM Users WHERE id = ? -- Execution count: 2
Noise Filtering
Default excluded patterns (when excludeNoise=true):
sp_reset_connection— Connection pool resetSET TRANSACTION ISOLATION LEVEL— Session setupSET NOCOUNT,SET ANSI_*— Client configurationsp_trace_*,fn_trace_*— Trace system queries
Supported Event Types
SqlBatchCompleted, RpcCompleted, SqlStatementCompleted, SpStatementCompleted, Attention, ErrorReported, Deadlock, BlockedProcess, LoginEvent, SchemaChange, Recompile, AutoStats
Project Structure
sql-profiler-mcp/
├── .github/ │ └── workflows/ │ ├── docker.yml # Build & push multi-arch Docker images │ └── publish-mcp-registry.yml # Publish NuGet + MCP registry ├── .mcp/ │ └── server.json # MCP manifest (NuGet + OCI packages) ├── SqlServer.Profiler.Mcp/ # Main MCP server (stdio transport) │ ├── SqlServer.Profiler.Mcp.csproj │ ├── Program.cs # Entry point, DI setup, MCP config │ ├── Models/ │ │ ├── ProfilerModels.cs # Records, enums, data models │ │ └── DbOperationResult.cs # Result model for CRUD operations │ ├── Services/ │ │ ├── ProfilerService.cs # Core Extended Events logic │ │ ├── QueryFingerprintService.cs # SQL normalization & fingerprinting │ │ ├── WaitStatsService.cs # DMV-based wait stats analysis │ │ ├── SessionConfigStore.cs # In-memory session config storage │ │ └── EventStreamingService.cs # Real-time event streaming │ ├── Utilities/ │ │ └── SqlInputValidator.cs # SQL input validation & escaping │ └── Tools/ │ ├── SessionManagementTools.cs # Session lifecycle tools (6) │ ├── EventRetrievalTools.cs
앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요