Logo von MCP Graylog 服务器

MCP Graylog 服务器

Community
mothlike

Model Context Protocol server for querying Graylog 6+ from AI assistants

Herausgebermothlike
Repositorymcp-graylog
SprachePython
Forks
9
Sterne
12
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    MCP Graylog 服务器 stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    12 Sterne und 9 Forks im verlinkten Repository.

MCP Graylog

MCP Graylog is a Model Context Protocol server for querying Graylog 6+ from AI assistants. The default transport is Codex stdio. Streamable HTTP is available only when you explicitly opt in for a remote, shared, or containerized runtime. The server uses MCP Python SDK 2.x and supports its current and legacy protocol revisions.

Install Dependencies

Use Python 3.11 or newer. If you are new to Python projects, the safest setup is to keep this server in its own virtual environment.

  1. Install Python 3.11+ and uv.

    On macOS with Homebrew:

    sh
    brew install python@3.11 uv

    If Python is already installed, you can install uv with pip:

    sh
    python3 -m pip install --user uv
  2. Create and activate a virtual environment from the repository root:

    sh
    uv venv venv --python 3.11
    source venv/bin/activate
  3. Install the server dependencies:

    sh
    uv pip install -e .

    For development, tests, linting, and type checks, install the dev extras:

    sh
    uv pip install -e ".[dev]"
  4. Check that the command is available:

    sh
    uv run mcp-graylog --help
  5. If you installed the dev extras, run the test suite:

    sh
    uv run pytest -q

Quick Start: Codex Stdio

Install the project dependencies, then add this server to your Codex config:

toml
[mcp_servers.graylog]
command = "uv"
args = ["run", "mcp-graylog"]

[mcp_servers.graylog.env]
GRAYLOG_ENDPOINT = "https://graylog.example.com"
GRAYLOG_TOKEN = "gl2-your-token"
MCP_SERVER_TRANSPORT = "stdio"

Run the command from this repository when Codex starts the MCP server:

sh
uv run mcp-graylog

Token authentication with GRAYLOG_TOKEN is preferred. Legacy basic credentials are still supported by the runtime for older installations, but new setups should use a Graylog access token.

MCP Client Configuration Examples

All local client examples use stdio. Run them from this repository checkout, or replace uv with an absolute command that can start mcp-graylog in your environment.

Codex

Add this to ~/.codex/config.toml:

toml
[mcp_servers.graylog]
command = "uv"
args = ["run", "mcp-graylog"]

[mcp_servers.graylog.env]
GRAYLOG_ENDPOINT = "https://graylog.example.com"
GRAYLOG_TOKEN = "gl2-your-token"
MCP_SERVER_TRANSPORT = "stdio"

Claude Code

For a project-shared server, add .mcp.json at the repository root:

json
{
  "mcpServers": {
    "graylog": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "mcp-graylog"],
      "env": {
        "GRAYLOG_ENDPOINT": "https://graylog.example.com",
        "GRAYLOG_TOKEN": "gl2-your-token",
        "MCP_SERVER_TRANSPORT": "stdio"
      }
    }
  }
}

Equivalent CLI setup:

sh
claude mcp add-json graylog '{"type":"stdio","command":"uv","args":["run","mcp-graylog"],"env":{"GRAYLOG_ENDPOINT":"https://graylog.example.com","GRAYLOG_TOKEN":"gl2-your-token","MCP_SERVER_TRANSPORT":"stdio"}}'

Cursor

Add .cursor/mcp.json in the project, or ~/.cursor/mcp.json globally:

json
{
  "mcpServers": {
    "graylog": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "mcp-graylog"],
      "env": {
        "GRAYLOG_ENDPOINT": "https://graylog.example.com",
        "GRAYLOG_TOKEN": "gl2-your-token",
        "MCP_SERVER_TRANSPORT": "stdio"
      }
    }
  }
}

OpenCode

Add this to opencode.jsonc:

jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "graylog": {
      "type": "local",
      "command": ["uv", "run", "mcp-graylog"],
      "environment": {
        "GRAYLOG_ENDPOINT": "https://graylog.example.com",
        "GRAYLOG_TOKEN": "gl2-your-token",
        "MCP_SERVER_TRANSPORT": "stdio"
      },
      "enabled": true
    }
  }
}

Hermes

Add this to ~/.hermes/config.yaml:

yaml
mcp_servers:
  graylog:
    command: "uv"
    args: ["run", "mcp-graylog"]
    env:
      GRAYLOG_ENDPOINT: "https://graylog.example.com"
      GRAYLOG_TOKEN: "gl2-your-token"
      MCP_SERVER_TRANSPORT: "stdio"

Run /reload-mcp in Hermes after changing the file.

OpenClaw

Add this to ~/.openclaw/openclaw.json under mcp.servers, or use openclaw mcp set graylog '<json>' with the same server object:

json
{
  "mcp": {
    "servers": {
      "graylog": {
        "command": "uv",
        "args": ["run", "mcp-graylog"],
        "env": {
          "GRAYLOG_ENDPOINT": "https://graylog.example.com",
          "GRAYLOG_TOKEN": "gl2-your-token",
          "MCP_SERVER_TRANSPORT": "stdio"
        }
      }
    }
  }
}

Streamable HTTP

Use Streamable HTTP only when the server must be reachable from another process or host:

