netdiag-mcp
Click on "Install 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., "@netdiag-mcpWhich sites have redundancy gaps?"
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.
netdiag-mcp
A working Model Context Protocol server that exposes read-only network diagnostics as tools an AI client can call directly. This isn't a demo of the concept, it's a real server built against the official MCP Python SDK, with tests that actually run and a CI workflow that actually checks them.
All topology data is fabricated. No real hostnames, IPs, or credentials appear anywhere in this repo.
Why this exists
I run infrastructure for a real multi-site network, and the tools I use day to day (monitoring, ticketing, identity, and increasingly, MCP-connected AI clients) are only as useful as the boundary around what they're allowed to touch. This repo is that boundary made explicit and testable: five tools, all read-only, each one narrow enough to reason about on its own.
It's also a companion to two other repos:
agentic-infra-ops-toolkit — the architecture and decision record behind building this pattern in the first place.
network-iac-lab — the same four-layer redundancy model (circuit, power, core, access) that
root_causereasons over here, expressed as infrastructure-as-code instead of a diagnostics API.
Related MCP server: Cisco vManage MCP Server
Tools
Tool | What it does |
| Lists every site known to the server |
| Layered health status for one site (circuit, power, core, access) |
| Every site with at least one unhealthy layer |
| Walks layers in dependency order and reports the most likely root-cause layer, not just every symptom independently |
| Every (site, layer) pair currently lacking redundancy, even if that layer is healthy right now |
root_cause is the one worth reading the code for: it doesn't just report what's broken, it reasons about which broken layer probably explains the others, based on the same circuit-power-core-access dependency order laid out in network-iac-lab's redundancy model.
Running it
pip install -e ".[dev]"
pytest tests/ -vTo run the server itself against an MCP client (stdio transport):
python3 -m netdiag_mcp.serverPoint an MCP-compatible client (Claude Desktop, or any client using the official SDK) at this module and the five tools above become callable directly.
Design choices
Diagnostics logic is separate from protocol wiring. Everything in
diagnostics.pyis plain Python with no MCP import, tested with plain pytest.server.pyis a thin layer that exposes those functions as tools. If the MCP SDK's API changes, the actual logic doesn't need to.Every tool is read-only. None of them can change state on a real system, only report on the sample data in
sample_data/topology.json. A write-capable version of this would be a deliberate, separate addition, not something that falls out of a more "helpful" read tool by accident.Errors are data, not exceptions that reach the client uncaught. An unknown site returns a structured error dict instead of letting an unhandled exception surface, so a calling AI client gets something it can reason about instead of a stack trace.
Tests
8 tests covering the diagnostics logic: health status aggregation, root-cause tracing across multiple failure scenarios, redundancy gap detection, and the unknown-site error path. Run in CI on every push via .github/workflows/test.yml.
Available Tools
5 toolsdegraded_sitesA
List every site with at least one layer not reporting fully healthy.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of disclosing behavioral traits. It does not mention side effects, read-only nature, authentication requirements, or potential errors. The phrase 'not reporting fully healthy' is also somewhat ambiguous regarding what 'reporting' means.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no unnecessary words. It front-loads the action and includes the key filtering condition without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a simple list operation with no parameters and an output schema indicated. It could mention output fields or ordering, but the existence of an output schema reduces the need for the description to explain return values.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. No parameter descriptions are needed since there are no parameters to explain.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states a specific verb ('List') and resource ('sites') with a clear filtering condition ('at least one layer not reporting fully healthy'). It distinguishes itself from sibling tools like list_sites, which presumably lists all sites, by focusing on degraded ones.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing sites with unhealthy layers, but it does not explicitly state when to use this over alternatives like site_health or root_cause. Guidance is present only by inference from the wording.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sitesA
List every site known to this diagnostics server.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The verb 'list' clearly indicates a read-only operation, and there is no mention of side effects. While not explicitly stating 'read-only', the semantics are unambiguous enough for a safe interaction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no redundant words. It delivers the essential information efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of parameters and the simple listing action, the description is sufficient for an agent to invoke the tool correctly. No additional context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so schema coverage is 100%. The description adds no parameter-specific information because there is nothing to describe. This meets the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and the resource (sites) with specificity (every, known to this diagnostics server). It distinguishes itself from sibling tools like site_health or degraded_sites by being the comprehensive listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (as the general listing of all sites) but does not explicitly name alternatives or conditions for choosing this tool over the siblings. An agent can infer usage from the wording, but it is not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
redundancy_gapsA
List every (site, layer) pair currently lacking redundancy.
Flags layers that aren't redundant even if their current status is healthy, since a non-redundant healthy layer is one failure away from an outage.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of explaining behavior. It makes clear that the tool lists/flags redundancy gaps without indicating side effects or mutations, and it explains the rationale behind including healthy layers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, with the primary purpose front-loaded and the second sentence adding a valuable clarifying nuance. No unnecessary words or details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity, no parameters, and existing output schema, the description is complete enough for an agent to understand what the tool does and why it matters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so the baseline is 4. There is no parameter information needed beyond the empty schema, and the description focuses entirely on the tool's purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and the specific resource ('every (site, layer) pair currently lacking redundancy'), which distinguishes it from sibling tools like list_sites and site_health.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool, especially the nuance that it flags non-redundant layers even when status is healthy. It does not explicitly mention alternatives or when not to use it, but the use case is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
root_causeA
Trace the most likely root-cause layer for a site's issues.
Walks circuit, power, core, and access in dependency order and reports the first layer that isn't healthy, since an upstream issue typically explains downstream symptoms rather than being a separate problem. site must exactly match a name returned by list_sites.
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the walk order, the logic (first unhealthy layer), and the reporting behavior. It does not mention side effects (likely read-only) or error cases, but for a trace tool this is a reasonable level of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each serving a purpose: purpose, algorithm/reasoning, and input constraint. Front-loaded with the primary action, no unnecessary fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, algorithm, and input constraint, but does not specify the exact return format (e.g., whether it returns the layer name, a report object) or the behavior when all layers are healthy. Given there is no output schema, this is a minor gap for an agent invoking the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does so by adding a crucial constraint: 'site must exactly match a name returned by list_sites.' This gives meaning to the single parameter beyond the bare schema, making the input unambiguous.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific action: 'Trace the most likely root-cause layer for a site's issues.' Describes the algorithm (walks circuit, power, core, access in dependency order) and the output (first unhealthy layer). This clearly differentiates it from siblings like site_health or degraded_sites, which focus on status or listing rather than root-cause analysis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides context for when it is appropriate ('an upstream issue typically explains downstream symptoms') and a prerequisite ('site must exactly match a name returned by list_sites'). However, it does not explicitly mention alternative tools or when NOT to use this one, leaving some ambiguity for the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
site_healthA
Get the layered health status (circuit, power, core, access) for a site.
site must exactly match a name returned by list_sites.
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses that the operation is a read ('Get'), enumerates the status layers, and adds the exact-match input constraint. However, it doesn't describe error behavior for mismatched site names, the output/return format, or any side effects — though for a low-risk read operation the risk profile is modest. Adds useful context but has gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with zero waste. The primary purpose is front-loaded in the first sentence, and the operational constraint follows in the second. Every word earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read tool with no output schema and no annotations, the description covers the essentials: what the tool does and what the parameter requires. It could add the return format of the health status values, but the core calling information is complete and an agent can invoke this tool correctly with what's provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does: the second sentence clarifies that the 'site' parameter is a name that must exactly match one from list_sites. This adds meaningful semantic information beyond the bare schema, which only types it as a required string. The description fully compensates for the coverage gap for the sole parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('layered health status') and enumerates exactly which layers are covered (circuit, power, core, access). This distinguishes it from siblings like list_sites (which lists sites) and degraded_sites (which finds problem sites), though it doesn't name them explicitly. Clear purpose with minor room for explicit sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The second sentence gives a concrete, actionable constraint: 'site must exactly match a name returned by list_sites.' This tells the agent to call list_sites first and use an exact name value. It implies usage context well but stops short of stating when not to use this tool or naming alternatives as the preferred choice for other scenarios.
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.
5 tool updates
v0.1.0- First observed
degraded_sites - First observed
list_sites - First observed
redundancy_gaps - First observed
root_cause - First observed
site_health
TDQS
Each tool has a clear, distinct purpose: listing sites, checking health, identifying degraded sites, tracing root causes, and finding redundancy gaps. No overlap or ambiguity.
All tool names use lowercase snake_case consistently, following a predictable and readable pattern. The mix of verb-led and noun-led names is coherent within the domain.
Five tools is well within the typical range and perfectly suited for a network diagnostics server, covering the essential operations without unnecessary bloat.
The tool set provides comprehensive coverage for network diagnostics: listing sites, checking health, surfacing degraded sites, identifying root causes, and flagging redundancy risks. No critical gaps are apparent.
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 Connectors
Diagnose AI workflows for failure, security, and handoff risks — RED/AMBER/GREEN per node.
Read-only sample stays, booking constraints, and staged reservation actions for review.
Inspect an approved ad account and first-party signal health, then propose policy-gated actions.
Check whether AI agents can discover, validate, and trust your domain's services.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides safe, read-only network diagnostics (ping, DNS, HTTP health, TLS expiry, port checks, traceroute, and fleet sweeps) for monitoring infrastructure.7MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to query SD-WAN fabric health, devices, tunnels, BFD sessions, OMP peers, alarms, policies, and configuration state via natural language, with deterministic correlation and diagnostics for incident assessment.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to perform safe, read-only IT diagnostics and retrieve local runbooks, asset records, and knowledge articles through MCP, with allowlisted network checks and audit logging.MIT
- FlicenseNot gradedqualityBmaintenanceEnables network troubleshooting through an MCP Streamable HTTP endpoint, exposing diagnostic tools for Cisco Packet Tracer labs with human-in-the-loop review and NIST/CIS security validation.-
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/miservicespro/netdiag-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server