Skip to main content
Glama
splunk-mcp-readonly

splunk-mcp-readonly

by lfjuarez

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SPLUNK_URLYesManagement URL for Splunk, e.g. https://splunk.example.com:8089
SPLUNK_TOKENNoSplunk bearer token (preferred authentication method)
SPLUNK_MAX_ROWSNoRow cap per search; hard cap is 1000200
SPLUNK_PASSWORDNoSplunk password for basic authentication, used when no token is set
SPLUNK_USERNAMENoSplunk username for basic authentication, used when no token is set
SPLUNK_TIMEOUT_SNoHTTP timeout in seconds60
SPLUNK_VERIFY_TLSNoWhether to verify the TLS certificatetrue
SPLUNK_MCP_AUDIT_LOGNoPath to a JSON Lines audit log file; one line is appended per tool call when set
SPLUNK_ALLOWED_INDEXESNoComma-separated list of indexes that searches may reference
SPLUNK_DEFAULT_EARLIESTNoDefault start of the search time range-24h

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Read-only access to Splunk. Use explain_spl to validate a search, then search to run it. Always bound searches with an index and a time range. Searches that write, delete or execute anything are refused. Results are capped; prefer stats/table over raw events.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
searchA

Run a read-only SPL search and return the result rows.

The search is validated first: commands that write, delete, export or execute (delete, outputlookup, collect, sendemail, script, map, ...) are refused. A leading search is added when missing and | head N is appended so results are always bounded.

Args: spl: The SPL query, e.g. index=wineventlog EventCode=4625 | stats count by src_ip. earliest: Start of the time range, Splunk syntax (default -24h). latest: End of the time range (default now). max_rows: Maximum rows to return (default 100, capped by the server, hard limit 1000).

Returns a dict with results (list of rows), count, spl (the SPL actually run), and truncated when the row limit was reached. On failure returns {"error": ...}.

explain_splA

Check an SPL query against the safety rules without running it.

Use this to validate a search before search. Nothing is sent to Splunk.

Args: spl: The SPL query to validate.

Returns {"ok": bool, "normalised": str | None, "reason": str | None}.

list_indexesA

List the Splunk indexes with event count, size in MB and retention in days.

Use it to discover which indexes exist before writing a search. Takes no parameters. Returns {"indexes": [...], "count": n}.

list_saved_searchesA

List saved searches and alerts (name, SPL, cron schedule, app, owner).

Args: filter: Optional substring to match against the saved search name. limit: Maximum number of saved searches (default 50).

Returns {"saved_searches": [...], "count": n}.

server_infoA

Return the Splunk version, server name, product type, OS and CPU architecture.

healthA

Return the splunkd health status and the status of each health feature.

Returns {"status": ..., "features": [{"name", "status", "reasons"}]}.

notablesA

List recent Enterprise Security notable events (requires Splunk ES).

Uses the ES notable macro, so it returns an error on a Splunk without Enterprise Security.

Args: hours: How many hours back to look (default 24). limit: Maximum notables to return (default 50, server cap applies).

Returns {"notables": [...], "count": n} with rule_name, severity, urgency, status, owner, src, dest, user and risk_score.

Prompts

Interactive templates invoked by user choice

NameDescription
triage_notableInvestigation checklist for a notable event raised by a given correlation rule.
coverage_questionAsk which saved searches cover a given attack technique.

Resources

Contextual data attached and managed by the client

NameDescription
indexes_resourceThe Splunk indexes as JSON text.

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation4/5

Each tool has a distinct role: search runs a query, explain_spl only validates one, list_indexes/list_saved_searches target different collections, and notables is ES-specific. The only mild overlap is server_info vs health, both being 'status' tools, though their descriptions separate version/OS metadata from splunkd health features.

Naming Consistency3/5

There is a readable but mixed convention: list_indexes and list_saved_searches use verb_noun, explain_spl is verb_noun too, but search is a bare verb and health, notables, and server_info are bare nouns. No uniform pattern, though nothing is confusing or cryptic.

Tool Count5/5

Seven tools is well-scoped for a read-only Splunk interface, with each tool earning its place across search, validation, discovery, and status. Nothing feels redundant or missing at the count level.

Completeness4/5

The surface covers the core read-only lifecycle: discover indexes, inspect saved searches, validate and run SPL, and check server/ES state. Minor gaps exist (e.g. no direct sourcetype/field discovery or saved-search detail/run endpoint), but agents can work around these with SPL queries such as metadata or fieldsummary.