splunk-mcp
Provides tools for interacting with Splunk Enterprise's REST API, enabling AI assistants to run SPL searches, manage search jobs and saved searches, inspect indexes, dashboards, macros, users, roles, ACLs, fired alerts, apps, KV Store collections, and server information.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
splunk-mcp
A Model Context Protocol server that exposes Splunk Enterprise to AI assistants (Claude Desktop, Cursor, and any other MCP client).
Ask Claude things like:
"Search Splunk for authentication failures in the last hour"
"Why can't user jsmith see the Security dashboard?"
"What indexes are available and how much data is in each?"
"List all fired alerts from the last 24 hours"
"Show me the definition of the
normalize_src_ipmacro"
Tools (23 total)
Category | Tools |
Search |
|
Saved searches |
|
Indexes |
|
Dashboards |
|
Macros |
|
Users |
|
Roles |
|
Permissions |
|
Alerts |
|
Apps |
|
KV Store |
|
System |
|
Related MCP server: MCP Server for Splunk
Prerequisites
Splunk Enterprise 8.x or 9.x
A Splunk Bearer token (Settings → Tokens, or via
splunk create-authtokens)Python 3.10+ or Docker
Installation
Option A — uvx from GitHub (recommended — no install, no clone)
Requires uv. Fetches and runs directly from GitHub on demand, nothing left behind.
uvx --from git+https://github.com/mceSystems/splunk-mcp-server.git splunk-mcpOption B — pip from GitHub (no clone)
pip install git+https://github.com/mceSystems/splunk-mcp-server.gitOption C — from source (clone)
git clone https://github.com/mceSystems/splunk-mcp-server
cd splunk-mcp-server
pip install -e .Option E — Docker (nothing installed)
Build locally from source:
git clone https://github.com/mceSystems/splunk-mcp-server
cd splunk-mcp-server
docker build -t splunk-mcp .Configuration
All settings are read from environment variables or a .env file in the working directory.
Variable | Required | Default | Description |
| yes | — | Hostname or IP of your Splunk instance |
| yes | — | Bearer token for authentication |
| no |
| Management API port |
| no |
| Set |
| no |
| HTTP request timeout in seconds |
| no |
| Maximum time to wait for a search job |
| no |
| Default result cap for searches |
Copy .env.example to .env and fill in the required values:
cp .env.example .envClaude Desktop setup
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
uvx from GitHub (recommended)
{
"mcpServers": {
"splunk": {
"command": "uvx",
"args": ["--from", "git+https://github.com/mceSystems/splunk-mcp-server.git", "splunk-mcp"],
"env": {
"SPLUNK_HOST": "your-splunk-host",
"SPLUNK_TOKEN": "your-bearer-token",
"SPLUNK_PORT": "8089",
"SPLUNK_VERIFY_SSL": "false"
}
}
}
}pip from GitHub
{
"mcpServers": {
"splunk": {
"command": "splunk-mcp",
"env": {
"SPLUNK_HOST": "your-splunk-host",
"SPLUNK_TOKEN": "your-bearer-token",
"SPLUNK_PORT": "8089",
"SPLUNK_VERIFY_SSL": "false"
}
}
}
}From source / editable install
{
"mcpServers": {
"splunk": {
"command": "python",
"args": ["-m", "splunk_mcp.server"],
"cwd": "C:\\dev\\splunk-mcp",
"env": {
"SPLUNK_HOST": "your-splunk-host",
"SPLUNK_TOKEN": "your-bearer-token",
"SPLUNK_PORT": "8089",
"SPLUNK_VERIFY_SSL": "false"
}
}
}
}Docker
{
"mcpServers": {
"splunk": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "SPLUNK_HOST=your-splunk-host",
"-e", "SPLUNK_TOKEN=your-bearer-token",
"-e", "SPLUNK_PORT=8089",
"-e", "SPLUNK_VERIFY_SSL=false",
"splunk-mcp"
]
}
}
}Restart Claude Desktop after editing the config.
Cursor setup
Edit ~/.cursor/mcp.json (create it if it doesn't exist). Use the same JSON block as above — Cursor uses the identical MCP config format.
Verifying the connection
After restarting your MCP client, ask:
"Get Splunk server info"
Claude should respond with your Splunk version, build number, and license type. If it returns an error, check:
SPLUNK_HOSTis reachable from your machine on portSPLUNK_PORTThe bearer token is valid and not expired
SPLUNK_VERIFY_SSL=falseif using a self-signed certificate
Example prompts
Search
Search Splunk for failed logins in the last 4 hoursRun this SPL: index=web_logs status=500 | stats count by host | sort -countSearch for errors in index=main over the last 7 days, limit to 50 resultsIndexes & data
What Splunk indexes do I have and how much data is in each?Show me the retention policy for the security indexSaved searches & reports
List all saved searches in the "search" appRun the saved search named "Daily Error Summary"Dashboards
List all dashboards in the SplunkEnterpriseSecuritySuite appShow me the XML for the "Executive Summary" dashboardMacros
List all search macros that contain "lookup" in the nameWhat does the macro `cim_authentication_indexes` expand to?Users & roles
List all Splunk users and their rolesWhat capabilities does the "power" role have?Show me everything the user jsmith is allowed to doPermission troubleshooting
Why can't jsmith see the "Security Overview" dashboard in the search app?Check if analyst_user has read access to the saved search "Weekly Threat Report"Which apps are globally shared vs private?Show the ACL for the macro `normalize_src_ip` in the Splunk_SA_CIM appKV Store
List KV Store collections in the "lookup_editor" appQuery the "asset_lookup" KV Store collection for records where type is "server"Security notes
The bearer token is passed via environment variable, not embedded in config files checked into source control
Add
.envto.gitignore— never commit credentialsUse
SPLUNK_VERIFY_SSL=truein production;falseis only for dev/internal instances with self-signed certsThe server only makes read requests (GET) plus search job creation/deletion — it does not modify Splunk configuration
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Enables AI assistants to retrieve event data and execute event management operations in Nunify.
Read-only search of 2,189 AI agent tools (MCP servers, x402 APIs) with daily automated trust scores.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Splunk Enterprise and Splunk Cloud instances through standardized MCP interface. Supports executing SPL queries, managing indexes and saved searches, listing applications, and retrieving server information with flexible authentication options.-
- AlicenseBqualityBmaintenanceEnables AI agents to interact seamlessly with Splunk environments through 20+ tools for search, analytics, data discovery, administration, and health monitoring. Features AI-powered troubleshooting workflows and supports multiple Splunk instances with production-ready security.57282 PyPI27Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search, manage, and analyze data in Splunk instances through the Model Context Protocol. Supports SPL queries, index management, alerts, dashboards, and more.2,030 PyPI1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to operate a Splunk SOAR instance headlessly via its REST API, supporting container triage, playbook authoring and execution, and asset management.2MIT