Skip to main content

splunkctl

splunkctl: CLI and MCP server for Splunk Enterprise, Enterprise Security, and SOAR

Operate Splunk Enterprise, Enterprise Security, and Splunk SOAR from a terminal, or give an AI agent the same commands through MCP.

Requires Python 3.13+ and credentials for your Splunk instance.

Quickstart

python -m pip install splunkctl
splunkctl config init
splunkctl doctor

Documentation · Installation requirements

Tasks

  • Investigate: run SPL, read fired alerts, and triage Enterprise Security notables. Search, Triage notables
  • Deploy detections: export saved searches to YAML, review the diff, and import them on another instance. Manage detection rules
  • Respond with SOAR: work containers, artifacts, vault files, notes, and playbook runs. Work SOAR incidents
  • Review configuration drift: pull live state, diff it against version control, and push approved changes with a change report. Manage configuration as code

Safety

Every command that changes a remote Splunk or SOAR instance is guarded. Without --yes it prints a preview and exits without changing anything; some previews read the current state first to show a diff. The preview names the target host, and the active profile for Splunk Enterprise, so a change aimed at production is visible before it happens:

$ splunkctl --profile uat rules delete 'My Rule'
[DRY RUN] Delete saved search 'My Rule' (profile: uat @ uat.splunk.internal:8089)
Pass --yes to apply.

Add --yes to apply. splunkctl state push --report FILE writes a change report with the before and after state for each object, which you can attach to a change ticket.

Local configuration writes are not guarded: splunkctl config init, splunkctl config use, splunkctl auth login, and splunkctl mcp install write to your own machine immediately.

Agent access

The MCP server exposes the command tree to Claude Code, Claude Desktop, Cursor, or any other MCP client. Setup, transports, and the progressive tool-loading model are in the MCP guide.

splunkctl mcp install           # register the server in ./.mcp.json
splunkctl commands --json       # machine-readable command tree

Guarded tools keep the same contract as the CLI: a call previews until the agent passes yes=true explicitly.

Requirements and limitations

  • Python 3.13 or newer.

  • A Splunk account with REST API access on port 8089 (or your configured port). Each command needs the Splunk capability or SOAR permission its action requires; splunkctl doctor reports which checks pass for the active profile.

  • Enterprise Security commands (splunkctl es ...) check for the SplunkEnterpriseSecuritySuite app and exit 1 with a not_found error when it is not installed.

  • Dashboard, lookup file, and HEC token commands use entity classes from an optional SDK fork. Install it with:

    python -m pip install git+https://github.com/dannyota/splunk-sdk-python@splunkctl
    
  • Browser SAML login needs the browser extra: python -m pip install 'splunkctl[browser]'.

Project and support

splunkctl is an independent community project. It is not affiliated with or endorsed by Splunk Inc.

Splunk Inc. publishes an unrelated Go CLI with the same executable name, splunk/splunkctl. This package also installs splunkctl-py and leaves a Splunk-format config file untouched, so both tools can be installed together; see Relationship to Splunk's splunkctl.

Metadata

Release files for splunkctl 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splunkctl 0.14.0
File Size Uploaded Provenance Actions
splunkctl-0.14.0.tar.gz 253.1 kB With provenance Details for splunkctl-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for splunkctl 0.14.0
File Interpreter ABI Platform Actions
splunkctl-0.14.0-py3-none-any.whl Python 3 none any Details for splunkctl-0.14.0-py3-none-any.whl

Total release size: 586.3 kB

Release files / splunkctl-0.14.0.tar.gz

Download URL splunkctl-0.14.0.tar.gz
Size 253.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f192356cc10dbbb503b354296436a2873a1c4f0cada1e2123f5327fee9bdb3f6
BLAKE2b-256 checksum
How to use checksums
54e382057a8df36092d092d168ee0a7dfb4924c479d72141958bb71b38b1d4c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / splunkctl-0.14.0-py3-none-any.whl

Download URL splunkctl-0.14.0-py3-none-any.whl
Size 333.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f425c2aa3a5af9eb9b5a8e447a30659ebcca15404fff020913b648cef10fcc6
BLAKE2b-256 checksum
How to use checksums
cc3a7dde5278a1ba4d80d137c0d3e88960d67f83ada729dfe389246b6f0ed3f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for splunkctl 0.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for splunkctl-0.14.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page