MCP Server for Splunk
The MCP Server for Splunk enables AI agents to interact with Splunk environments through the Model Context Protocol, offering comprehensive search, administration, monitoring, and troubleshooting capabilities.
Search & Analytics
Run ad-hoc (
run_oneshot_search) and tracked searches (run_splunk_search) with job monitoring and progress trackingManage saved searches (list, create, update, delete, execute) including scheduling and alert actions
Data Discovery
List indexes, sources, sourcetypes, and hosts to explore data structures and availability
Retrieve metadata for schema analysis within any index
Administration & Configuration
List, enable, disable, and manage Splunk apps and users
Read and write
.confconfiguration files; manage KV Store collections
Dashboards
List, retrieve raw definitions, and create Classic Simple XML and Dashboard Studio JSON dashboards
Lookups & Knowledge Objects
List lookup definitions and CSV lookup files; create and query KV Store collections
Health & Alerts
Check server health, connectivity, and version status
List triggered alerts with trigger details
ITSI (IT Service Intelligence)
Manage services, entities, KPIs, episodes, glass tables, deep dives, correlation searches, and aggregation policies via a dedicated companion server with 70+ tools
AI-Powered Workflows
Discover, run, and build intelligent troubleshooting workflows (e.g., missing data, performance analysis) with parallel task execution
Validate and template custom workflows; review executed workflow history
Documentation & Reference
Access SPL cheat sheets and command references, CIM data model specs, admin guides, troubleshooting topics,
.conffile specifications, and Dashboard Studio guides
Extensibility
Pluggable architecture for custom tools and entry-point plugins; multi-client support with session-based isolation and dynamic environment configuration without server restarts
Enables AI agents to interact with Splunk Enterprise/Cloud environments, providing comprehensive tools for search and analytics, data discovery, administration, health monitoring, and AI-powered troubleshooting workflows. Includes capabilities for natural language to SPL conversion, real-time search management, metadata exploration, user and app management, system health monitoring, and automated diagnostic procedures.
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., "@MCP Server for Splunkshow me the top 5 error sources from 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.
MCP Server for Splunk
Enable AI agents to interact seamlessly with Splunk environments through the Model Context Protocol (MCP)
Transform your Splunk instance into an AI-native platform. Our community-driven MCP server bridges Large Language Models and Splunk Enterprise/Cloud with 20+ tools, 16 resources (including CIM data models), and production-ready securityβall through a single, standardized protocol.
π Why This Matters
π Universal AI Connection: One protocol connects any AI to Splunk data
β‘ Zero Custom Integration: No more months of custom API development
π‘οΈ Production-Ready Security: Client-scoped access with no credential exposure
π€ AI-Powered Workflows: Intelligent troubleshooting agents that work like experts
π€ Community-Driven: Extensible framework with contribution examples
π NEW: AI-Powered Troubleshooting Workflows - Transform reactive firefighting into intelligent, systematic problem-solving with specialist AI workflows.
Related MCP server: HubSpot MCP Server
π Table of Contents
π Quick Start
Prerequisites
Python 3.10+ and UV package manager
Nodejs (optional used for mcp inspector)
Docker (optional but recommended for full stack)
Splunk instance with API access (or use included Docker Splunk)
π Complete Setup Guide: Installation Guide
Configuration
Before running the setup, configure your Splunk connection:
# Copy the example configuration
cp env.example .env
# Edit .env with your Splunk credentials
# - Use your existing Splunk instance (local, cloud, or Splunk Cloud)
# - OR use the included Docker Splunk (requires Docker)
# Optional HTTP transport defaults (local runs)
# - Stateless HTTP avoids sticky-session requirements
# - JSON responses improve compatibility with some clients
# These are already the defaults for local runs via `mcp-server --local`
echo "MCP_STATELESS_HTTP=true" >> .env
echo "MCP_JSON_RESPONSE=true" >> .envOne-Command Setup
Windows:
git clone https://github.com/deslicer/mcp-for-splunk.git
cd mcp-for-splunk
```python
# Start the MCP Server (project script)
uv run mcp-server --local --detached
# Verify the server
uv run mcp-server --test
# Optional: show detailed tools/resources and health output
uv run mcp-server --test --detailedmacOS/Linux:
git clone https://github.com/deslicer/mcp-for-splunk.git
cd mcp-for-splunk
# (Recommended) Preview what would be installed
./scripts/smart-install.sh --dry-run
# Install missing prerequisites (base: Python, uv, Git, Node)
./scripts/smart-install.sh
# Start the MCP Server (project script)
# Local runs default to HTTP stateless mode + JSON response
uv run mcp-server --local --detached
# Verify the server
uv run mcp-server --test
# Optional: show detailed tools/resources and health output
uv run mcp-server --test --detailedπ‘ Deployment Options: The
mcp-servercommand will prompt you to choose:
Docker (Option 1): Full stack with Splunk, Traefik, MCP Inspector - recommended if Docker is installed
Local (Option 2): Lightweight FastMCP server only - for users without Docker
Stopping services:
uv run mcp-server --stopstops only this project's compose services (dev/prod/splunk). It does not stop the Docker engine.
Note on Splunk licensing: When using the
so1Splunk container, you must supply your own Splunk Enterprise license if required. The compose files include a commented example mount:# - ./lic/splunk.lic:/tmp/license/splunk.lic:ro. Create alic/directory and mount your license file, or add the license via the Splunk Web UI after startup.
π― What You Can Do
π€ AI-Powered Troubleshooting (NEW!)
Transform your Splunk troubleshooting from manual procedures to intelligent, automated workflows using the MCP server endpoints:
# Discover and execute intelligent troubleshooting workflows
result = await list_workflows.execute(ctx, format_type="summary")
# Returns: missing_data_troubleshooting, performance_analysis, custom_workflows...
# Run AI-powered troubleshooting with a single command
result = await workflow_runner.execute(
ctx=ctx,
workflow_id="missing_data_troubleshooting",
earliest_time="-24h",
latest_time="now",
focus_index="main"
)
# β Parallel execution, expert analysis, actionable recommendationsπ Key Benefits:
π§ Natural Language Interface: "Troubleshoot missing data" β automated workflow execution
β‘ Parallel Processing: Multiple diagnostic tasks run simultaneously for faster resolution
π§ Custom Workflows: Build organization-specific troubleshooting procedures
π Intelligent Analysis: AI agents follow proven Splunk best practices
π Read the Complete AI Workflows Guide β for detailed examples, workflow creation, and advanced troubleshooting techniques.
π‘οΈ ITSI MCP Server (NEW!)
A dedicated Model Context Protocol server for Splunk IT Service Intelligence ships in this repo at mcp_itsi/, released independently to PyPI as mcp-itsi-server. It targets ITSI 4.21 and adds 70 tools, 9 documentation resources, and 3 workflow prompts for managing services, entities, KPIs, episodes, glass tables, deep dives, correlation searches, and aggregation policies.
# Standalone install
pip install mcp-itsi-server
# Together with the parent server
pip install "mcp-server-for-splunk[itsi]"You can deploy it two ways with identical capabilities:
Plugin of
mcp-for-splunkβ auto-registers via themcp_splunk.pluginsPython entry point. One process, one URL, one credential set.Standalone β its own FastMCP HTTP/stdio process, behind Traefik on
/itsi/mcp(Docker), viamcp-itsi-server(local Python), or as themcp_itsiDocker image (anywhere).
Both modes share the same per-request X-Splunk-* headers as the parent server (basic auth, bearer token, splunkd session token), plus optional X-ITSI-* overrides for app/user namespace.
π ITSI Getting Started β | ποΈ ITSI Deployment Guide β | π¦ Package README β
π Documentation Hub
Document | Purpose | Audience | Time |
Intelligent workflows powered by the workflow tools | All users | 5 min | |
Complete setup guide with prerequisites | New users | 15 min | |
Connect AI clients | Developers | 30 min | |
Production deployment | DevOps | 45 min | |
Create and run workflows (OpenAI env vars) | Developers | 10 min | |
Tool documentation | Integrators | Reference | |
Access CIM data models and Splunk docs | All users | Reference | |
Add your own tools | Contributors | 60 min | |
Complete contribution framework | Contributors | 15 min | |
Technical deep-dive | Architects | Reference | |
First success test steps | Developers | 2 min | |
Extend with entry-point plugins (separate package) | Integrators | 5 min | |
Zero-to-working ITSI MCP server in 15 minutes | ITSI users | 15 min | |
Standalone vs plugin, Docker, scaling, security | DevOps / Splunk admins | 20 min |
π§ Available Tools & Capabilities
π€ AI Workflows & Specialists (NEW!)
list_workflows: Discover available troubleshooting workflows (core + contrib)workflow_runner: Execute any workflow with full parameter control and progress trackingworkflow_builder: Create custom troubleshooting procedures for your organizationBuilt-in Workflows: Missing data troubleshooting, performance analysis, and more
π Search & Analytics
Smart Search: Natural language to SPL conversion
Real-time Search: Background job management with progress tracking
Saved Searches: Create, execute, and manage search automation
π Data Discovery
Metadata Exploration: Discover indexes, sources, and sourcetypes
Schema Analysis: Understand your data structure
Usage Patterns: Identify data volume and access patterns
π₯ Administration
App Management: List, enable, disable Splunk applications
User Management: Comprehensive user and role administration
Configuration Access: Read and analyze Splunk configurations
π₯ Health Monitoring
System Health: Monitor Splunk infrastructure status
Degraded Feature Detection: Proactive issue identification
Alert Management: Track and analyze triggered alerts
π‘οΈ Splunk IT Service Intelligence (ITSI) β NEW!
The companion mcp_itsi server (standalone or plugin β see π‘οΈ ITSI MCP Server) adds 70 ITSI-specific tools:
Service Insights: services, service templates, KPI base searches, KPI threshold templates, glass tables, deep dives, home views β full CRUD plus
itsi_count_servicesanditsi_templatize_service.Entity Integration: entities, entity types, alias inventory; full CRUD with the documented schema quirks (alias fields must also live at the document root).
Event Analytics: notable events with
itsi_acknowledge_notable_event/itsi_close_notable_eventshortcuts, plus full CRUD on aggregation policies and correlation searches.Teams, maintenance windows, supported object types, and bundled docs as
itsi_*tools anditsi://docs/<slug>resources.
π¦ Browse the ITSI tool catalog β
π Client Integration Examples
πͺ Multi-Client Configuration Strength: One of the key advantages of this MCP Server for Splunk is its ability to support multiple client configurations simultaneously. You can run a single server instance and connect multiple clients with different Splunk environments, credentials, and configurations - all without restarting the server or managing separate processes.
π Multi-Client Benefits
Session-Based Isolation: Each client connection maintains its own Splunk session with independent authentication, preventing credential conflicts between different users or environments.
Dynamic Configuration: Switch between Splunk instances (on-premises, cloud, development, production) by simply changing headers - no server restart required.
Scalable Architecture: A single server can handle multiple concurrent clients, each with their own Splunk context, making it ideal for team environments, CI/CD pipelines, and multi-tenant deployments.
Resource Efficiency: Eliminates the need to run separate MCP server instances for each Splunk environment, reducing resource consumption and management overhead.
Cursor IDE
Single Tenant
{
"mcpServers": {
"splunk": {
"command": "fastmcp",
"args": ["run", "/path/to/src/server.py"],
"env": {
"MCP_SPLUNK_HOST": "your-splunk.com",
"MCP_SPLUNK_USERNAME": "your-user"
}
}
}
}Client Specified Tenant
{
"mcpServers": {
"splunk-in-docker": {
"url": "http://localhost:8002/mcp/",
"headers": {
"X-Splunk-Host": "so1",
"X-Splunk-Port": "8089",
"X-Splunk-Username": "admin",
"X-Splunk-Password": "Chang3d!",
"X-Splunk-Scheme": "http",
"X-Splunk-Verify-SSL": "false",
"X-Session-ID": "splunk-in-docker-session"
}
},
"splunk-cloud-instance": {
"url": "http://localhost:8002/mcp/",
"headers": {
"X-Splunk-Host": "myorg.splunkcloud.com",
"X-Splunk-Port": "8089",
"X-Splunk-Username": "admin@myorg.com",
"X-Splunk-Password": "Chang3d!Cloud",
"X-Splunk-Scheme": "https",
"X-Splunk-Verify-SSL": "true",
"X-Session-ID": "splunk-cloud-session"
}
}
}
}Google Agent Development Kit
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
splunk_agent = LlmAgent(
model='gemini-2.0-flash',
tools=[MCPToolset(connection_params=StdioServerParameters(
command='fastmcp',
args=['run', '/path/to/src/server.py']
))]
)π€ Community & Contribution
Quick links: Contributing Β· Code of Conduct Β· Security Policy Β· Governance Β· License
π οΈ Create Your Own Tools & Extensions
π Quick Start for Contributors:
# Interactive tool generator (project script)
uv run generate-tool
# Browse existing tools for inspiration
./contrib/scripts/list_tools.py
# Validate your tool implementation (project script)
uv run validate-tools
# Test your contribution
./contrib/scripts/test_contrib.pyπ Complete Contributing Guide β - Everything you need to know about creating tools, resources, and workflows for the MCP Server for Splunk.
Contribution Categories
π‘οΈ Security Tools: Threat hunting, incident response, security analysis
βοΈ DevOps Tools: Monitoring, alerting, operations, SRE workflows
π Analytics Tools: Business intelligence, reporting, data analysis
π‘ Example Tools: Learning templates and patterns for new contributors
π§ Custom Workflows: AI-powered troubleshooting procedures for your organization
π Deployment Options
Development (Local)
Startup Time: ~10 seconds
Resource Usage: Minimal (single Python process)
Best For: Development, testing, stdio-based AI clients
HTTP Defaults: Local runs enable
MCP_STATELESS_HTTP=trueandMCP_JSON_RESPONSE=trueby default for compatibility with Official MCP clients (no sticky sessions; JSON over SSE).Endpoint:
http://localhost:8003/mcp/Required client headers:
Accept: application/json, text/event-streamMCP-Session-ID: <uuid>(preferred;X-Session-IDoptional)X-Splunk-*headers (host, port, username, password, scheme, verify-ssl) or set via.env
Production (Docker)
Features: Load balancing, health checks, monitoring
Includes: Traefik, MCP Inspector, optional Splunk
Best For: Multi-client access, web-based AI agents
Session Routing: Traefik is configured with sticky sessions for streamable HTTP; alternatively, enable stateless HTTP for development scenarios.
Enterprise (Kubernetes)
Scalability: Horizontal scaling, high availability
Security: Pod-level isolation, secret management
Monitoring: Comprehensive observability stack
ITSI MCP Server
Plugin mode: Auto-loads into
mcp-for-splunkvia themcp_splunk.pluginsentry point β single process, single URL.Standalone mode: Dedicated FastMCP container behind Traefik at
/itsi/mcp, ormcp-itsi-serverconsole script for local Python, ormcp_itsiDocker image for any orchestrator.Auth parity: Same
X-Splunk-*headers as the parent server; optionalX-ITSI-App/X-ITSI-User-NS/X-ITSI-API-Versionfor ITSI-specific namespacing.Verification:
uv run python scripts/test_itsi_mcp_both_modes.pyexercises both modes end-to-end against any live ITSI cluster.
π Full ITSI deployment guide β
π Support & Community
π Issues: GitHub Issues
π¬ Discussions: GitHub Discussions
π Documentation: Complete guides and references
π§ Interactive Testing: MCP Inspector for real-time testing
Windows Support
Windows users get first-class support with PowerShell scripts and comprehensive troubleshooting guides. See our Windows Setup Guide.
π Project Stats
β 20+ Production Tools - Comprehensive Splunk operations
β 16 Rich Resources - System info, documentation, and CIM data models
β Comprehensive Test Suite - 170+ tests passing locally
β Multi-Platform - Windows, macOS, Linux support
β Community-Ready - Structured contribution framework
β Enterprise-Proven - Production deployment patterns
π― Ready to Get Started?
Choose your adventure:
π Quick Start - Get running in 15 minutes
π» Integration Examples - Connect your AI tools
ποΈ Architecture Guide - Understand the system
π€ Contribute - Add your own tools
Learn More: Model Context Protocol | FastMCP Framework
Maintenance
Latest Blog Posts
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/deslicer/mcp-for-splunk'
If you have feedback or need assistance with the MCP directory API, please join our Discord server