Skip to main content
Glama
balajifunny

splunk-mcp-server

by balajifunny

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


Related MCP server: Splunk MCP Server

⚑ Features

  • ⚑ Async HTTP client via httpx

  • 🧩 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 (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

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

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


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

Available Tools

7 tools
get_all_usersA

Fetch all Splunk users.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It fails to mention important traits such as potential large data volume, performance impact, authentication requirements, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no wasted text. It is appropriately sized for a simple tool and front-loaded with the key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (no parameters) and presence of an output schema, the description is mostly adequate. However, it could be enhanced by noting the return structure (e.g., list of user objects) or any pagination behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the input schema fully covers them. According to guidelines, baseline for 0 parameters is 4. The description adds no further semantics but none are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch all Splunk users,' using a specific verb and resource, and distinguishes from sibling tool get_user_info which likely fetches an individual user.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus siblings like get_user_info. Usage is implied by the name but lacks formal when-not or alternative suggestions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_knowledge_objectsC

Get knowledge objects from Splunk. Supported types include saved_searches, lookups, macros, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
typeYes
countNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It does not mention that the tool is read-only, any side effects, or limitations. The description is too brief to convey transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, using only two sentences that front-load the main purpose. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and annotations, the description is incomplete. It does not explain the return value format, any restrictions on the 'type' parameter, or how pagination works with 'count'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description should compensate. It only gives examples for the 'type' parameter and does not explain the 'count' parameter's meaning or behavior. This leaves ambiguity for the agent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get knowledge objects from Splunk') and the resource, supported by examples of types. It distinguishes from siblings like search_splunk and get_user_info by specifying a distinct resource category.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It does not mention when not to use it or direct users to sibling tools for other purposes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_log_statsC

Get log statistics for a specific index.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
time_rangeNo-1h

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral details. It only states it gets statistics, but fails to mention if it is read-only, requires permissions, or has side effects. This is insufficient for safe tool invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, efficiently conveying the core action. It is front-loaded and avoids unnecessary words, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has two parameters and no annotations, the description should provide more context about the output (e.g., what statistics are returned). While an output schema exists, the description does not bridge the gap, leaving the agent underinformed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the description does not explain the 'index' or 'time_range' parameters. Without additional meaning, the agent must rely solely on the schema, which lacks descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'log statistics for a specific index', making the purpose evident. However, it does not differentiate from sibling tools like get_splunk_indexes or search_errors, missing a chance to clarify its unique role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There is no mention of context, prerequisites, or situations where other tools like search_errors might be preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_splunk_indexesA

Get list of available Splunk indexes.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description only says 'Get list of available Splunk indexes.' It does not disclose authentication needs, rate limits, or what 'available' means, leaving the agent to infer behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Ultra-concise (7 words) and front-loaded with verb and noun. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing with output schema, the description is adequate but lacks scope detail. Sibling differentiation is missing, and the phrase 'available' is vague.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; schema coverage is 100% trivially. Baseline at 4 is appropriate since description adds no extra semantics but none are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get list' and the resource 'available Splunk indexes', distinguishing it from siblings like search_splunk or get_all_users.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (retrieve indexes before searching) but gives no explicit when-to-use or alternatives. Siblings are not mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_infoC

Get detailed information about a specific Splunk user.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It only says 'Get,' which implies read-only, but omits authentication needs, rate limits, or error conditions. Minimal disclosure for a tool without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely short (one sentence), which is efficient, but it sacrifices necessary information. Conciseness should not come at the cost of clarityβ€”here, it lacks detail on output or usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values are covered. However, the tool has sibling tools like get_all_users, and the description doesn't clarify when to use which. Also, no behavioral info given lack of annotations. Adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet the description adds little beyond the schema: it mentions 'specific Splunk user' for the username parameter but no format, constraints, or examples. Only marginal value added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Get detailed information about a specific Splunk user,' which identifies the verb and resource. It distinguishes from get_all_users by specifying 'specific' rather than 'all,' but doesn't explicitly contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies use when retrieving details on a known user, but lacks explicit guidance on when not to use it (e.g., for listing users) or alternatives. Context is clear but not fully articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_errorsC

Search for error logs across indexes.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexNo*
time_rangeNo-1h
max_countNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey behavioral traits. It does not mention that this is a read-only operation, any authentication requirements, rate limits, or potential side effects. The agent has no information beyond a basic search action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise. However, it lacks structure (e.g., no example, no parameter hints) and is too minimal to be effective. Every word earns its place, but the description would benefit from at least a second sentence about parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, no annotations) and the presence of an output schema (which is not visible), the description is incomplete. It does not cover parameter behavior, default values, or typical use cases. The agent needs more context to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the JSON schema provides no descriptions for the three parameters (index, max_count, time_range). The description adds no explanation of what these parameters do, leaving the agent to guess their meaning and acceptable values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (search) and resource (error logs) and scope (across indexes). It distinguishes from sibling tools like 'get_log_stats' and 'search_splunk' by specifying error logs, but does not explicitly differentiate from 'search_splunk' which could also search error logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as 'search_splunk' or 'get_log_stats'. There is no mention of context, prerequisites, or restrictions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_splunkC

Search Splunk logs with the given query.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
earliest_timeNo-1h
latest_timeNonow
max_countNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears full responsibility for behavioral disclosure. The description only states 'Search Splunk logs with the given query' and fails to mention any traits such as time range handling, default values, read-only nature, or performance considerations. This is insufficient for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (one sentence), but it is too brief and lacks structure that would add value. While front-loaded with the action, it does not earn its place by providing any additional information beyond the tool name and basic action. It is under-specified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters with no schema descriptions, no annotations, and an output schema, the description is severely incomplete. It does not explain parameter defaults, time range interpretation, or result limits. The agent cannot determine how to use the tool correctly from this description alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema does not explain parameter meanings. The description also fails to explain any parameters (e.g., query, earliest_time, latest_time, max_count). The agent is left to infer from parameter names alone, which is inadequate for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool searches Splunk logs with a query. It is specific about verb and resource, and distinguishes from sibling tools like get_all_users or search_errors by focusing on general search. However, it does not explicitly differentiate from search_errors, which might be a more specialized sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like search_errors. There is no mention of prerequisites, when not to use, or context for choosing this tool over others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.0
    • First observedget_all_users
    • First observedget_knowledge_objects
    • First observedget_log_stats
    • First observedget_splunk_indexes
    • First observedget_user_info
    • First observedsearch_errors
    • First observedsearch_splunk

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    This read-only MCP Server allows you to connect to Splunk data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Splunk Enterprise and Splunk Cloud instances through standardized MCP interface. Supports executing SPL queries, managing indexes and saved searches, listing applications, and retrieving server information with flexible authentication options.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A dead simple MCP server for exposing your app functions to AI agents like Claude Desktop.
    21
    5
    MIT