server-monitoring
서버 모니터링 MCP 서버입니다. (포워더와 별개)
claude mcp add --transport stdio takch02-server-monitoring-mcp-server uvx takch02-server-monitoring-mcp-server \ --env REDIS_URL="redis://localhost:6379" \ --env LOGGER_LEVEL="INFO" \ --env MCP_ENDPOINT="http://localhost:8000" \ --env DATA_FORWARDER_NETWORK="mcp-network"
How to use
This MCP server, Server Doctor: Spring Boot Server Diagnosis, provides an AI-assisted diagnosis and monitoring workflow for your Spring Boot applications. It ingests real-time health data and logs from a running Spring Boot target via a secure, sidecar-based forwarder, then standardizes the information using MCP so an LLM can reason about the server’s health and potential incidents. The system emphasizes zero-config deployment: you can wire it up using docker-compose, application.yml, and a .env file, without needing external monitoring services.
To use it, deploy the MCP server alongside your Spring Boot application. The Forwarder (a Python agent) reads local logs and Actuator metrics from the target’s internal network and forwards them to the MCP server in a standardized MCP format. The MCP server then exposes the processed context to an LLM, which analyzes health status and logs to provide concise diagnostics, possible root causes, and remediation steps. The tools available focus on health checks, error log interpretation, and context-aware guidance for debugging Spring Boot servers, all while masking sensitive information before transmission.
Typical workflows include starting your services with the provided docker-compose setup, ensuring .env and application.yml configurations enable the forwarder to access logs and actuator data, and then querying the MCP server for diagnosis reports or targeted questions about health and error scenarios. The system is designed to operate within an isolated Docker network so there’s no need to expose sensitive metrics externally.
How to install
Prerequisites:
- Docker and Docker Compose installed
- Basic familiarity with docker-compose and environment variables
- Python 3.11+ if you choose the Forwarder option locally (optional if using the MCP server via uvx)
Installation steps (UVX/Python path):
- Install uvx (Python-based MCP runner):
- pipx install uvx # or python -m pip install uvx
- Install the MCP server package (using the slug as the package name):
- uvx takch02-server-monitoring-mcp-server
- Prepare configuration files:
- Create a docker-compose.yml to run your Spring Boot app with a sidecar Forwarder (as described in the repo’s architecture).
- Create an .env with required variables (e.g., SPRING_ACTUATOR_BASE_URL, REDIS_URL, MCP_ENDPOINT).
- Ensure application.yml enables the needed endpoints and logging for the forwarder to tail logs and read actuator data.
- Start the services:
- docker-compose up -d
- Run the MCP server (if not installed globally via uvx):
- uvx takch02-server-monitoring-mcp-server
- Verify:
- Access the MCP server dashboard or API at the configured MCP_ENDPOINT and verify that health reports and logs from the Spring Boot target are flowing in.
Additional notes
Notes and tips:
- Zero-Config focus: modify docker-compose.yml, application.yml, and .env to enable the forwarder; no external Datadog/Prometheus setup is required.
- Security: sensitive data in logs is masked by a regex-based redaction layer before sending to the MCP server. Ensure the REDACTED markers are visible in transmitted data during testing.
- Network: Forwarder runs on the same Docker network as the target application; ensure internal DNS (e.g., target:9090 for Actuator) is reachable.
- Environment variables: tune MCP_ENDPOINT, REDIS_URL, and logging level to suit your environment and debugging needs.
- Common issues: connectivity between the Forwarder and MCP server, missing actuator endpoints, or Actuator not exposing the expected paths due to security settings. Check that the target’s Actuator is reachable within the Docker network and that logs are being written to a monitored volume.
- Debugging: increase LOGGER_LEVEL to DEBUG during troubleshooting; monitor Forwarder logs for redaction/masking behavior to confirm PII is properly sanitized.