MCP Server for Splunk

MCP Server for Splunk

Enables 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.

Category
访问服务器

README

<div style="display: flex; justify-content: space-between; align-items: flex-start; width: 100%; padding: 1em 0;"> <!-- Logo --> <div> <img align="left" src="media/deslicer_white.svg" alt="Deslicer" width="200"> </div> </div>

MCP Server for Splunk

FastMCP Python Docker MCP Tests Passing Community License

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, 14 resources, 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.

📋 Table of Contents

<a name="quick-start"></a>

🚀 Quick Start

<a name="prerequisites"></a>

Prerequisites

  • Python 3.10+ and UV package manager
  • Docker (optional but recommended for full stack)
  • Splunk instance with API access (or use included Docker Splunk)

📖 Complete Setup Guide: Installation Guide

<a name="configuration"></a>

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)

<a name="one-command-setup"></a>

One-Command Setup

Windows:

git clone https://github.com/deslicer/mcp-server-for-splunk.git
cd mcp-server-for-splunk
.\scripts\build_and_run.ps1

macOS/Linux:

git clone https://github.com/deslicer/mcp-server-for-splunk.git
cd mcp-server-for-splunk
./scripts/build_and_run.sh

# Optional: install Docker on Linux if needed
# curl -fsSL https://get.docker.com -o install-docker.sh && sudo sh install-docker.sh
# Or use the bundled helper script
# ./scripts/get-docker.sh --dry-run

💡 Deployment Options: The script 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

Note on Splunk licensing: When using the so1 Splunk 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 a lic/ directory and mount your license file, or add the license via the Splunk Web UI after startup.

<a name="what-you-can-do"></a>

🎯 What You Can Do

<a name="ai-powered-troubleshooting-new"></a>

🤖 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.

<a name="documentation-hub"></a>

📚 Documentation Hub

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
Deployment Guide Production deployment DevOps 45 min
Workflows Guide Create and run workflows (OpenAI env vars) Developers 10 min
API Reference Tool documentation Integrators 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

<a name="available-tools--capabilities"></a>

🔧 Available Tools & Capabilities

<a name="ai-workflows--specialists-new"></a>

🤖 AI Workflows & Specialists (NEW!)

  • list_workflows: Discover available troubleshooting workflows (core + contrib)
  • workflow_runner: Execute any workflow with full parameter control and progress tracking
  • workflow_builder: Create custom troubleshooting procedures for your organization
  • Built-in Workflows: Missing data troubleshooting, performance analysis, and more
  • 📖 Complete Workflow Guide →

<a name="search--analytics"></a>

🔍 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

<a name="data-discovery"></a>

📊 Data Discovery

  • Metadata Exploration: Discover indexes, sources, and sourcetypes
  • Schema Analysis: Understand your data structure
  • Usage Patterns: Identify data volume and access patterns

<a name="administration"></a>

👥 Administration

  • App Management: List, enable, disable Splunk applications
  • User Management: Comprehensive user and role administration
  • Configuration Access: Read and analyze Splunk configurations

<a name="health-monitoring"></a>

🏥 Health Monitoring

  • System Health: Monitor Splunk infrastructure status
  • Degraded Feature Detection: Proactive issue identification
  • Alert Management: Track and analyze triggered alerts

<a name="client-integration-examples"></a>

🌐 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.

<a name="multi-client-benefits"></a>

🔄 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.

<a name="cursor-ide"></a>

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"
        }
    }
  }
}

<a name="google-agent-development-kit"></a>

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']
    ))]
)

<a name="community--contribution"></a>

🤝 Community & Contribution

Quick links: Contributing · Code of Conduct · Security Policy · Governance · License

<a name="create-your-own-tools--extensions"></a>

🛠️ Create Your Own Tools & Extensions

🚀 Quick Start for Contributors:

# Interactive tool generator (recommended for beginners)
./contrib/scripts/generate_tool.py

# Browse existing tools for inspiration
./contrib/scripts/list_tools.py

# Validate your tool implementation
./contrib/scripts/validate_tools.py

# 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.

<a name="contribution-categories"></a>

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

<a name="deployment-options"></a>

🚀 Deployment Options

<a name="development-local"></a>

Development (Local)

  • Startup Time: ~10 seconds
  • Resource Usage: Minimal (single Python process)
  • Best For: Development, testing, stdio-based AI clients

<a name="production-docker"></a>

Production (Docker)

  • Features: Load balancing, health checks, monitoring
  • Includes: Traefik, MCP Inspector, optional Splunk
  • Best For: Multi-client access, web-based AI agents

<a name="enterprise-kubernetes"></a>

Enterprise (Kubernetes)

  • Scalability: Horizontal scaling, high availability
  • Security: Pod-level isolation, secret management
  • Monitoring: Comprehensive observability stack

<a name="support--community"></a>

🆘 Support & Community

  • 🐛 Issues: GitHub Issues
  • 💬 Discussions: GitHub Discussions
  • 📖 Documentation: Complete guides and references
  • 🔧 Interactive Testing: MCP Inspector for real-time testing

<a name="windows-support"></a>

Windows Support

Windows users get first-class support with PowerShell scripts and comprehensive troubleshooting guides. See our Windows Setup Guide.

<a name="project-stats"></a>

📈 Project Stats

  • 20+ Production Tools - Comprehensive Splunk operations
  • 14 Rich Resources - System info and documentation access
  • Comprehensive Test Suite - 170+ tests passing locally
  • Multi-Platform - Windows, macOS, Linux support
  • Community-Ready - Structured contribution framework
  • Enterprise-Proven - Production deployment patterns

<a name="ready-to-get-started"></a>

🎯 Ready to Get Started?

Choose your adventure:

Learn More: Model Context Protocol | FastMCP Framework

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选