Logging Advisor MCP
Analyzes logging quality in C++ code, detecting issues like print/cerr overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in JavaScript code, detecting issues like console.log overuse, sensitive data exposure, and provides improvement suggestions.
Analyzes logging quality in Kotlin code, detecting issues like println overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in PHP code, detecting issues like echo/print overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in Python code, detecting issues like print overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in Ruby code, detecting issues like puts overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in Rust code, detecting issues like println! overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in Swift code, detecting issues like print overuse, error swallowing, and provides improvement suggestions.
Analyzes logging quality in TypeScript code, detecting issues like console.log overuse, sensitive data exposure, and provides improvement suggestions.
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., "@Logging Advisor MCP Check my logging"
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.
Logging Advisor MCP
"Just say 'check my logging' and let it handle everything automatically"
An intelligent MCP (Model Context Protocol) server that analyzes logging quality in your code and provides improvement suggestions using LLM-powered insights. Features natural language interaction and automated workflows.
Installation
npm install -g logging-advisor-mcpRelated MCP server: Log Analyzer MCP
MCP Client Setup
Claude Desktop
Add to your configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"logging-advisor": {
"command": "npx",
"args": ["logging-advisor-mcp"],
"env": {}
}
}
}Claude Code
claude mcp add logging-advisor -- npx -y logging-advisor-mcpAfter configuration, restart your MCP client. The logging advisor tools will be available.
Natural Language Interface
Simply say:
"Check my logging"
"Is my logging code okay?"
"Too many console.log statements"
"Improve my error logging"
"Production deployment logging check"
The MCP automatically detects what you need and runs the appropriate workflow.
4-Step Automated Workflow
1. š setup_analysis_session - Smart Setup
Natural matching: Recognizes casual requests about logging
Auto-detection: Programming language, environment settings
Smart defaults: Production-ready configuration
Workflow guidance: Clear next steps
2. š analyze_logging - Quality Analysis
Pattern detection: console.log/print overuse, error swallowing
Security scanning: Sensitive data exposure (passwords, tokens, PII)
Performance review: Blocking I/O, debug leaks in production
Multi-language: JavaScript, Python, Java, Go, C++, C#, Ruby
3. š§ suggest_improvements - ROI-Based Roadmap
Quick wins: Critical fixes (1-2 hours)
Line-by-line fixes: Exact code replacements
Implementation guide: Difficulty, time estimates, dependencies
Migration strategy: Gradual improvement avoiding big-bang changes
4. ā
validate_production_readiness - Deployment Safety
Strict GO/NO-GO: Any critical issue blocks deployment
5-gate validation: Security, Performance, Observability, Operations, Compliance
Real impact focus: Actual service disruption prevention
Example Usage
Natural Workflow
You: "Check my logging - is this code production ready?"
[Paste your code]
Claude: [Automatically runs setup_analysis_session]
ā "I'll analyze your JavaScript code for production deployment..."
ā [Runs analyze_logging, suggest_improvements, validate_production_readiness]
ā "ā NO-GO: Critical security issue detected - password exposed in logs"
ā [Provides exact line-by-line fixes]Manual Tool Usage
Please analyze this code with setup_analysis_session:
console.log('User:', username, password);
try {
loginUser();
} catch(e) {
// empty catch
}Features
šÆ Natural Language Interface
Conversational: "Check my logging" ā automatic workflow
Smart matching: Recognizes various ways of requesting logging help
Zero configuration: Works with smart defaults
š Comprehensive Analysis
Security scanning: Sensitive data exposure (passwords, tokens, PII)
Performance review: Blocking I/O, excessive debug logging
Observability check: Correlation IDs, error context preservation
Multi-language: JavaScript, Python, Java, Go, C++, C#, Ruby
š Production-Ready Focus
Environment-aware: Different standards for dev vs production
Strict validation: GO/NO-GO deployment decisions
Real-world impact: Focus on actual operational issues
ROI-based improvements: Quick wins prioritized
Deployment Decision Matrix
Decision | Criteria | Action |
ā GO | No Critical issues, <20% High issues | Safe to deploy |
ā ļø CONDITIONAL GO | No Critical, some High issues | Deploy with monitoring |
ā NO-GO | Any Critical issues present | Fix required before deployment |
Critical Blockers
Sensitive data in logs (passwords, tokens, PII)
Synchronous I/O logging (performance risk)
Empty error handling (lost error context)
Production debug logging enabled
Language Support
Primary: JavaScript/TypeScript, Python, Java, Go
Extended: C++, C#, Ruby, PHP, Rust, Kotlin, Swift
Development
Local Development Setup
git clone https://github.com/g-hyeong/logging-advisor-mcp.git
cd logging-advisor-mcp
npm install
npm run buildTesting with MCP Inspector
npx @modelcontextprotocol/inspector dist/index.js
# Open http://localhost:5173 in your browser
# Test all 4 tools: setup_analysis_session, analyze_logging, suggest_improvements, validate_production_readinessDevelopment Setup for Various Clients
Claude Desktop (Development):
{
"mcpServers": {
"logging-advisor": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]
}
}
}Cursor IDE (Development):
{
"mcp": {
"servers": {
"logging-advisor": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]
}
}
}
}Claude Code (Development):
{
"claude.mcpServers": {
"logging-advisor": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]
}
}
}Examples
Poor Logging Code
console.log('Login:', username, password); // Exposes sensitive data
try {
doSomething();
} catch (e) {
// Empty catch - ignores errors
}Expected Analysis:
Score: 20-30
Issues: Critical security vulnerability, ignored errors
Recommendations: Use structured logger, remove sensitive data
Good Logging Code
logger.info('Login attempt', {
username,
timestamp: Date.now()
});
try {
doSomething();
} catch (error) {
logger.error('Operation failed', {
error: error.message,
stack: error.stack
});
}Expected Analysis:
Score: 85-95
Issues: None or minor
Patterns: Structured logging, consistent approach
Architecture
LLM-First + User-Friendly Design
Natural language interface: Conversational interaction patterns
Automated workflows: 4-step process with smart defaults
Minimal implementation: Maximum delegation to LLM capabilities
Context preservation: Session-aware tool chaining
Scripts
npm run dev # Development mode with auto-restart
npm run build # TypeScript build
npm run typecheck # Type checking only
npm start # Production executionLicense
Apache-2.0
Contributing
Issues and pull requests are welcome on GitHub.
Available Tools
4 toolsanalyze_loggingA
Logging code quality analysis and issue diagnosis
When used: Automatically executed after setup_analysis_session or when direct logging analysis is needed
Analysis items:
Detect console.log/print overuse patterns
Sensitive information exposure risks (password, token, email, etc.)
Missing error handling and context loss
Performance blocking logging (synchronous I/O)
Lack of observability (correlation ID, tracing)
DEBUG logging inappropriate for production
Output: Provides professional logging analysis guidelines to LLMs for accurate quality assessment
Supported languages: JavaScript, TypeScript, Python, Java, Go, C++, C#, Ruby Environment: differentiated analysis for development, production
Inputs: language (required), focus, environment.
setup_analysis_sessionB
Start code logging quality inspection and improvement
Use for requests like: "Check if logs are okay", "Improve logging", "Any issues with log code?", "Check logging before production deployment", "Too many console.log statements", "Is error logging working properly?", "Optimize logs"
Automatically handles:
Auto-detect logging patterns in code
Provide language-specific optimization suggestions (JavaScript, Python, Java, Go, etc.)
Validate production environment safety
Observability improvement guidance
3-step automated workflow: 1 Logging quality analysis ā 2 Improvement roadmap generation ā 3 Deployment safety validation
Settings (optional): environment, serviceCriticality, targetScore, maxChanges, focus Defaults: production environment, high criticality, 80-point target, 5 changes max, comprehensive analysis
Inputs: focus, language, environment, serviceCriticality.
suggest_improvementsA
Generate logging improvement roadmap and specific modification suggestions
When used: Automatically executed after analyze_logging completion or when direct improvement suggestions are needed
What it provides:
Immediately applicable Quick Wins (1-2 hours)
Phased migration plan (prevents Big Bang approach)
Line-by-line precise modification code
ROI-based prioritization (cost vs. benefit)
Implementation difficulty and estimated time required
Required library/configuration guidance
Improvement patterns:
console.log ā structured logger (winston, pino)
Error ignoring ā complete context preservation
Synchronous logging ā asynchronous performance optimization
Sensitive data exposure ā complete removal/masking
Untraceable ā correlation ID addition
Operational safety: Preserve existing logic, incremental application, rollback plan
Inputs: language (required), focus, complexity, currentIssues.
validate_production_readinessA
Final logging safety validation before production deployment
When used: Automatically executed after suggest_improvements completion or when final pre-deployment inspection is needed
Strict GO/NO-GO determination:
Immediate NO-GO if even one Critical issue exists
Comprehensive evaluation of security, performance, operational stability
Focus on actual service failure possibilities
5-stage safety validation: 1 Security Gate: Complete sensitive data blocking (password, token, PII) 2 Performance Gate: Prevent service performance blocking 3 Observability Gate: Ensure incident response capability 4 Operational Gate: Monitoring system integration 5 Compliance Gate: Regulatory compliance (GDPR, audit)
Deployment decision:
GO: Safe to deploy
CONDITIONAL GO: Deploy with caution due to limited risks
NO-GO: Deployment prohibited, fixes required
Critical Blockers: console.log, sensitive data exposure, synchronous I/O logging, error ignoring
Inputs: language (required), environment, knownIssues, serviceCriticality.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 4 tools
Each tool targets a distinct phase of the logging improvement workflow, and descriptions clarify boundaries. However, analyze_logging and suggest_improvements have some overlap in addressing logging issues, though the intended separation is clear.
All tool names follow a consistent snake_case verb_noun pattern: setup_analysis_session, analyze_logging, suggest_improvements, validate_production_readiness. This predictable pattern aids discoverability.
Four tools are perfectly scoped for a guided logging advisor workflow. Each tool covers one stage of the process (setup, analyze, suggest, validate), and no extraneous tools are included.
The tool set covers the entire logging improvement lifecycle from analysis to production validation. However, it lacks a tool for direct code modification or applying fixes, but this may be intentional to keep the advisor focused on guidance rather than execution.
Maintenance
Related MCP Connectors
Zero-log MCP server with 49 tools for AI guardrails, secret scanning, MCP linting & EU compliance.
491Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Audit your MCP servers for poisoned tools and leaked secrets, and check AI-generated code for flaws.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Python-based MCP server that enables AI-assisted log file analysis with features for filtering, parsing, and interpreting log outputs, plus executing and analyzing test runs with varying verbosity levels.1212-
- AlicenseAqualityCmaintenanceAn MCP server for AI-powered log analysis that enables parsing, searching, and debugging across nine log formats directly within Claude. It features automated error extraction, sensitive data scanning, and streaming support for large log files.1434 PyPI5MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for intelligent log analysis providing semantic search, error pattern clustering, and smart error detection. It enables users to process, vectorize, and query local logs to efficiently identify issues and generate AI-powered summaries.MIT
- AlicenseAqualityDmaintenanceMCP server for log file analysis. Gives LLMs the ability to efficiently analyze large log files without loading them into context.7101MIT