sh
GRAYLOG_ENDPOINT="https://graylog.example.com" \
GRAYLOG_TOKEN="gl2-your-token" \
MCP_SERVER_ALLOWED_HOSTS="mcp.example.com,mcp.example.com:*" \
uv run mcp-graylog --transport streamable-http --host 0.0.0.0 --port 8000 --path /mcp

The equivalent environment setting is:

sh
MCP_SERVER_TRANSPORT=streamable-http
MCP_SERVER_HOST=0.0.0.0
MCP_SERVER_PORT=8000
MCP_SERVER_PATH=/mcp
MCP_SERVER_DNS_REBINDING_PROTECTION=true
MCP_SERVER_ALLOWED_HOSTS=mcp.example.com,mcp.example.com:*
MCP_SERVER_ALLOWED_ORIGINS=https://app.example.com

MCP_SERVER_ALLOWED_HOSTS contains the exact hostnames accepted by the HTTP transport. Add both the bare hostname and hostname:* when clients may use an explicit port. For a direct IP deployment, use a value such as 192.0.2.10:*. Configure MCP_SERVER_ALLOWED_ORIGINS only for browser clients. To accept requests for any host behind a trusted reverse proxy, set MCP_SERVER_DNS_REBINDING_PROTECTION=false. This disables both Host and Origin validation and should not be used when the server is exposed directly.

Configuration

VariableRequiredDefaultDescription
GRAYLOG_ENDPOINTyes-Base URL for Graylog, without embedded credentials.
GRAYLOG_TOKENyes for new setups-Preferred Graylog access token.
GRAYLOG_VERIFY_SSLnotrueVerify TLS certificates.
GRAYLOG_TIMEOUTno30Graylog HTTP timeout in seconds.
MCP_SERVER_TRANSPORTnostdiostdio or streamable-http.
MCP_SERVER_HOSTno127.0.0.1Streamable HTTP bind host.
MCP_SERVER_PORTno8000Streamable HTTP bind port.
MCP_SERVER_PATHno/mcpStreamable HTTP MCP path.
MCP_SERVER_DNS_REBINDING_PROTECTIONnotrueValidate HTTP Host and Origin headers.
MCP_SERVER_ALLOWED_HOSTSnolocalhost valuesComma-separated allowed Host values.
MCP_SERVER_ALLOWED_ORIGINSnolocalhost valuesComma-separated allowed browser origins.
LOG_LEVELnoINFOServer log level.

Graylog 6+ API Compatibility

The server uses the current Graylog Search Scripting and system APIs:

  • POST /api/search/messages
  • POST /api/search/aggregate
  • GET /api/streams
  • GET /api/streams/{stream_id}
  • GET /api/system

It does not use the legacy universal search API. Search payloads use query, timerange, streams, fields, size, and from.

MCP Tools

  • search_logs(search) searches messages with a typed MessageSearchInput.
  • search_stream_logs(stream_id, search) searches messages in one stream.
  • aggregate_logs(aggregation) runs grouped aggregations with AggregateLogsInput.
  • list_streams() returns available Graylog streams.
  • get_stream_info(stream_id) returns one stream definition.
  • search_streams_by_name(stream_name) filters streams locally by title.
  • get_system_info() returns Graylog system information.
  • get_error_logs(hours=1, limit=100) searches recent error and critical logs.
  • get_log_count_by_level(hours=1) aggregates recent logs by level.

Tool Input Examples

json
{
  "query": "level:ERROR",
  "timerange": {"value": 1, "unit": "h"},
  "streams": [],
  "fields": ["timestamp", "source", "level", "message"],
  "limit": 50,
  "offset": 0
}
json
{
  "query": "*",
  "timerange": {"keyword": "Last 24 hours"},
  "field": "source",
  "metric": "count",
  "limit": 10
}
json
{
  "stream_id": "000000000000000000000001",
  "search": {
    "query": "source:api",
    "timerange": {"value": 24, "unit": "h"},
    "fields": ["timestamp", "source", "message"],
    "limit": 25,
    "offset": 0
  }
}

Development

sh
uv sync --extra dev
uv run pytest
uv run ruff check .

The package entrypoint is mcp-graylog, provided by mcp_graylog.cli:main.

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "mothlike-mcp_graylog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-graylog"
      ]
    }
  }
}

MCP Graylog 服务器 MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald MCP Graylog 服务器 verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

MCP Graylog 服务器 als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für MCP Graylog 服务器 ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "mothlike-mcp_graylog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-graylog"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von MCP Graylog 服务器. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von MCP Graylog 服务器.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit MCP Graylog 服务器 bei dieser Aufgabe helfen?
MCP Graylog 服务器
Gerne. Ich habe es gelesen.
Das habe ich mit MCP Graylog 服务器 gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server MCP Graylog 服务器 verwendet?

MCP Graylog 服务器 ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich MCP Graylog 服务器 MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie MCP Graylog 服务器 mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum MCP Graylog 服务器 MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald MCP Graylog 服务器 verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich MCP Graylog 服务器 MCP mit TypingMind?

MCP Graylog 服务器 wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt MCP Graylog 服务器 MCP in TypingMind bereit?

MCP Graylog 服务器 stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um MCP Graylog 服务器 MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls MCP Graylog 服务器 eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