diagnostic-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
diagnostic-mcp
MCP server providing comprehensive diagnostic tools for monitoring and validating MCP infrastructure health and configuration.
Overview
diagnostic-mcp provides comprehensive diagnostic capabilities for monitoring and validating the health and configuration of all MCP servers in your system. It offers health probes, port consistency checks, configuration validation, and comprehensive diagnostic reports.
Related MCP server: troubleshooting-mcp-server
Features
Core Features
Session Token Authentication - Optional Bearer token authentication for production deployments
Health Probes - Kubernetes-style liveness, readiness, and startup probes
HTTP/SSE Transport - Full HTTP wrapper around MCP protocol
Diagnostic Tools - 5 comprehensive diagnostic tools for MCP infrastructure
5 Diagnostic Tools
check_port_consistency - Port assignment validation
Detects port conflicts (multiple servers on same port)
Finds gaps in port sequence (5555-5582)
Identifies servers without port assignments
Flags ports outside expected range
check_all_health - SSE endpoint health monitoring
Tests all MCP server SSE endpoints in parallel
Measures response times
Categorizes servers: online, offline, error
Configurable timeout (default: 5s)
check_configurations - settings.json validation
Verifies use of supergateway
Checks args format consistency
Validates description fields
Reports configuration issues per server
check_tool_availability - Tool inventory (limited)
Counts registered MCP servers
Notes: Full tool querying requires MCP protocol client
run_full_diagnostic - Comprehensive report
Runs all 4 checks above
Aggregates results
Provides summary with total/critical issue counts
Generates actionable recommendations
Installation
From PyPI (Recommended)
pip install diagnostic-mcpFrom Source (Development)
git clone https://github.com/latvian-lab/diagnostic-mcp.git
cd diagnostic-mcp
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtUsage
Stdio Mode (Claude Code)
python -m diagnostic_mcp.serverSSE Mode (ContextForge Gateway)
python sse_server.py
# Default port: 5583
# Custom port: python sse_server.py --port 6583Health Check
curl http://localhost:5583/healthTool Examples
Check Port Consistency
# No parameters required
mcp__diagnostic-mcp__check_port_consistency()
# Returns:
# {
# "port_map": {"server-name": 5555, ...},
# "conflicts": [{"port": 5555, "servers": ["server1", "server2"]}],
# "gaps": [5560, 5561],
# "servers_without_ports": [],
# "summary": {
# "total_servers": 26,
# "issues_found": 2
# }
# }Check All Health
# Default 5s timeout
mcp__diagnostic-mcp__check_all_health()
# Custom timeout
mcp__diagnostic-mcp__check_all_health(timeout=10)
# Returns:
# {
# "servers_online": 24,
# "servers_offline": 2,
# "servers_error": 0,
# "online_servers": [
# {"name": "knowledge-mcp", "port": 5555, "status": "online", "response_time_ms": 45.2}
# ],
# "offline_servers": [...]
# }Check Configurations
# No parameters required
mcp__diagnostic-mcp__check_configurations()
# Returns:
# {
# "total_servers": 26,
# "consistent_format": 24,
# "servers_with_issues": 2,
# "issues": [
# {
# "server": "old-mcp",
# "issues": ["not using supergateway", "missing description"]
# }
# ]
# }Run Full Diagnostic
# Comprehensive check
mcp__diagnostic-mcp__run_full_diagnostic()
# Returns:
# {
# "timestamp": "2025-12-20T12:00:00Z",
# "summary": {
# "total_issues": 5,
# "critical_issues": 2,
# "status": "critical"
# },
# "port_check": {...},
# "health_check": {...},
# "config_check": {...},
# "tool_check": {...},
# "recommendations": [
# "CRITICAL: Resolve port conflicts immediately",
# "CRITICAL: Restart offline MCP servers"
# ]
# }Configuration
Environment Variables
Core Configuration
SENTRY_DSN- Optional Sentry error trackingSENTRY_ENVIRONMENT- Environment name (default: development)MCP_SSE_PORT- SSE server port (default: 5583)MCP_SSE_HOST- SSE server host (default: 0.0.0.0)
Authentication (Optional)
AUTH_ENABLED- Enable session token authentication (default: false)AUTH_ADMIN_TOKEN- Admin token for bootstrapping (required if AUTH_ENABLED=true)AUTH_TOKEN_TTL- Token TTL in hours (default: 24)AUTH_STORAGE- Storage backend:memoryorsupabase(default: memory)SUPABASE_URL- Supabase project URL (required if AUTH_STORAGE=supabase)SUPABASE_KEY- Supabase service role key (required if AUTH_STORAGE=supabase)
See AUTHENTICATION.md for complete authentication setup guide.
Settings Path
diagnostic-mcp reads from: ~/.claude/settings.json
Expected structure:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "supergateway", "--sse", "http://localhost:5555/sse"],
"description": "Server description"
}
}
}Port Range
Expected port range: 5555-5582 (28 ports)
Response Format
All tools return ResponseEnvelope format:
{
"ok": true,
"error": null,
"message": "Check completed successfully",
"data": { ... }
}Logging
Logs written to: ./logs/diagnostic-mcp.log (or custom path via environment variable)
Integration
Claude Code (settings.json)
{
"mcpServers": {
"diagnostic-mcp": {
"command": "npx",
"args": ["-y", "supergateway", "--sse", "http://localhost:5583/sse"],
"description": "MCP infrastructure diagnostics and health monitoring"
}
}
}Use Cases
Pre-deployment validation - Check configuration before deploying new MCP servers
Health monitoring - Regular checks of all MCP server availability
Troubleshooting - Diagnose port conflicts, offline servers, configuration issues
Onboarding - Validate new server integrations
Incident response - Quick overview of system health during outages
Limitations
check_tool_availability currently only counts servers
Full tool querying requires implementing MCP protocol client
Future enhancement to query each server's tool list
Health checks test HTTP accessibility only
Does not validate MCP protocol handshake
Does not test tool execution
Development
Running Tests
pytest tests/Code Style
black src/Contributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Version
Current version: 1.0.0
See CHANGELOG.md for version history.
Repository
License
MIT License - see LICENSE for details.
Copyright (c) 2025 Latvian Lab
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Network, domain and website diagnostics for AI clients via MCP.
Scans remote MCP servers for protocol, security, and TLS issues; exposes scan tools via MCP.
Diagnoses whether an MCP server is reachable, by live HTTP probe.
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
Related MCP Servers
- AlicenseBqualityBmaintenanceProvides comprehensive monitoring and observability for MCP server ecosystems with real-time health checks, performance metrics, distributed tracing, anomaly detection, and automated performance reports using OpenTelemetry and Prometheus.221MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that provides system troubleshooting and diagnostic tools, enabling LLMs to diagnose system issues, monitor resources, check logs, and test connectivity.1MIT
- AlicenseAqualityFmaintenanceMCP server for monitoring health of MCP servers, GitHub Actions, GitLab pipelines, and HTTP endpoints with health history, TLS expiry, assertions, diagnostics, and alerts.2297 npm2MIT
- AlicenseNot gradedqualityCmaintenanceEnables infrastructure health overviews, detailed host metrics, active alert retrieval, and optimization recommendations through MCP tools.MIT