Splunk MCP Server
Click on "Install 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., "@Splunk MCP Servershow me all alerts from the last 24 hours"
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
A Model Context Protocol (MCP) server that provides LLM-powered tools for interacting with Splunk Enterprise and Splunk Cloud. Built with FastMCP (Python), it exposes 25 tools across four capability areas for search, alerting, KV Store management, and index administration.
Designed for use with Claude Desktop (via stdio transport) and Llama Stack on OpenShift AI (via streamable HTTP transport).
Features
Search & Investigation (7 tools)
splunk_search— Run SPL queries synchronously (create job → poll → return results)splunk_search_async— Submit long-running searches, get job ID immediatelysplunk_get_job_status— Check search job progress and statesplunk_get_job_results— Retrieve results from completed jobssplunk_list_jobs— List active and recent search jobssplunk_cancel_job— Cancel a running search jobsplunk_export_search— Stream large result sets via the export endpoint
Saved Searches & Alerts (6 tools)
splunk_list_saved_searches— List all saved searches and alertssplunk_get_saved_search— Get details of a specific saved searchsplunk_create_saved_search— Create new saved searches or alertssplunk_update_saved_search— Modify existing saved searchessplunk_delete_saved_search— Remove a saved searchsplunk_run_saved_search— Dispatch a saved search immediately
KV Store (7 tools)
splunk_list_kvstore_collections— List all KV Store collectionssplunk_get_kvstore_schema— Get collection schema and field definitionssplunk_query_kvstore— Query records with MongoDB-style filterssplunk_insert_kvstore_record— Insert a new recordsplunk_update_kvstore_record— Update an existing record by keysplunk_delete_kvstore_record— Delete a single record by keysplunk_delete_kvstore_records— Bulk delete records matching a query
Index & Data Management (5 tools)
splunk_list_indexes— List all indexes with event counts and sizessplunk_get_index— Get detailed index configurationsplunk_list_sourcetypes— List all sourcetypes with descriptionssplunk_list_inputs— List configured data inputssplunk_health_check— Check Splunk instance health, KV Store, and connectivity
Related MCP server: Security Infrastructure MCP Server
Quick Start
Prerequisites
Python 3.10+
A Splunk Enterprise or Cloud instance with REST API access (port 8089)
Installation
git clone https://github.com/anatsheh84/splunk-mcp-server.git
cd splunk-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Configuration
Copy the example environment file and set your Splunk credentials:
cp .env.example .envEdit .env with your Splunk connection details:
SPLUNK_HOST=https://your-splunk-host
SPLUNK_PORT=8089
SPLUNK_USERNAME=admin
SPLUNK_PASSWORD=your-password
SPLUNK_VERIFY_SSL=false
SPLUNK_AUTH_TYPE=basic
SPLUNK_API_MODE=directConfiguration options:
SPLUNK_AUTH_TYPE:basic(username/password) ortoken(Splunk auth token)SPLUNK_API_MODE:direct(splunkd port 8089) orweb_proxy(Splunk Web REST proxy via/en-US/splunkd/__raw/)SPLUNK_VERIFY_SSL: Set totruein production with valid certificates
Test Connection
python3 test_connection.pyRun the MCP Server
stdio mode (for Claude Desktop):
splunk-mcp
# or
MCP_TRANSPORT=stdio python3 -m splunk_mcp.serverStreamable HTTP mode (for Llama Stack / OpenShift AI):
MCP_TRANSPORT=streamable_http MCP_HTTP_PORT=8080 splunk-mcpClaude Desktop Integration
Add the following to your Claude Desktop MCP configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"splunk": {
"command": "/path/to/splunk-mcp-server/.venv/bin/python",
"args": ["-m", "splunk_mcp.server"],
"env": {
"SPLUNK_HOST": "https://your-splunk-host",
"SPLUNK_PORT": "8089",
"SPLUNK_USERNAME": "admin",
"SPLUNK_PASSWORD": "your-password",
"SPLUNK_VERIFY_SSL": "false",
"SPLUNK_API_MODE": "direct",
"MCP_TRANSPORT": "stdio"
}
}
}
}Or use the included setup script:
./setup_claude_desktop.shDocker
docker build -t splunk-mcp-server .
docker run -e SPLUNK_HOST=https://splunk:8089 \
-e SPLUNK_USERNAME=admin \
-e SPLUNK_PASSWORD=changeme \
-e MCP_TRANSPORT=streamable_http \
-p 8080:8080 \
splunk-mcp-serverProject Structure
splunk-mcp-server/
├── src/splunk_mcp/
│ ├── __init__.py
│ ├── server.py # FastMCP server, lifespan, transport selection
│ ├── config.py # Pydantic Settings (env vars)
│ ├── client.py # Async HTTP client for Splunk REST API
│ ├── errors.py # Splunk-specific error handling
│ ├── formatters.py # Markdown/JSON response formatting
│ ├── tools/
│ │ ├── search.py # 7 search tools
│ │ ├── saved_searches.py # 6 saved search tools
│ │ ├── kvstore.py # 7 KV Store tools
│ │ └── indexes.py # 5 index/health tools
│ └── models/
│ ├── search.py # Pydantic input models for search
│ ├── saved_searches.py
│ ├── kvstore.py
│ └── indexes.py
├── pyproject.toml
├── Dockerfile
├── .env.example
├── test_connection.py # Quick connectivity test
├── test_tools_e2e.py # End-to-end tool tests
└── claude_desktop_config.json # Example Claude Desktop configLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA FastMCP-based tool for interacting with Splunk Enterprise/Cloud through natural language. This tool provides a set of capabilities for searching Splunk data, managing KV stores, and accessing Splunk resources12107Apache 2.0
- Alicense-qualityDmaintenanceA comprehensive implementation of Model Context Protocol servers enabling natural language interactions with security platforms including Splunk SIEM, CrowdStrike EDR, and Microsoft MISP for threat intelligence querying and analysis.2422MIT
- Flicense-qualityDmaintenanceEnables 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.
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing tools for DB queries, API calls, file I/O, and text transformations, enabling AI agents like Claude to perform real-world actions.10MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anatsheh84/splunk-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server