Логотип MCP Server for Splunk

MCP Server for Splunk

Організація
deslicer

MCP Server for integrating with Splunk Enterprise

Видавецьdeslicer
Репозиторійmcp-for-splunk
МоваPython
Форки
11
Зірки
27
Доступні інструменти
0
Тип транспортуstdio, streamable-http
Категорії
ЛіцензіяApache-2.0
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    MCP Server for Splunk надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 27, форки: 11 — у пов’язаному репозиторії.

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

📋 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:

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

One-Command Setup

Windows:

powershell
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:

bash
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-server command 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 --stop stops only this project's compose services (dev/prod/splunk). It does not stop the Docker engine.

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.

🎯 What You Can Do

🤖 Workflow Discovery & Authoring

Discover and validate Splunk troubleshooting workflow definitions (JSON) without a built-in agent runner:

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

🛡️ 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.

bash
# 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 the mcp_splunk.plugins Python entry point. One process, one URL, one credential set.
  • Standalone — its own FastMCP HTTP/stdio process, behind Traefik on /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 →

📚 Documentation Hub

DocumentPurposeAudienceTime
🤖 AI-Powered TroubleshootingIntelligent workflows powered by the workflow toolsAll users5 min
Getting StartedComplete setup guide with prerequisitesNew users15 min
Integration GuideConnect AI clientsDevelopers30 min
HTTP Client ModesSessionless vs session-scoped HTTP clientsDevelopers10 min
llms.txtLLM-oriented guide for using the MCP serverAgents5 min
AGENTS.mdInstructions for coding agents working in this repoContributors / agents5 min
Deployment GuideProduction deploymentDevOps45 min
Workflows GuideDiscover, author, and validate workflow JSONDevelopers10 min
API ReferenceTool documentationIntegratorsReference
Resources ReferenceAccess CIM data models and Splunk docsAll usersReference
ContributingAdd your own toolsContributors60 min
📖 Contrib GuideComplete contribution frameworkContributors15 min
ArchitectureTechnical deep-diveArchitectsReference
Tests Quick StartFirst success test stepsDevelopers2 min
PluginsExtend with entry-point plugins (separate package)Integrators5 min
ITSI MCP Server (Getting Started)Zero-to-working ITSI MCP server in 15 minutesITSI users15 min
ITSI MCP Server (Deployment)Standalone vs plugin, Docker, scaling, securityDevOps / Splunk admins20 min

🔧 Available Tools & Capabilities

🤖 Workflow Tools

  • list_workflows: Discover available troubleshooting workflows (core + contrib)
  • workflow_builder: Create, edit, and validate workflow JSON definitions
  • workflow_requirements: Schema and authoring guidance for workflow contributors
  • Built-in Workflows: Missing data troubleshooting, performance analysis, and more
  • 📖 Complete Workflow Guide →

🔍 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_services and itsi_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_event shortcuts, plus full CRUD on aggregation policies and correlation searches.
  • Teams, maintenance windows, supported object types, and bundled docs as itsi_* tools and itsi://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

json
{
  "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

Sessionless bearer-token (default HTTP mode) and session-scoped examples:

json
{
  "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.

Google Agent Development Kit

python
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:

bash
# 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=true and MCP_JSON_RESPONSE=true by default for Official MCP clients (no sticky sessions; JSON over SSE).
    • Endpoint: http://localhost:8003/mcp/
    • Client headers: Accept: application/json, text/event-stream plus X-Splunk-* (prefer X-Splunk-Token; or username/password)
    • Sessionless (default): omit X-Session-ID / MCP-Session-ID
    • Session-scoped: send a stable X-Session-ID when you want cached config across requests
    • Details: HTTP Client Connection Modes

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-splunk via the mcp_splunk.plugins entry point — single process, single URL.
  • Standalone mode: Dedicated FastMCP container behind Traefik at /itsi/mcp, or mcp-itsi-server console script for local Python, or mcp_itsi Docker image for any orchestrator.
  • Auth parity: Same X-Splunk-* headers as the parent server; optional X-ITSI-App / X-ITSI-User-NS / X-ITSI-API-Version for ITSI-specific namespacing.
  • Verification: 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 →

🆘 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:

Learn More: Model Context Protocol | FastMCP Framework

Встановлення

TypingMind
Передумови:

Node.js 18+

{
  "mcpServers": {
    "deslicer-mcp-for-splunk": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-for-splunk"
      ]
    }
  }
}

