@gais/advantech-gais-mcp
Version:
A MCP server implementation for monitoring system status via Grafana and Prometheus
80 lines (60 loc) • 1.84 kB
Markdown
# Advantech GAIS MCP Server
A Model Context Protocol (MCP) server implementation for monitoring system status and hardware resources through Grafana and Prometheus.
## Features
- Real-time system monitoring:
- CPU usage
- Memory usage
- Disk usage
- GPU monitoring (if available):
- GPU power consumption
- GPU temperature
- GPU VRAM usage
## Installation
```bash
npm install advantech-gais-mcp
```
For one-time usage, you can also use npx:
```bash
npx -y advantech-gais-mcp@latest
```
## MCP Configuration
Add this to your MCP config:
```json
"GAISMCP": {
"command": "npx",
"args": ["-y", "advantech-gais-mcp@latest"],
"env": {
"GRAFANA_URL": "your-grafana-url",
"GRAFANA_API_KEY": "your-grafana-api-key"
}
}
```
## Usage
1. Set up the required environment variables:
```bash
export GRAFANA_URL="http://your-grafana-server:3000"
export GRAFANA_API_KEY="your-grafana-api-key"
```
2. The server exposes the following MCP tool:
- **Tool Name**: `GAISMCP.getSystemStatus`
- **Description**: Retrieves current system status and hardware resource usage
- **Returns**: JSON object containing:
- CPU usage percentage
- Memory usage percentage
- Disk usage percentage
- GPU metrics (if available)
## Prerequisites
- Node.js 16 or higher
- Running Grafana instance
- Prometheus data source configured in Grafana
- Node Exporter for system metrics
- DCGM Exporter (for NVIDIA GPU metrics, if needed)
## Environment Variables
| Variable | Description | Required | Default |
|----------|-------------|----------|---------|
| GRAFANA_URL | Your Grafana server URL | Yes | http://localhost:3000 |
| GRAFANA_API_KEY | Grafana API key with read permissions | Yes | - |
## License
ISC
## Author
Advantech GAIS Team