Search Graylog logs directly from your AI agent for production debugging. Query by absolute or relative timestamps, filter by application streams, and check system health.
bash
npm install -g mcp-server-graylog@1.0.3
Add to your OpenClaw or Claude Desktop MCP configuration:
json
{
"mcpServers": {
"graylog": {
"command": "npx",
"args": ["-y", "mcp-server-graylog@1.0.3"],
"env": {
"BASE_URL": "https://your-graylog-instance.example.com",
"API_TOKEN": "your_graylog_api_token"
}
}
}
}
To get your API token: Graylog Web UI > System > Users > Edit your user > Tokens > Create Token.
bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | BASE_URL=https://your-graylog.example.com API_TOKEN=your_token npx mcp-server-graylog@1.0.3
You should see a JSON response with protocolVersion and capabilities.
This skill provides 4 MCP tools for searching and monitoring Graylog:
ToolDescriptionsearch_logs_absoluteSearch logs between specific timestamps (ISO 8601)search_logs_relativeSearch recent logs (last N seconds, default: 15 min)list_streamsDiscover available application streams and their IDsget_system_infoCheck Graylog version, health, and processing status
VariableRequiredDescriptionBASE_URLYesFull URL to your Graylog instance (e.g., https://graylog.example.com)API_TOKENYesGraylog API token for authentication (Basic Auth)
Uses Elasticsearch query syntax:
level:ERROR - Filter by log levelsource:api-server - Filter by source"connection timeout" - Exact phrase matchstatus:>=500 - Numeric rangemessage:*exception* - Wildcard matchlevel:ERROR AND source:payment - Boolean operatorsErrorSolution"Missing environment variables"Set BASE_URL and API_TOKEN in your MCP config"Authentication failed"Verify your API token is valid in Graylog UI"Cannot reach Graylog"Check BASE_URL and network/VPN connectivity"Invalid query"Check Elasticsearch query syntax"Endpoint not found"Verify BASE_URL includes the correct Graylog URL (no trailing /api)