Skip to content

Graylog MCP Server — 216 tools

contains code

The Graylog DADL turns Graylog's API into an MCP server that Claude, GPT or any MCP-compatible agent can consume directly. One YAML file declares all 216 tools — stream, pipeline, sidecar, event, cluster, index, and more — and ToolMesh serves them at runtime. No Python boilerplate, no per-endpoint code, no separate MCP server process.

Below: the endpoint coverage matrix, a two-block ToolMesh setup, the full tool reference grouped by Graylog feature area, required credential scopes.

Source: Graylog REST API

Credits: Dunkel Cloud GmbH -- maintainerUpdated: 2026-08-04

Which Graylog endpoints are covered?

68% (216 of ~320 endpoints)

Focus: Views/Search API (sync, messages, pivot/histogram/stats via composites), legacy relative + keyword search, CSV export, views, streams, stream rules, pipelines, pipeline rules, inputs, extractors, events, notifications, dashboards, users, roles, tokens, index sets, indices, grok patterns, lookup tables, sidecars, sidecar configurations, collectors, content packs, outputs, metrics, system info, cluster, processing control, loggers, forensic incident_window composite

Missing: enterprise-only plugins (archives, audit log, reports, license, data lake), Views CRUD (saved views, dashboard widgets), Views write CRUD (create/update/delete -- POST/PUT/DELETE /views), legacy alerts API (removed in 6.x, superseded by events), message decorators, debug events, codec types, retention/rotation strategy config, LDAP config, async Views/Search (poll-based), absolute-range legacy search (covered by views_search_sync)

Last reviewed: 2026-08-04