Використовуйте MCP MCP Server for Splunk з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення MCP Server for Splunk ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ви можете запустити MCP локально на своєму пристрої або підключитися до віддаленого сервера MCP за URL.

Варіант 1: використовуйте локальний конектор

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте MCP Server for Splunk як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP MCP Server for Splunk.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "deslicer-mcp-for-splunk": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-for-splunk"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для MCP Server for Splunk, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для MCP Server for Splunk.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через MCP Server for Splunk?
MCP Server for Splunk
Звісно. Я це прочитав.
Ось що я знайшов за допомогою MCP Server for Splunk.

Варіант 2: додайте URL сервера MCP

Виберіть цей варіант, якщо MCP Server for Splunk уже розміщено віддалено або вашій команді потрібен один спільний конектор для кількох користувачів.

1

Відкрийте конектори MCP

У TypingMind перейдіть до розділу «Плагіни», відкрийте «Конектори MCP» і виберіть «Додати URL».

  1. Відкрийте TypingMind у браузері.
  2. Перейдіть до розділу «Плагіни».
  3. Відкрийте конектори MCP.
  4. Натисніть «Додати URL».
Форма «Додати URL власного сервера MCP» у TypingMind
2

Вставте URL сервера

Введіть URL вашого сервера у поле «URL сервера». Додайте назву підключення, опис, значок, власні HTTP-заголовки або налаштування клієнта OAuth, якщо сервер їх потребує.

  1. Вставте URL вашого сервера у поле «URL сервера».
  2. Введіть назву підключення для MCP Server for Splunk.
  3. Додайте опис і значок, щоб було легше впізнати підключення.
  4. Додайте власні HTTP-заголовки або дані клієнта OAuth, якщо сервер потребує автентифікації.
3

Створіть підключення

Натисніть «Створити підключення», потім поверніться до списку плагінів і переконайтеся, що нове підключення MCP активне.

  1. Натисніть «Створити підключення».
  2. Поверніться до списку конекторів MCP.
  3. Переконайтеся, що підключення MCP Server for Splunk відображається як активне.
  4. Оновіть список плагінів, якщо підключення не з’явилося одразу.
4

Перемикайте моделі без повторного підключення

Почніть чат із бажаною моделлю, увімкніть інструменти MCP Server for Splunk у розділі «Плагіни» й за потреби перемикайтеся на іншу модель. Підключення MCP залишається доступним у робочому просторі TypingMind.

  1. Почніть новий чат у TypingMind.
  2. Виберіть модель ШІ, яку хочете використовувати.
  3. Увімкніть інструменти MCP Server for Splunk у розділі «Плагіни».
  4. За потреби попросіть модель скористатися інструментом.
  5. Перемкніться на іншу модель ШІ й використовуйте те саме підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через MCP Server for Splunk?
MCP Server for Splunk
Звісно. Я це прочитав.
Ось що я знайшов за допомогою MCP Server for Splunk.

Поширені запитання

Для чого використовується сервер MCP MCP Server for Splunk?

MCP Server for Splunk — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP MCP Server for Splunk з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати MCP Server for Splunk з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP MCP Server for Splunk із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши MCP Server for Splunk, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP MCP Server for Splunk до TypingMind?

MCP Server for Splunk можна підключити в TypingMind через локальний конектор MCP або додавши URL віддаленого сервера MCP. Використовуйте локальний конектор, коли серверу потрібен доступ до файлів, застосунків або приватних ресурсів на вашому пристрої, а URL сервера — коли сервер MCP розміщено віддалено.

Які інструменти надає MCP MCP Server for Splunk у TypingMind?

MCP Server for Splunk надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP MCP Server for Splunk?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо MCP Server for Splunk потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