Codync
A free, open-source 1:1 alternative to Grok Bot and Muse. Message Claude Code, Codex, Cursor and 40+ coding agents as persistent bots from your iPhone, Mac or Linux desktop. Group chats, threads, appr
MCP Server for integrating with Splunk Enterprise
Developer toolsPython · ShellGitHub @deslicerSelf-installOwner unconfirmed
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Python integrations: see the package namespace migration guide.
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.
🚀 NEW: AI-Powered Troubleshooting Workflows - Transform reactive firefighting into intelligent, systematic problem-solving with specialist AI workflows.
Python 3.10 is no longer supported: the patched DNS and file-lock dependencies require Python 3.11 or newer. Upgrade Python before updating this server.
📖 Complete Setup Guide: Installation Guide
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" >> .env
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 --detailed
macOS/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.
Discover and validate Splunk troubleshooting workflow definitions (JSON) without a built-in agent runner:
# Discover available troubleshooting workflows
result = await list_workflows.execute(ctx, format_type="summary")
# Returns: missing_data_troubleshooting, performance_analysis, custom_workflows...
# Author or validate a workflow definition
result = await workflow_builder.execute(
ctx=ctx,
mode="validate",
workflow_data={"workflow_id": "my_check", "tasks": [...]},
)
OpenAI-based workflow_runner execution was removed in favor of FastMCP 4 / MCP SDK v2. Workflow JSON definitions remain available for discovery, validation, and external orchestration.
📖 Workflows Guide → for creation, templates, and contrib workflows.
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:
mcp-for-splunk — auto-registers via the mcp_splunk.plugins Python entry point. One process, one URL, one credential set./itsi/mcp (Docker), via mcp-itsi-server (local Python), or as the mcp_itsi Docker 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 →
| Document | Purpose | Audience | Time |
|---|---|---|---|
| 🤖 AI-Powered Troubleshooting | Intelligent workflows powered by the workflow tools | All users | 5 min |
| Getting Started | Complete setup guide with prerequisites | New users | 15 min |
| Integration Guide | Connect AI clients | Developers | 30 min |
| HTTP Client Modes | Sessionless vs session-scoped HTTP clients | Developers | 10 min |
| llms.txt | LLM-oriented guide for using the MCP server | Agents | 5 min |
| AGENTS.md | Instructions for coding agents working in this repo | Contributors / agents | 5 min |
| Deployment Guide | Production deployment | DevOps | 45 min |
| Workflows Guide | Discover, author, and validate workflow JSON |
list_workflows: Discover available troubleshooting workflows (core + contrib)workflow_builder: Create, edit, and validate workflow JSON definitionsworkflow_requirements: Schema and authoring guidance for workflow contributorsThe companion mcp_itsi server (standalone or plugin — see 🛡️ ITSI MCP Server) adds 70 ITSI-specific tools:
itsi_count_services and itsi_templatize_service.itsi_acknowledge_notable_event / itsi_close_notable_event shortcuts, plus full CRUD on aggregation policies and correlation searches.itsi_* tools and itsi://docs/<slug> resources.📦 Browse the ITSI tool catalog →
💪 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.
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.
{
"mcpServers": {
"splunk": {
"command": "fastmcp",
"args": ["run", "/path/to/src/mcp_server_for_splunk/server.py"],
"env": {
"MCP_SPLUNK_HOST": "your-splunk.com",
"MCP_SPLUNK_USERNAME": "your-user"
}
}
}
}
Sessionless bearer-token (default HTTP mode) and session-scoped examples:
{
"mcpServers": {
"splunk-sessionless": {
"url": "http://localhost:8003/mcp/",
"headers": {
"X-Splunk-Host": "myorg.splunkcloud.com",
"X-Splunk-Port": "8089",
"X-Splunk-Token": "eyJraWQiOiJzcGx1bmsuc2VjcmV0...",
"X-Splunk-Scheme": "https",
"X-Splunk-Verify-SSL": "true"
}
},
"splunk-in-docker": {
"url": "http://localhost:8003/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"
}
}
}
}
See HTTP Client Connection Modes for both approaches.
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/mcp_server_for_splunk/server.py']
))]
)
Quick links: Contributing · Code of Conduct · Security Policy · Governance · License
🚀 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.
MCP_STATELESS_HTTP=true and MCP_JSON_RESPONSE=true by default for Official MCP clients (no sticky sessions; JSON over SSE).
http://localhost:8003/mcp/Accept: application/json, text/event-stream plus X-Splunk-* (prefer X-Splunk-Token; or username/password)X-Session-ID / MCP-Session-IDX-Session-ID when you want cached config across requestsmcp-for-splunk via the mcp_splunk.plugins entry point — single process, single URL./itsi/mcp, or mcp-itsi-server console script for local Python, or mcp_itsi Docker image for any orchestrator.X-Splunk-* headers as the parent server; optional X-ITSI-App / X-ITSI-User-NS / X-ITSI-API-Version for ITSI-specific namespacing.uv run python scripts/test_itsi_mcp_both_modes.py exercises both modes end-to-end against any live ITSI cluster.📖 Full ITSI deployment guide →
Windows users get first-class support with PowerShell scripts and comprehensive troubleshooting guides. See our Windows Setup Guide.
Choose your adventure:
Learn More: Model Context Protocol | FastMCP Framework
| Developers |
| 10 min |
| API Reference | Tool documentation | Integrators | Reference |
| Resources Reference | Access CIM data models and Splunk docs | All users | Reference |
| Contributing | Add your own tools | Contributors | 60 min |
| 📖 Contrib Guide | Complete contribution framework | Contributors | 15 min |
| Architecture | Technical deep-dive | Architects | Reference |
| Tests Quick Start | First success test steps | Developers | 2 min |
| Plugins | Extend with entry-point plugins (separate package) | Integrators | 5 min |
| ITSI MCP Server (Getting Started) | Zero-to-working ITSI MCP server in 15 minutes | ITSI users | 15 min |
| ITSI MCP Server (Deployment) | Standalone vs plugin, Docker, scaling, security | DevOps / Splunk admins | 20 min |