Skip to main content
Glama
balajifunny

splunk-mcp-server

by balajifunny
README.md
# splunk-mcp-server

A lightweight, extensible **Model Context Protocol (MCP)** server for **Splunk Enterprise**, designed to integrate with **Claude Desktop** or any MCP-compatible agent. Enables secure, async, chat-based interaction with your Splunk data using **FastMCP**.

---

## 🔧 Supported Tools

- `get_knowledge_objects`
- `search_splunk`
- `get_splunk_indexes`
- `get_log_stats`
- `get_all_users`
- `get_user_info`
- `search_errors`

---

## âš¡ Features

- âš¡ **Async HTTP client** via [`httpx`](https://www.python-httpx.org/)
- 🧩 **Simple plugin-style architecture** for adding tools
- 💻 Designed for **local development** or integration with Claude Desktop
- 🚀 Built with **FastMCP** and **Python 3.13**


## 🛠 Installation Guide

### 1. Install Claude Desktop
Download and install from [Anthropic Claude Desktop](https://www.anthropic.com/index/claude-desktop) (macOS only for now).

### 2. Install `uv` (Python package manager by Astral)

 sudo curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/opt" sh

### 3. Clone the repository

```bash
git clone https://github.com/balajifunny/splunk-mcp-server.git
cd splunk-mcp-server

```

### 4. Set your Splunk Configurations

Update the Splunk configuration section in main.py 

```python
SPLUNK_HOST=127.0.0.1
SPLUNK_PORT=8089
SPLUNK_USERNAME=<your_splunk_username>
SPLUNK_PASSWORD=<your_splunk_password>
SPLUNK_SCHEME=https
```

### 5. Update Claude Desktop configuration

~/Library/Application Support/Claude/claude_desktop_config.json

```json

{
  "mcpServers": {
    "splunk-mcp-demo": {
      "command": "/opt/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/Users/<your_user_name>/splunk-mcp-server/main.py"
      ]
    }
  }
}

```

TDQS

B3.1/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct resource or operation: users (all vs specific), indexes, knowledge objects, log statistics, general search, and error search. No overlapping purposes.

Naming Consistency4/5

Most tools follow 'get_' prefix (5 tools), but two use 'search_' prefix. There is a clear verb_noun pattern, though the verb varies between get and search.

Tool Count5/5

7 tools is well-scoped for a Splunk MCP server, covering essential read and search operations without being excessive or minimal.

Completeness3/5

The toolset covers core retrieval and search operations, but lacks create/update/delete for knowledge objects and users, which are common Splunk operations.

Maintenance

ActivityInactive
ResponsivenessNo issues