jperelli-graylogSAFE
An MCP server to integrate ai agents with for Graylog to help debug any issue. It uses best practices to give the agent an advanced custom use of graylog, not just a clone of the http api access.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://github.com/jperelli/graylog-mcp/actions/workflows/ci.yml) [](https://www.npmjs.com/package/@jperelli/graylog-mcp) [](https://www.npmjs.com/package/@jperelli/graylog-mcp) [](https://nodejs.org) [](LICENSE)
A minimal MCP (Model Context Protocol) server in JavaScript that integrates with Graylog.
Features
- JavaScript MCP server
- Tools:
search(read matching log lines across multiple streams),analyze(aggregate matches by a field, with an optional time histogram),list_fields(which fields exist),list_streams(discover readable streams), andget_message(fetch one full document) - Empty results explain themselves. A zero-match search reports whether the query is wrong, the window is quiet, or Graylog simply hasn't indexed the logs yet — three causes that otherwise look identical and send an agent in circles
- Discovery over guessing.
list_fieldsandanalyze'svalueContainslet an agent look up real field names and values instead of inventing them, since a wrong guess returns 0 hits and reads as "no logs exist" - Token-efficient by design,
searchreturns a concise projection of high-signal fields by default; opt into full documents withverbose - A server-level "instructions" manual teaches the client the query syntax, stream-scoping rules, and severity quirks up front
- Multi-instance support, query multiple Graylog servers from a single MCP server
Requirements
- Node.js 18+
Configuration
Configure one or more Graylog instances using numbered env vars:
b92059e71366OBSERVED · 2026-10-13Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add graylog-mcp --env GRAYLOG_API_TOKEN_INSTANCE_1=${GRAYLOG_API_TOKEN_INSTANCE_1} -- npx -y @jperelli/[email protected]Exposed tools (5)
5 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
analyze | read | Aggregate matching messages by the top values of a field instead of returning raw |
get_message | read | Fetch the full, untruncated document for a single message by its _id and _index |
list_fields | read | List the message fields that actually exist in the index. Use this BEFORE searching |
list_streams | read | List the Graylog streams the API token can read (id + title, and whether each removes |
search | read | Read individual matching log lines across one or more streams, merged newest-first. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (2 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
resolve({ server, baseUrl: `http://127.0.0.1:${port}` });@modelcontextprotocol/sdk, @biomejs/biome
- **API tokens are read only from environment variables**
Gates applied: no_behavioural_pass.
b92059e71366full audit observations/trust-audit/mcp-server/jperelli__graylog-mcp.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-13 | b92059e71366 | SAFE | B | 89 | first audit |
Questions
What is the jperelli-graylog MCP server?
An MCP server to integrate ai agents with for Graylog to help debug any issue. It uses best practices to give the agent an advanced custom use of graylog, not just a clone of the http api access.
What tools does jperelli-graylog expose?
5 in total: 5 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is jperelli-graylog safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does jperelli-graylog need?
It reads API_TOKEN and GRAYLOG_API_TOKEN_INSTANCE_1 from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does jperelli-graylog run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @jperelli/graylog-mcp at 1.3.0.
How current is this page?
The grade is for one exact copy of the source (b92059e71366), read on 2026-10-13. The repository is watched and re-audited when it changes.