Skip to main content
Glama
dmcteknoloji

mssql-health-mcp

by dmcteknoloji

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

This is the whole point — safe enough to hand to a customer:

  • 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.

  • Local & private. Runs on your machine; your connection string and data never reach a third-party server.

  • Timeouts + ReadOnly intent so even a heavy diagnostic won't hurt production.

Related MCP server: SQL Server MCP

🚀 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

tam_teshis

Health report — prioritized critical/warning findings in one call

sunucu_sagligi

Server health: version, edition, CPU, memory, uptime, database count

aktif_sorgular_blocking

Running queries + blocking chain — "why is it slow right now?"

bekleme_istatistikleri

Top wait stats (non-benign) with % — "what is the server waiting on?"

eksik_indexler

Missing-index suggestions by impact (suggests only, never creates)

log_kullanimi

Transaction log size & used % per database

disk_dosya

Data/log file sizes + disk free space per volume

yedek_durumu

Last full/diff/log backup per database — "is my backup current?"

tempdb_kullanimi

tempdb space by type (user/internal objects, version store, free)

deadlock

Recent deadlock timestamps from system_health

pahali_sorgular

Top queries by CPU/reads/duration + query text

index_sagligi

Unused indexes (write cost, never read)

eksik_index_create

Missing indexes as ready CREATE INDEX statements

konfig_denetimi

Server config best-practice audit (MAXDOP, memory…)

bellek_baskisi

Memory pressure: PLE, pending grants, free RAM

vlf_log_sagligi

VLF count + why the log can't truncate

acik_transactionlar

Long/open transactions (log bloat)

surekli_izleme

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

Müşteriye güvenle teslim edilecek kadar güvenli:

  • 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 & gizli. Sizin makinenizde çalışır; bağlantı dizeniz ve verileriniz üçüncü bir sunucuya gitmez.

  • Zaman aşımı + ReadOnly intent — ağır bir teşhis bile production'ı yormaz.

🚀 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

tam_teshis

Sağlık karnesi — tek çağrıda önceliklendirilmiş kritik/uyarı bulgular

sunucu_sagligi

Sunucu sağlığı: sürüm, edition, CPU, bellek, uptime, veritabanı sayısı

aktif_sorgular_blocking

Çalışan sorgular + blocking zinciri — "şu an neden yavaş?"

bekleme_istatistikleri

En çok bekleme (benign hariç), yüzdesiyle — "sunucu neyi bekliyor?"

eksik_indexler

Etkiye göre eksik index önerileri (yalnızca önerir, oluşturmaz)

log_kullanimi

Veritabanı başına transaction log boyutu ve kullanım %

disk_dosya

Veri/log dosya boyutları + disk boş alanı

yedek_durumu

DB başına son full/diff/log yedeği — "yedeğim güncel mi?"

tempdb_kullanimi

tempdb alan kullanımı (kullanıcı/dahili nesneler, version store, boş)

deadlock

system_health'ten son deadlock zamanları

pahali_sorgular

En çok CPU/okuma/süre yiyen sorgular + metin

index_sagligi

Kullanılmayan index'ler (yazma maliyeti, okunmuyor)

eksik_index_create

Eksik index'ler hazır CREATE INDEX cümlesiyle

konfig_denetimi

Sunucu konfig best-practice denetimi (MAXDOP, bellek…)

bellek_baskisi

Bellek baskısı: PLE, bekleyen talep, boş RAM

vlf_log_sagligi

VLF sayısı + log neden truncate olmuyor

acik_transactionlar

Uzun/açık transaction'lar (log şişiren)

surekli_izleme

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 tools
aktif_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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description declares the tool as read-only ('Salt-okunur') and describes expected output. This is sufficient transparency for a read-only diagnostic query, though it could mention if the operation is lightweight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: first enumerates output fields, second gives use case and safety. No fluff, front-loaded with key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only diagnostic tool with no output schema, the description fully covers purpose, output details, usage context, and safety (read-only). No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist (schema coverage 100%), so the baseline is 3. The description adds value by describing the output fields and usage context, going well beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool displays current running queries and blocking chains with specific fields (session, blocker, wait type/duration, CPU, elapsed time, query text). The purpose is specific and distinct from sibling tools (eksik_indexler, sunucu_sagligi) which cover missing indexes and server health.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states it's the first check for server slowness ('Sunucum neden yavas?' icin ilk bakilacak), providing clear context. Does not explicitly exclude scenarios or mention alternatives, but context is strong enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It explicitly states the tool is read-only ('Salt-okunur, index OLUSTURMAZ, yalniz onerir'), which is crucial behavioral info. However, it does not disclose potential side effects, authorization needs, or rate limits, but for a read-only query tool, this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise: a single sentence stating the tool's purpose, sorting, and fields, followed by a key behavioral note about read-only. Every sentence adds value with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description compensates by listing the returned fields (veritabani, tablo, kullanim, etki skoru, esitlik/esitsizlik/dahil kolonlar) and stating the sort order. It lacks details like data types or pagination, but for a simple list tool, it is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and the schema is empty with 100% coverage. Per guidelines, zero params sets a baseline of 4. The description does not need to add parameter meaning, and it correctly omits any param info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as listing missing indexes recommended by SQL Server, sorted by impact score, and explicitly states it is read-only and does not create indexes. It distinguishes from sibling tools like 'aktif_sorgular_blocking' and 'sunucu_sagligi' by focusing on index recommendations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal usage context ('Performans icin' - for performance) but lacks explicit guidance on when to use this tool versus alternatives or when not to use it. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description notes the tool is read-only ('Salt-okunur'), which is a key behavioral trait. However, with no annotations provided, it does not disclose other potential behaviors like permission requirements or side effects. The read-only hint is useful but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that efficiently lists the tool's output fields. No extraneous words or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately lists the returned fields (version, edition, CPU, memory, uptime, database counts). However, it does not specify the exact output format or scope (e.g., single instance vs. cluster), but it is sufficient for a simple health summary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so the description inherently provides complete information about inputs. With zero parameters and 100% schema coverage, no additional parameter details are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool provides a general health summary of SQL Server, listing specific metrics (version, edition, CPU, memory, uptime, databases). This distinguishes it from sibling tools that focus on active queries or missing indexes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives like 'aktif_sorgular_blocking' or 'eksik_indexler'. It only describes what it does, without context on appropriate use cases or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedaktif_sorgular_blocking
    • First observedeksik_indexler
    • First observedsunucu_sagligi

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct aspect of SQL Server health: blocking queries, missing indexes, and server overview. No overlap in functionality.

Naming Consistency3/5

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.

Tool Count5/5

Three tools is appropriate for a focused health monitor. Not too few, not excessive.

Completeness4/5

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

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to connect and query Microsoft SQL Server databases using natural language, executing read-only SQL queries for safe data inspection and analysis.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides secure, read-only access to Microsoft SQL Server with multi-layer protection, enabling safe query execution, schema discovery, and SQL script analysis through natural language.
    1
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Provides 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.
    -

Latest Blog Posts

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/dmcteknoloji/mssql-health-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server