Graylog Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Graylog Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP server that gives AI assistants direct access to your Graylog logs -- search, aggregate, analyze, and cluster log data through natural language.
This server exposes your Graylog instance(s) as MCP tools, so AI assistants like Claude, Cursor, and others can query logs on your behalf. Instead of context-switching to the Graylog UI, you describe what you're looking for and the assistant handles the rest.
25 tools covering:
No installation needed. Configure your MCP client to run:
{
"mcpServers": {
"graylog": {
"command": "npx",
"args": ["graylog-mcp-server"]
}
}
}git clone https://github.com/jagadeesh52423/graylog-mcp.git
cd graylog-mcp
npm installThen point your MCP client to the local entry point:
{
"mcpServers": {
"graylog": {
"command": "node",
"args": ["/absolute/path/to/graylog-mcp/src/index.js"]
}
}
}Create ~/.graylog-mcp/config.json:
{
"connections": {
"nonprod": {
"baseUrl": "http://graylog-nonprod:9000",
"apiToken": "your_api_token"
},
"prod": {
"baseUrl": "http://graylog-prod:9000",
"apiToken": "your_prod_api_token",
"defaultFields": ["timestamp", "message", "level", "source", "PODNAME"]
}
},
"defaultFields": ["timestamp", "gl2_message_id", "source", "env", "level", "message", "logger_name"]
}| Option | Scope | Description |
|---|---|---|
connections | Root | Named Graylog instances, each with baseUrl and apiToken |
defaultFields | Root | Global default fields returned in search results |
defaultFields | Connection | Per-connection override (takes priority over global) |
If no defaultFields are set, all fields (*) are returned.
Override the config path with the GRAYLOG_CONFIG_PATH environment variable:
{
"mcpServers": {
"graylog": {
"command": "npx",
"args": ["graylog-mcp-server"],
"env": {
"GRAYLOG_CONFIG_PATH": "/path/to/custom/config.json"
}
}
}
}| Client | Config file |
|---|---|
| Claude Code | ~/.claude/mcp.json |
| Cursor | ~/.cursor/mcp.json |
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
Once connected, talk to your AI assistant naturally. Some examples:
Connect to nonprod and show me error logs from the last hourWhat are the top error sources in production over the past 6 hours?Show me a histogram of level 3 errors over the past day, broken down by hourCluster the last 1000 error messages and show me the top patternsShow me the messages surrounding log ID 01KH5PDR893AZJQBYJJ87AQTW5Relative: 30m, 1h, 2d, 1w, 3M, 1y
Absolute: provide from/to as ISO timestamps (2024-01-15T09:00:00Z) or Unix millis.
Default is 15 minutes if unspecified.
| Tool | Description |
|---|---|
list_connections | List configured Graylog connections |
use_connection | Switch to a named connection |
| Tool | Description |
|---|---|
fetch_graylog_messages | Search logs with query, filters, time range, pagination |
get_surrounding_messages | Get messages around a specific log entry by ID or timestamp |
list_streams | List available Graylog streams |
list_field_values | Discover distinct values for a field (top N by count) |
| Tool | Description |
|---|---|
get_log_histogram | Time-bucketed message counts |
get_field_aggregation | Group by field with metrics (count, sum, avg, min, max) |
get_field_time_aggregation | Two-dimensional: field values over time intervals |
debug_histogram_query | Debug helper for empty histogram results |
| Tool | Description |
|---|---|
cluster_log_messages | Group similar messages into structural templates (Drain3) |
list_log_templates | List learned templates for the active connection |
delete_log_template | Remove a template |
rename_log_template | Give a template a human-readable label |
export_log_templates | Export template library as JSON |
import_log_templates | Bulk import templates (merge or replace) |
Templates are persisted at ~/.graylog-mcp/templates/<connection>.json and improve over time as more messages are clustered.
| Tool | Description |
|---|---|
search_events | Search Graylog events with filters |
get_event_definitions | List event definitions |
get_event_notifications | List event notifications |
| Tool | Description |
|---|---|
save_search | Save a query configuration for reuse |
list_saved_searches | List all saved searches |
get_saved_search | Retrieve a saved search by name |
delete_saved_search | Delete a saved search |
src/
├── index.js Server bootstrap and request routing
├── config.js Connection config and field defaults
├── query.js Query building and Graylog API client
├── tools.js Tool schema definitions (25 tools)
├── timerange.js Flexible time range parsing
├── aggregations.js Histogram, field stats, time-series
├── events.js Graylog events API
├── saved-searches.js Persistent saved search store
├── clustering/
│ ├── index.js Strategy registry
│ ├── preprocess.js Message normalization and tokenization
│ ├── formatter.js Cluster response formatting
│ ├── template-store.js Per-connection template persistence
│ └── strategies/
│ └── drain3.js Drain3 log clustering algorithm
└── tools/
├── cluster-errors.js cluster_log_messages handler
└── template-mgmt.js Template CRUD handlerssrc/clustering/strategies/<name>.js implementing hydrate, serialize, and cluster (see drain3.js)src/clustering/index.jsalgorithm: "<name>" to cluster_log_messages~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.