mssql-health-mcp
Read-only diagnostics for a live SQL Server — it reports health, live blocking/queries, and missing-index suggestions without ever modifying anything.
Server health summary (
sunucu_sagligi): version, edition, CPU, physical memory, uptime, database count, and count of non-online databases.Live queries & blocking chain (
aktif_sorgular_blocking): currently running queries with session, blocking session, wait type/duration, CPU, elapsed time, and query text — the go-to for "why is it slow right now?"Missing indexes (
eksik_indexler): SQL Server's suggested missing indexes ranked by impact score, with database, table, usage, and equality/inequality/included columns — suggests only, never creates.Strictly read-only: no write tools; all three take no parameters and only read DMVs, so nothing can be changed.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mssql-health-mcp show me the active blocking queries"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ChatGPT knows how to shrink a log file. It can't see your server. This MCP can. Ask "why is my server slow right now?" and get the real answer — live blocking chains, top waits, missing indexes — straight from your instance.
The value of an MCP isn't knowledge (LLMs already have that). It's access — to the one thing the internet can't see: the live state of your database.
🔒 Read-only by design
Built so that the tools themselves cannot change anything:
No write tools. Only DMV/SELECT diagnostics.
INSERT/UPDATE/DELETE,DROP/ALTER, "run any SQL" don't exist in the tool surface. Structurally cannot change anything.Least privilege. Connect with a read-only login (
VIEW SERVER STATE). Ready script:setup-readonly-login.sql. Two layers: the tools can't write and the login can't write.Runs locally, but tool output goes to your AI client. The MCP server runs on your machine and sends nothing to a server of ours. Its tool results are returned to your AI client, and therefore to the LLM provider you use. That output can include SQL text (which may contain literal values such as names, e-mail addresses or amounts) and database, login, host and application names. Check your organization's data policy first and prefer an enterprise-grade LLM account.
Timeouts and a small connection pool limit the load a diagnostic adds. This is not a guarantee: the diagnostics still read DMVs, so run them outside peak hours on busy systems.
ApplicationIntent=ReadOnlyonly routes to a readable secondary and does not block writes. The real protection is the read-only login.
Related MCP server: DB Analyzer MCP Server
🚀 Quick start
Create the read-only login (setup-readonly-login.sql), then add this to your MCP client's config (works for most clients that use the mcpServers format):
{
"mcpServers": {
"mssql-health": {
"command": "npx",
"args": ["-y", "github:dmcteknoloji/mssql-health-mcp"],
"env": {
"MSSQL_CONNECTION_STRING": "Server=YOURSERVER,1433;Database=master;User Id=mcp_readonly;Password=***;Encrypt=true;TrustServerCertificate=true;ApplicationIntent=ReadOnly;"
}
}
}
}Needs Node.js 18+ and git (installs straight from GitHub; not published to npm). No git? Download the repo ZIP and run it with
node index.js.
Then just ask: "Show my SQL Server health", "Why is my server slow right now?", "Which indexes are missing?"
🧰 Tools
Tool | What it answers |
| Health report — prioritized critical/warning findings in one call |
| Server health: version, edition, CPU, memory, uptime, database count |
| Running queries + blocking chain — "why is it slow right now?" |
| Top wait stats (non-benign) with % — "what is the server waiting on?" |
| Missing-index suggestions by impact (suggests only, never creates) |
| Transaction log size & used % per database |
| Data/log file sizes + disk free space per volume |
| Last full/diff/log backup per database — "is my backup current?" |
| tempdb space by type (user/internal objects, version store, free) |
| Recent deadlock timestamps from system_health |
| Top queries by CPU/reads/duration + query text |
| Unused indexes (write cost, never read) |
| Missing index suggestions as CREATE INDEX statements (review them and try in a test environment first) |
| Server config best-practice audit (MAXDOP, memory…) |
| Memory pressure: PLE, pending grants, free RAM |
| VLF count + why the log can't truncate |
| Long/open transactions (log bloat) |
| Points you to continuous monitoring → SentinelDB360 |
🩺 → 📈 Next step: continuous monitoring
This MCP gives you a snapshot ("what's happening now"). For 24/7 monitoring, history, alerting and governance, DMC's product SentinelDB360 (database monitoring software) is built for exactly that. Ask the assistant "how do I monitor this continuously?" and the surekli_izleme tool explains.
License
MIT — © Çağlar Özenç · caglarozenc.com
ChatGPT log dosyasının nasıl küçültüleceğini bilir, ama sizin sunucunuzu göremez. Bu MCP görür. "Sunucum şu an neden yavaş?" diye sorun; gerçek cevabı — canlı blocking zinciri, en çok bekleme, eksik index — doğrudan sunucunuzdan alın.
Bir MCP'nin değeri bilgide değil, erişimde: internetin göremeyeceği tek şeye — sizin veritabanınızın canlı durumuna — erişiminde.
🔒 Tasarımı gereği salt-okunur
Araçların kendisi hiçbir şeyi değiştiremeyecek biçimde tasarlandı:
Yazma aracı yok. Yalnızca DMV/SELECT teşhis araçları.
INSERT/UPDATE/DELETE,DROP/ALTER, "rastgele sorgu çalıştır" araç yüzeyinde yoktur — yapısal olarak hiçbir şey değiştiremez.En az ayrıcalık. Salt-okunur login ile bağlanın (
VIEW SERVER STATE). Hazır script:setup-readonly-login.sql. İki kat koruma: araç da yazamaz, login de yazamaz.Lokal çalışır, ama araç çıktısı yapay zeka istemcinize gider. MCP sunucusu sizin makinenizde çalışır ve bize hiçbir şey göndermez. Araç sonuçları yapay zeka istemcinize, dolayısıyla kullandığınız LLM sağlayıcısına iletilir. Bu çıktı SQL metnini (içinde isim, e-posta, tutar gibi sabit değerler olabilir) ve veritabanı, login, makine ve uygulama adlarını içerebilir. Önce kurumunuzun veri politikasına bakın, kurumsal bir LLM hesabı tercih edin.
Zaman aşımı ve küçük bağlantı havuzu bir teşhisin ekleyeceği yükü sınırlar. Bu bir garanti değildir, teşhisler yine DMV okur, yoğun sistemlerde yoğun saatlerin dışında çalıştırın.
ApplicationIntent=ReadOnlyyalnızca okunabilir ikincil kopyaya yönlendirir, yazmayı engellemez. Asıl koruma salt-okunur login'dir.
🚀 Hızlı başlangıç
Salt-okunur login'i oluşturun (setup-readonly-login.sql), sonra MCP istemcinizin ayar dosyasına yukarıdaki mcpServers bloğunu ekleyin (çoğu istemci aynı biçimi kullanır). Ardından sorun: "SQL sunucumun sağlığını göster", "Sunucum şu an neden yavaş?", "Hangi index'ler eksik?"
🧰 Araçlar
Araç | Ne yanıtlar |
| Sağlık karnesi — tek çağrıda önceliklendirilmiş kritik/uyarı bulgular |
| Sunucu sağlığı: sürüm, edition, CPU, bellek, uptime, veritabanı sayısı |
| Çalışan sorgular + blocking zinciri — "şu an neden yavaş?" |
| En çok bekleme (benign hariç), yüzdesiyle — "sunucu neyi bekliyor?" |
| Etkiye göre eksik index önerileri (yalnızca önerir, oluşturmaz) |
| Veritabanı başına transaction log boyutu ve kullanım % |
| Veri/log dosya boyutları + disk boş alanı |
| DB başına son full/diff/log yedeği — "yedeğim güncel mi?" |
| tempdb alan kullanımı (kullanıcı/dahili nesneler, version store, boş) |
| system_health'ten son deadlock zamanları |
| En çok CPU/okuma/süre yiyen sorgular + metin |
| Kullanılmayan index'ler (yazma maliyeti, okunmuyor) |
| Eksik index önerileri CREATE INDEX cümlesi olarak (gözden geçirin, önce test ortamında deneyin) |
| Sunucu konfig best-practice denetimi (MAXDOP, bellek…) |
| Bellek baskısı: PLE, bekleyen talep, boş RAM |
| VLF sayısı + log neden truncate olmuyor |
| Uzun/açık transaction'lar (log şişiren) |
| Sürekli izleme için yönlendirir → SentinelDB360 |
🩺 → 📈 Bir adım sonrası: sürekli izleme
Bu MCP anlık bir görüntü verir ("şu an ne oluyor"). 7/24 izleme, geçmiş, uyarı ve yönetişim için DMC'nin ürünü SentinelDB360 (veritabanı izleme yazılımı) tam bunun için. Asistana "bunu sürekli nasıl izlerim?" diye sorun; surekli_izleme aracı anlatır.
Lisans
MIT — © Çağlar Özenç · caglarozenc.com
Available Tools
3 toolsaktif_sorgular_blockingA
Su an calisan sorgular ve BLOCKING zinciri: oturum, engelleyen oturum, bekleme turu/suresi, CPU, gecen sure ve sorgu metni. 'Sunucum neden yavas?' icin ilk bakilacak. Salt-okunur.
Inputs: no named parameters.
eksik_indexlerA
SQL Server'in onerdigi EKSIK index'ler, etki skoruna gore sirali: veritabani, tablo, kullanim, etki skoru, esitlik/esitsizlik/dahil kolonlar. Performans icin. Salt-okunur (index OLUSTURMAZ, yalniz onerir).
Inputs: no named parameters.
sunucu_sagligiA
SQL Server'in genel saglik ozeti: surum, edisyon, CPU, fiziksel bellek, calisma suresi (uptime), veritabani sayisi ve online olmayan DB sayisi. Salt-okunur.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct aspect of SQL Server health: blocking queries, missing indexes, and server overview. No overlap in functionality.
Tool names are in Turkish with a mix of styles: 'aktif_sorgular_blocking' uses English 'blocking' while others are pure Turkish. Not fully consistent but understandable.
Three tools is appropriate for a focused health monitor. Not too few, not excessive.
Covers essential health checks: blocking, missing index recommendations, and server state. Minor gaps like deadlock info or wait stats are acceptable for basic diagnostics.
Maintenance
Related MCP Connectors
Ask your databases questions in plain English, run read-only SQL and set up data alerts.
Query, explore, and manage your databases through natural conversation.
Ask questions in plain language, get answers from your business database. No SQL required.
Query and audit AppSheet apps in natural language via Knotrik's pre-scanned definitions.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceProvides read-only SQL Server health diagnostics (server health, blocking queries, missing indexes) via MCP, with a GUI installer that automatically configures AI clients like Claude Desktop.1MIT- FlicenseCqualityDmaintenanceEnables AI assistants to analyze and query SQL Server databases, including schema discovery, health checks, and data retrieval.10-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to inspect schemas, analyze performance, check security, and troubleshoot SQL Server 2019+ databases through a safe, controlled interface.-
- AlicenseAqualityBmaintenanceEnables LLM agents to run read-only SQL Server performance diagnostics through Query Store and DMVs, covering regressions, execution plans, parameter sniffing, missing-index impact, and wait statistics across databases.623 PyPI1MIT