Skip to content
← All guides

Splunk MCP server security: what it can access

Splunk’s MCP Server app lets an AI agent run searches on your data. See its token and role controls, tool names and how to limit it in Claude Code and Codex.

5 min read

The official Splunk MCP server is the MCP Server app for Splunk platform, built by Splunk and installed from Splunkbase. Clients send an encrypted token as a bearer header, and a role needs the mcp_tool_execute capability to use it. Its main tool, splunk_run_query, runs SPL searches, so an agent can read anything the token’s user can search. Splunk’s docs say unsafe or destructive searches might not run, but they don’t list which commands are blocked.

Which server you have

Several projects use the name. This page covers the official app. Splunk’s docs say new deployments should use the Splunk MCP Server app from Splunkbase and that the older cloud endpoint is deprecated. Separately, splunk/splunk-mcp-server2 describes itself as unofficial and keeps Splunk credentials in a .env file. Check which one your team installed before you apply anything below.

How it signs in

You generate an encrypted token in the MCP Server app. Splunk’s docs say it is only displayed once, and that these tokens work only for MCP authentication, not for direct Splunk API calls. The client config uses the endpoint URL and an Authorization: Bearer <YOUR_ENCRYPTED_TOKEN> header. The endpoint is either the Splunk Web endpoint over HTTPS or /services/mcp on the management port, 8089 by default.

Capabilities control who can do what. mcp_tool_admin is required for token creation and admin settings. edit_tokens_own lets a user create a token for themselves, and edit_tokens_all lets one create a token for anyone. mcp_tool_execute goes on roles that should use the tools. An admin’s Invalidate Keys button invalidates all MCP tokens at once.

What the tools can do

Splunk’s tools page (Enterprise 2.1) lists tools by prefix. Names and tool sets change by version, so run tools/list on your server to confirm.

PrefixExamplesWhat they do
splunk_splunk_run_query, splunk_get_indexes, splunk_get_metadata, splunk_get_user_listSearch, list indexes, read metadata and user info
splunk_splunk_run_saved_search, splunk_get_knowledge_objectsRun saved searches, read knowledge objects
splunk_splunk_list_alerts, splunk_list_fired_alertsRead alert configuration and firings
saia_saia_generate_spl, saia_explain_splSplunk AI Assistant tools, if installed
o11y_, es_APM, metrics, Enterprise Security toolsDocumented separately

The docs don’t say whether any tool writes data, other than noting one observability tool is read-only. Don’t assume the rest are. A saved search can have side effects you configured earlier, so review what splunk_run_saved_search can reach.

Limit it at Splunk

  • Create the token for a dedicated user whose role can search only the indexes the task needs. Search results follow that user’s access.
  • Turn off tools you don’t need in the MCP app. Splunk’s docs say admins can enable or disable tools server-wide.
  • Use the Guardrails tab. It sets a call timeout, a default row limit and a global rate limit per 60-second window. Since version 1.3 admins can add or remove SPL commands on the allowed list.
  • The docs say splunk_run_query may stop when it runs longer than 1 minute or returns more than 1000 events.
  • Leave ssl_verify in mcp.conf at its default of true.

Risks that remain

  • Logs hold text written by users and attackers, such as user agents, error messages and form fields. An agent that reads search results can be steered by it.
  • Searches can return personal data, keys and customer records that live in your logs. Results go to your model provider.
  • A broad token turns one leaked config file into read access to your Splunk data.

Limit it in Claude Code and Codex

claude mcp add --transport http splunk https://your-splunk-host/services/mcp \
  --header "Authorization: Bearer your-token"

Keep the token out of files you commit. In Claude Code, ask before searches run. Claude Code checks deny rules first, then ask, then allow.

{
  "permissions": {
    "ask": ["mcp__splunk__splunk_run_query", "mcp__splunk__splunk_run_saved_search"]
  }
}

Use .claude/settings.json for one project or ~/.claude/settings.json for all. In Codex, put the token in an environment variable:

[mcp_servers.splunk]
url = "https://your-splunk-host/services/mcp"
bearer_token_env_var = "SPLUNK_MCP_TOKEN"
enabled_tools = ["splunk_get_indexes", "splunk_run_query"]

Checklist

  1. Confirm it is the official Splunk app.
  2. Use a dedicated user and role with narrow index access.
  3. Disable tools you don’t need in the app.
  4. Keep the token in an environment variable.
  5. Review the search history for the token’s user after a session.

Checked against the vendor documentation on November 25, 2026. MCP Server tools · Connecting and settings · Claude Code permissions · Claude Code MCP · Codex MCP

Where Excellent fits

Excellent’s free scan reads supported logs on the Mac and reports findings for review. It reads the session logs of Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code. It does not inspect MCP servers themselves. For a local report without installing an app, run the free scan. See a sample report. To see what an agent did with Splunk results, read Check what your AI agents did.

Related guides

View all