How do you configure the Graylog DADL?

  1. 1. Log into your Graylog web interface (default: http://<host>:9000)
  2. 2. Navigate to System > Users and Teams
  3. 3. Click your username, then 'Edit Tokens'
  4. 4. Enter a token name (e.g., 'toolmesh') and click 'Create Token'
  5. 5. Copy the generated token -- it is shown only once
  6. 6. Set CREDENTIAL_GRAYLOG_TOKEN to the token string
  7. 7. Set CREDENTIAL_GRAYLOG_TOKEN_PASSWORD to the literal string 'token'

Environment variable: CREDENTIAL_GRAYLOG_TOKEN, CREDENTIAL_GRAYLOG_TOKEN_PASSWORD

Authentication docs ↗

Graylog uses HTTP Basic Auth with access tokens. The username is the token string, the password is the literal word "token". Tokens have configurable TTL (default 30 days). Self-hosted: adjust the url in backends.yaml to match your Graylog server address.

How do you install the Graylog MCP server with ToolMesh?

Add to your backends.yaml:

- name: graylog
  transport: rest
  dadl: graylog.dadl
  url: "https://graylog.example.com/api"

Set the credential:

CREDENTIAL_GRAYLOG_TOKEN, CREDENTIAL_GRAYLOG_TOKEN_PASSWORD=your-token-here

What 216 tools does the Graylog DADL expose?

GETsearch_relativeSearch messages with a relative time range (seconds from now). Query uses Lucene syntax. Returns messages with id, timestamp, source, and all fields. Default limit 150, max 10000. Scope to a stream with filter "streams:STREAM_ID" -- that is the only stream scoping this endpoint honors on Graylog 6.1.
GETexport_search_relativeCSV export of a relative-time-range search. Same query semantics as search_relative, but returns text/csv streamed to the file broker -- the tool result is a download URL, not inline rows. "fields" is REQUIRED here (unlike search_relative) and defines the column order. Use for bulk pulls; for inline results use search_relative or search_messages_compact. Leave the Accept parameter at its default -- it is what selects CSV.
GETsearch_keywordSearch messages with a Natty-parsed open-ended time range like "last 5 minutes", "last 7 hours", "yesterday", "last week". The keyword is parsed in the "timezone" time zone (default UTC) -- override it to make phrases like "yesterday" mean yesterday in local time. WARNING: closed/relative phrases like "7 hours ago" are rejected with HTTP 400. For closed absolute windows or aggregation use the views_search_sync / aggregate_pivot composites instead.
GETexport_search_keywordCSV export of a keyword-time-range search. Same keyword grammar and timezone handling as search_keyword, but returns text/csv streamed to the file broker -- the tool result is a download URL, not inline rows. "fields" is REQUIRED here and defines the column order. Leave the Accept parameter at its default -- it is what selects CSV.
POSTviews_search_syncExecute a Views/Search query synchronously and return results inline. Body shape: { id?, queries: [...], parameters: [], skip_no_streams_check? }. NOTE: there is no top-level "streams" field -- Graylog rejects it with HTTP 400. Scope to streams via query.filter (e.g. { type: "or", filters: [{ type: "stream", id: STREAM_ID }] }) on the individual query object. Each query has id, query.query_string, timerange (absolute / relative / keyword), optional filter, and search_types[] (pivot, messages, events, ...). For everyday forensic work prefer the higher-level composites: aggregate_by_field, aggregate_pivot, histogram_grouped, field_stats, search_messages_compact, incident_window. Server-side timeout via ?timeout=<seconds>, default 60.
POSTviews_search_messagesStandalone CSV message export with free-form parameters -- no saved Search needed. This is NOT the views_search_sync body shape. Body fields: timerange (required, the usual absolute / relative / keyword object), query_string (required, { "type": "elasticsearch", "query_string": "level:3" }), streams (array of stream IDs -- allowed here, unlike views_search_sync, and actually honored), fields_in_order (array, MUST be non-empty, defines CSV column order), chunk_size, time_zone, limit. IMPORTANT: limit is only enforced at CHUNK boundaries -- with the default chunk_size of 1000, limit 3 still returns 1000 rows. To cap the output set chunk_size to the row count you want. time_zone defaults to the API user's configured time zone (NOT UTC) -- pass it explicitly for stable timestamps. Returns text/csv streamed to the file broker -- the tool result is a download URL, not inline rows. Preferred over export_search_relative / export_search_keyword when you need an absolute window, exact field projection or real stream scoping. Leave the Accept parameter at its default -- it selects CSV.
GETget_messageRetrieve a single message by its ID and index name. Returns all message fields.
POSTparse_messageParse a raw message string using Graylog's message parsing pipeline. Useful for testing extractors.
GETanalyze_message_fieldAnalyze a message field value to show how Elasticsearch tokenizes it.
GETlist_saved_searchesList all saved searches.
GETlist_streamsList all streams. Returns stream id, title, description, rules, matching_type, disabled status, and index_set_id. The Default Stream ID is "000000000000000000000001".
GETget_streamGet a single stream by ID with its configuration and rules.
POSTcreate_streamCreate a new stream. matching_type: AND (all rules must match) or OR (any rule matches). The stream is created paused -- call resume_stream to start routing messages.
PUTupdate_streamUpdate a stream's title, description, matching type, or index set.
DELETEdelete_streamDelete a stream. The Default Stream cannot be deleted.
POSTclone_streamClone a stream including all its rules.
POSTpause_streamPause a stream. Messages will no longer be routed to this stream.
POSTresume_streamResume a paused stream. Messages will start routing to this stream again.
GETlist_enabled_streamsList only enabled (non-paused) streams.
POSTtest_stream_matchTest if a message would match the rules of a stream.
GETlist_stream_rulesList all rules for a stream. Rule types: 1=exact match, 2=regex match, 3=greater than, 4=less than, 5=field presence, 6=contains, 7=always match, 8=match input.
GETget_stream_ruleGet a single stream rule.
POSTcreate_stream_ruleCreate a stream rule. type is an integer: 1=exact, 2=regex, 3=greater_than, 4=less_than, 5=field_presence, 6=contains, 7=always_match, 8=match_input.
PUTupdate_stream_ruleUpdate a stream rule.
DELETEdelete_stream_ruleDelete a stream rule.
GETlist_stream_outputsList outputs assigned to a stream.
POSTadd_stream_outputAdd an existing output to a stream.
DELETEremove_stream_outputRemove an output from a stream.
GETlist_pipelinesList all processing pipelines. Each pipeline has stages with rules. Pipeline source uses Graylog's pipeline rule language.
GETget_pipelineGet a single pipeline by ID, including its source code and stages.
POSTcreate_pipelineCreate a processing pipeline. The source field contains the pipeline definition in Graylog pipeline language. Validate with parse_pipeline first.
PUTupdate_pipelineUpdate a pipeline's source, title, or description.
DELETEdelete_pipelineDelete a processing pipeline.
POSTparse_pipelineParse and validate pipeline source without creating it. Returns parse errors if invalid.
POSTsimulate_pipelineSimulate pipeline processing on a message to see which rules would match and what output would be produced.
GETlist_pipeline_rulesList all pipeline rules. Rules are written in Graylog's rule language.
GETget_pipeline_ruleGet a single pipeline rule by ID.
POSTcreate_pipeline_ruleCreate a new pipeline rule. Validate with parse_pipeline_rule first.
PUTupdate_pipeline_ruleUpdate a pipeline rule.
DELETEdelete_pipeline_ruleDelete a pipeline rule.
POSTparse_pipeline_ruleParse and validate a pipeline rule without creating it.
GETlist_pipeline_functionsList all available functions that can be used in pipeline rules.
GETlist_pipeline_connectionsList all stream-to-pipeline connections.
GETget_stream_pipeline_connectionsGet pipeline connections for a specific stream.
POSTconnect_pipeline_to_streamConnect pipelines to a stream.
POSTconnect_stream_to_pipelineConnect streams to a pipeline.
GETlist_inputsList all configured inputs. Each input has a type (e.g. org.graylog2.inputs.syslog.udp.SyslogUDPInput), title, global flag, and configuration.
GETget_inputGet a single input by ID.
POSTcreate_inputCreate a new input. Use list_input_types to see available types and their configuration fields. Set global=true for cluster-wide inputs, false for node-local.
PUTupdate_inputUpdate an input's title, configuration, or global flag.
DELETEdelete_inputDelete an input. This stops ingestion from this source.
POSTlaunch_inputStart/launch an existing input.
POSTstop_inputStop a running input.
GETlist_input_typesList all available input types with their configuration schemas.
GETget_input_typeGet details for a specific input type including all configuration fields.
GETlist_input_statesList input states (running, stopped, failed) for all inputs on this node.
GETlist_extractorsList all extractors configured on an input.
GETget_extractorGet a single extractor.
POSTcreate_extractorCreate an extractor on an input. Types: regex, substring, split_and_index, copy_input, grok, json, lookup_table.
PUTupdate_extractorUpdate an extractor.
DELETEdelete_extractorDelete an extractor from an input.
POSTcreate_static_fieldAdd a static field to all messages from this input.
DELETEdelete_static_fieldRemove a static field from an input.
GETlist_event_definitionsList all event definitions (alert conditions in Graylog 3.1+).
GETget_event_definitionGet a single event definition.
POSTcreate_event_definitionCreate an event definition. config contains the condition type and parameters. notification_settings controls which notifications fire.
PUTupdate_event_definitionUpdate an event definition.
DELETEdelete_event_definitionDelete an event definition.
POSTexecute_event_definitionManually trigger an event definition to check for events now.
POSTvalidate_event_definitionValidate an event definition without creating it.
POSTsearch_eventsSearch for triggered events. Supports filtering by event definition, timerange, and query. Returns events with timestamp, priority, fields, and source.
GETlist_event_notificationsList all event notifications (email, HTTP, Slack, etc.).
GETget_event_notificationGet a single event notification.
POSTcreate_event_notificationCreate an event notification. Config varies by type (email, http, slack, etc.).
PUTupdate_event_notificationUpdate an event notification.
DELETEdelete_event_notificationDelete an event notification.
POSTtest_event_notificationSend a test notification to verify the notification configuration works.
GETlist_dashboardsList all dashboards.
GETlist_viewsList saved Views. In Graylog 6 a "dashboard" and a "saved search" are both Views, distinguished by their type field (DASHBOARD / SEARCH). list_dashboards and list_saved_searches are the type-filtered convenience listings; this one returns both. Results are paginated under $.elements.
GETget_viewGet a single View by ID -- this is how you fetch ONE dashboard or ONE saved search. There is no /dashboards/{id} or /search/saved/{id} in Graylog 6: those paths fall through to the web UI and return HTML. Take the id from list_dashboards / list_saved_searches / list_views.
GETlist_usersList all users including their roles, permissions, and preferences.
GETget_userGet a user by username.
POSTcreate_userCreate a new user.
PUTupdate_userUpdate a user's details.
DELETEdelete_userDelete a user. Built-in admin user cannot be deleted.
PUTchange_user_passwordChange a user's password.
PUTupdate_user_permissionsUpdate a user's permissions.
PUTupdate_user_preferencesUpdate a user's UI preferences.
GETlist_user_tokensList all access tokens for a user. Token values are NOT returned -- only name, id, and last_access.
POSTcreate_user_tokenCreate a new access token for a user. The token value is returned ONLY in this response. Store it immediately. Used for API auth: username=token_value, password="token".
DELETEdelete_user_tokenDelete/revoke an access token.
GETlist_rolesList all roles with their permissions.
GETget_roleGet a role by name.
POSTcreate_roleCreate a new role.
PUTupdate_roleUpdate a role.
DELETEdelete_roleDelete a role. Built-in roles (Admin, Reader) cannot be deleted.
GETlist_role_membersList all users assigned to a role.
PUTadd_role_memberAdd a user to a role.
DELETEremove_role_memberRemove a user from a role.
GETlist_index_setsList all index sets. Each index set defines retention, rotation, and sharding for a group of indices. Every stream maps to one index set.
GETget_index_setGet a single index set.
POSTcreate_index_setCreate a new index set.
PUTupdate_index_setUpdate an index set.
DELETEdelete_index_setDelete an index set. Optionally delete all associated indices.
PUTset_default_index_setSet an index set as the default for new streams.
GETget_index_set_statsGet statistics for all index sets (document count, size, segments).
GETlist_indicesList all Elasticsearch/OpenSearch indices managed by Graylog.
GETlist_open_indicesList all open (writable/searchable) indices.
GETlist_closed_indicesList all closed indices.
GETget_indexGet details for a specific index.
POSTclose_indexClose an index. Closed indices cannot be searched but retain data.
POSTreopen_indexReopen a closed index.
DELETEdelete_indexDelete an index. This permanently removes all data in the index.
GETlist_index_rangesList all index ranges (time boundaries for each index).
POSTrebuild_all_index_rangesTrigger a rebuild of all index ranges. Long-running operation.
POSTrebuild_index_rangeRebuild index range for a specific index.
GETget_deflectorGet the current deflector (active write index) status.
POSTcycle_deflectorCycle the deflector -- close the current write index and create a new one.
GETget_deflector_for_index_setGet the deflector for a specific index set.
POSTcycle_deflector_for_index_setCycle the deflector for a specific index set.
GETget_indexer_overviewGet indexing overview with processing rates and counts.
GETget_indexer_cluster_healthGet Elasticsearch/OpenSearch cluster health (green/yellow/red).
GETget_indexer_cluster_nameGet the Elasticsearch/OpenSearch cluster name.
GETlist_indexer_failuresList indexer failures (messages that could not be indexed).
GETcount_indexer_failuresTotal count of indexer failures since a given date. "since" is REQUIRED -- an ISO8601 timestamp; omitting it fails with HTTP 400 "FailuresResource.count.arg0 must not be empty".
GETlist_grok_patternsList all grok patterns used for message extraction.
GETget_grok_patternGet a single grok pattern.
POSTcreate_grok_patternCreate a new grok pattern.
PUTupdate_grok_patternUpdate a grok pattern.
DELETEdelete_grok_patternDelete a grok pattern.
POSTtest_grok_patternTest a grok pattern against a sample string.
GETlist_lookup_tablesList all lookup tables with their data adapter and cache references.
GETget_lookup_tableGet a lookup table by ID or name.
POSTcreate_lookup_tableCreate a lookup table.
PUTupdate_lookup_tableUpdate a lookup table.
DELETEdelete_lookup_tableDelete a lookup table.
GETlist_lookup_adaptersList all lookup data adapters.
GETget_lookup_adapterGet a lookup data adapter by ID or name.
POSTcreate_lookup_adapterCreate a lookup data adapter.
PUTupdate_lookup_adapterUpdate a lookup data adapter.
DELETEdelete_lookup_adapterDelete a lookup data adapter.
GETlist_lookup_cachesList all lookup caches.
GETget_lookup_cacheGet a lookup cache by ID or name.
POSTcreate_lookup_cacheCreate a lookup cache.
PUTupdate_lookup_cacheUpdate a lookup cache.
DELETEdelete_lookup_cacheDelete a lookup cache.
GETlist_lookup_adapter_typesList available data adapter types.
GETlist_lookup_cache_typesList available cache types.
GETlist_outputsList all configured outputs.
GETget_outputGet a single output.
POSTcreate_outputCreate a new output. Use list_output_types to see available types.
PUTupdate_outputUpdate an output.
DELETEdelete_outputDelete an output.
GETlist_output_typesList available output types with their configuration schemas.
GETlist_content_packsList all content packs (bundles of inputs, streams, dashboards, etc.).
GETget_content_packGet a content pack with all its revisions.
POSTupload_content_packUpload/create a content pack.
DELETEdelete_content_packDelete a content pack.
POSTinstall_content_packInstall a specific revision of a content pack.
GETlist_content_pack_installationsList all installations of a content pack.
DELETEuninstall_content_packUninstall a content pack installation.
GETlist_sidecarsList all registered sidecars. Sidecars are agents running on hosts that manage log collectors (Filebeat, Winlogbeat, NXLog).
GETget_sidecarGet a single sidecar by ID.
POSTsidecar_administrationPaginated sidecar listing including collector compatibility -- the data behind the Sidecar Administration page. This is a POST despite being a read: the filter is sent as a body. A body is REQUIRED; an empty request fails with HTTP 400 "administration.arg0 must not be null". Body fields: page, per_page, query (search over node_name, e.g. "status:running"), filters (map, e.g. { "status": "1" }).
PUTbulk_sidecar_actionSet collector actions (start / restart / stop) on sidecars in bulk. Returns HTTP 202 on success. Body: { action, collectors: [ { sidecar_id, collector_ids: [...] } ] } -- note the nested per-sidecar list; there is no flat sidecar_ids field.
GETlist_sidecar_collectorsList all collector backends (Filebeat, Winlogbeat, NXLog definitions).
GETget_sidecar_collectorGet a collector backend definition.
POSTcreate_sidecar_collectorCreate a new collector backend definition.
PUTupdate_sidecar_collectorUpdate a collector backend definition.
DELETEdelete_sidecar_collectorDelete a collector backend definition.
GETlist_sidecar_configurationsList all sidecar configurations (collector config templates).
GETget_sidecar_configurationGet a sidecar configuration.
POSTcreate_sidecar_configurationCreate a sidecar configuration.
PUTupdate_sidecar_configurationUpdate a sidecar configuration.
DELETEdelete_sidecar_configurationDelete a sidecar configuration.
GETget_systemGet system overview: node ID, hostname, version, lifecycle, LB status, timezone, OS info.
GETget_system_statsGet node statistics (JVM memory, OS, process info).
GETget_throughputGet current message throughput (messages per second).
GETlist_message_fieldsList all known message field names across all indices.
GETlist_system_permissionsList all available system permission strings.
POSTpause_processingPause message processing on this node. Messages will queue in the journal.
POSTresume_processingResume message processing on this node.
GETget_message_processor_configGet message processor ordering and configuration.
PUTupdate_message_processor_configUpdate message processor ordering.
GETget_journalGet journal (disk buffer) information: size, segments, uncommitted entries.
GETget_lb_statusLoad-balancer status of this node as PLAIN TEXT, not JSON: "ALIVE" (HTTP 200), "DEAD" (HTTP 503) or "THROTTLED" (HTTP 429). The endpoint produces text/plain only -- leave the Accept parameter at its default; application/json returns HTTP 406.
PUToverride_lb_statusOverride the load balancer status. status must be ALIVE or DEAD.
GETlist_metricsList all internal metrics (JVM, processing, indexing, etc.).
GETget_metricGet a specific metric by its full name.
GETlist_metric_namesList all metric names.
GETget_metrics_by_namespaceGet all metrics in a namespace (e.g. org.graylog2.throughput).
POSTget_multiple_metricsGet multiple metrics at once by their names.
GETlist_system_notificationsList system notifications (warnings about configuration issues, index problems, etc.).
DELETEdismiss_system_notificationDismiss a system notification.
GETlist_loggersList all internal loggers and their current log levels.
GETlist_logger_subsystemsList logger subsystems (high-level components with adjustable levels).
PUTset_logger_levelSet the log level for a specific logger. Levels: TRACE, DEBUG, INFO, WARN, ERROR.
PUTset_subsystem_logger_levelSet the log level for a logger subsystem.
GETlist_system_jobsList all running and completed system jobs.
GETget_system_jobGet a system job by ID.
DELETEcancel_system_jobCancel a running system job.
GETlist_pluginsList all installed plugins with name, version, author, and URL.
POSTcreate_sessionCreate a session (login). Returns session_id and valid_until. For session-based auth: username=session_id, password="session".
DELETEterminate_sessionTerminate a session (logout).
GETget_cluster_configGet a cluster-wide configuration by class name.
PUTupdate_cluster_configUpdate a cluster-wide configuration.
DELETEdelete_cluster_configDelete a cluster-wide configuration (reset to default).
GETget_clusterGet system overview of all cluster nodes.
GETlist_cluster_input_statesGet input states across all cluster nodes.
GETlist_cluster_jobsList running system jobs across all cluster nodes.
POSTget_cluster_metricsGet multiple metrics across all cluster nodes.
GETget_cluster_node_jvmGet JVM information for a specific cluster node.
GETget_cluster_node_journalGet journal info for a specific cluster node.
GETget_cluster_node_thread_dumpGet a thread dump for a specific cluster node.
POSTpause_cluster_node_processingPause message processing on a specific cluster node.
POSTresume_cluster_node_processingResume message processing on a specific cluster node.

What composite workflows does the Graylog DADL provide? ⚠ contains code

FNaggregate_by_fieldTop-N values for a single field within a time window. Returns [{key, count}] sorted desc. Server-side replacement for the deprecated search_relative_terms / search_absolute_terms endpoints (removed in Graylog 6.0). time_range is one of: {type:"absolute", from, to} {type:"relative", range} {type:"keyword", keyword}
FNaggregate_pivotMulti-dimensional pivot (e.g. source x level). row_fields and column_fields are arrays of field names. Returns flat array of {row_keys, col_keys, count}. The canonical replacement for the Source x Level forensic matrix workflow.
FNhistogram_groupedTime-series histogram, optionally grouped by a field. interval is a Graylog timeunit: {quantity}{unit} with unit one of s m h d w M y -- e.g. 30s, 1m, 5m, 1h, 1d. That is the form to pass. ISO-8601 ("PT1M", "P1D") is also accepted and converted, because the underlying pivot rejects it with HTTP 400. Returns [{bucket_start, group_key|null, count}].
FNfield_statscount, min, max, mean, cardinality for a numeric field. Replaces the removed _stats endpoints.
FNsearch_messages_compactSearch returning only {ts, src, lvl, msg} per message -- ~80 bytes/msg instead of ~500. Offset/limit pagination (Graylog's Views API does not support search_after on the messages search-type). Pass the next_offset returned by the previous call to fetch the next page.
FNincident_windowForensic snapshot for a service-incident window. Returns {window, pivot_source_level, top_errors, baseline_pivot}. timestamp is ISO-8601, window_minutes default 6 (i.e. +/- 3 min). baseline_pivot covers the same-length window 1 hour earlier for comparison.