Enables querying and searching Graylog logs using universal search with relative or absolute time windows, including count-only variants for lightweight analytics of log data and error patterns.
Graylog MCP Server
Introduction
The Graylog MCP Server lets AI IDEs and agents securely query your Graylog instance via the Model Context Protocol. It exposes standardized tools so assistants can search recent or absolute time windows and optionally count results without pulling full payloads.
What you get:
search tools for Graylog universal search
relative window: last N seconds
absolute window: explicit ISO timestamps
count-only variants for lightweight analytics
drop-in configuration for popular IDEs and MCP tools
Requirements:
a reachable Graylog URL
credentials with permissions to use Universal Search
Links:
Model Context Protocol: https://modelcontextprotocol.io
Graylog: https://www.graylog.org/
Installation and Usage
Quick start (runs the MCP server over stdio):
Required environment variables:
GRAYLOG_BASE_URL: your Graylog base URL (e.g., https://graylog.example/)
GRAYLOG_USERNAME: Graylog username
GRAYLOG_PASSWORD: Graylog password
Configure in your IDE or Agentic Tool of choice (Cursor, VS Code, Claude Code):
Sample Usage Prompts
Some sample prompts to make the most of the MCP server:
Analyzing error patterns
Security notes:
Prefer scoped, least-privilege Graylog credentials.
Do not commit secrets to source control; use environment managers where possible.
Contribution and Local Development
Prerequisites:
Bun: https://bun.sh/
Node-compatible environment
Install and build:
Run locally (TypeScript directly via Bun stdio):
Test against a live Graylog (verifies universal search endpoints):
Project scripts:
build:
bun run build→ emitsdist/index.jstest:
bun run test:graylog→ health checks for relative/absolute universal searchshow-package-name: prints the package name
Debug with MCP Inspector against local source:
Code style and contributions:
Keep code readable and well-typed; avoid unnecessary complexity.
Match existing formatting; keep lines reasonably wrapped.
Open issues/PRs with clear reproduction steps or proposed changes.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables AI assistants to query and analyze logs from Graylog instances using universal search with relative or absolute time windows, supporting both full result retrieval and lightweight count-only queries.