mcp-server-splunk
Allows searching, managing, and analyzing data in Splunk instances, including executing SPL queries, managing indexes, alerts, saved searches, dashboards, knowledge objects, KV store, data inputs, users and roles, apps, and server operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-splunkSearch for errors in the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Splunk MCP Server
Search and manage Splunk from Pi, Claude Code, and Codex using MCP.
Connection
Install uv, then run one of these Bash examples. Replace localhost with your Splunk hostname.
Token:
export SPLUNK_HOST=localhost
read -rsp 'Splunk token: ' SPLUNK_TOKEN; echo
export SPLUNK_TOKENCreate a token in Splunk Web: Settings → Tokens → New Token.
Or username/password:
export SPLUNK_HOST=localhost
unset SPLUNK_TOKEN
export SPLUNK_USERNAME=your-username
read -rsp 'Splunk password: ' SPLUNK_PASSWORD; echo
export SPLUNK_PASSWORDLaunch your client from the same terminal. Restart it if it is already running.
Related MCP server: MCP Server for Splunk
Installation
Pi
pi mcp add splunk -- uvx mcp-server-splunk@latest
pi mcp list
piClaude Code
claude mcp add --transport stdio --scope user splunk -- uvx mcp-server-splunk@latest
claude mcp list
claudeCodex
Add to ~/.codex/config.toml:
[mcp_servers.splunk]
command = "uvx"
args = ["mcp-server-splunk@latest"]
env_vars = [
"SPLUNK_HOST", "SPLUNK_PORT", "SPLUNK_SCHEME",
"SPLUNK_TOKEN", "SPLUNK_USERNAME", "SPLUNK_PASSWORD",
]codex mcp list
codexConfiguration
Variable | Default | Purpose |
|
| Splunk hostname, without scheme or port |
|
| Management API port |
|
|
|
| — | Authentication token |
| — | Username when not using a token |
| — | Password when not using a token |
Use a token or username/password. A token takes precedence if both are set. The server does not load .env files automatically.
Tools
91 tools cover searches, indexes, alerts, saved searches, dashboards, lookups, macros, KV Store, inputs, users, roles, apps, and server administration. See tool definitions for parameters and behavior.
Some tools modify or delete Splunk resources. Use an account with only the permissions you need.
Development
With connection variables set as above:
git clone https://github.com/pahar0/mcp-server-splunk.git
cd mcp-server-splunk
uv sync
uv run mcp-server-splunkLicense
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- LogspotOAuthio.logspot
Query your Logspot analytics, companies, and revenue from any AI assistant, and run your actions.
Manage uptime monitors and incidents and search logs, metrics and traces from an AI assistant.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
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.-
- AlicenseBqualityAmaintenanceEnables 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.5727Apache 2.0
- FlicenseNot gradedqualityNot gradedmaintenanceEnables users to interact with Splunk instances to execute SPL queries, manage saved searches, and monitor system health. It provides a clean interface for listing dashboards, indexes, and logs through the Model Context Protocol.402 npm-
- 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