When AI Tools Turn Against You: Operationalizing MCP Server Security with the Splunk MCP TA

The Model Context Protocol (MCP) is an open-source protocol developed by Anthropic and released in November 2024 to standardize how AI applications connect to external data sources and tools. The protocol emerged from Anthropic’s work on Claude Desktop, where they recognized the need for a universal standard that would allow AI systems to integrate with various data sources, APIs, and local resources without requiring custom implementations for each integration.

The protocol became popular in the AI development community due to its focus on ease of implementation and use with local resources. MCP uses JSON-RPC 2.0 for message formatting and supports multiple transport mechanisms including stdio, HTTP with Server-Sent Events (SSE), and WebSocket connections. MCP protocol is fundamental in connecting LLM reasoning and Agentic applications.

The use of MCP protocol enables LLM’s reasoning to connect to external services, local resources, and many other tools. All this functionality and reach have also brought a series of challenges, especially when it comes to securing the use and reach of MCP enabled applications. In this blog, we approach those challenges and introduce a tool that allows security analysts to see what was not visible before. The new Splunk MCP TA aims at providing light to all the behind-the-scenes exchanges that these MCP enabled workflows produce.

New Tool Brings New Security Challenges

As LLMs are now enabled to access internal, external resources and tools via MCP protocols it is important to understand several challenges posed by this enablement:

The dynamic behavior of the usage of MCP servers cannot be anticipated or predicted, this introduces the need for strict monitoring of any prompts or instructions that may be directing the actions of these MCP enable tools and resources. In this sense MCP expands and introduces more risk and threats some of them expected to be seen at the edge (i.e firewalls, WAF) now in many cases these threats are now observed originating at the MCP layer (i.e SQL injection via interaction with MCP SQL Server).

Threats Faced by MCP Servers

Currently, there are several evolving frameworks to categorize threats one of them is the Coalition for Secure AI - Model Context Protocol Security which divides MCP Threat Surface into three categories:

Where to Begin?

As stated previously in this blog, MCP as revision of 06-18-2025, encodes all messages using JSON-RPC 2.0. The Splunk Threat Research Team (STRT) has now published a Splunk Technology Add-On (TA) which allows direct parsing of the JSON-RPC output from MCP Servers; this allows security analysts to monitor metadata from these MCP interactions. The data ingested, is parsed, and analyzed from JSON-RPC protocol messages from Model Context Protocol (MCP) servers.

This TA provides:

The following screenshot shows parsed data from a MCP file system server:

As can be observed in this screenshot, this MCP Server can perform several operations including writing files; the following screenshot shows creation of a file. It is also important to remember that many times users grant elevated permissions to the MCP server or Agents in order to perform operations. This gets even more complicated to control and monitor if you have, for example, agents using multiple MCP servers.

There are many types of MCP servers here are some examples of the most popular ones:

In the next example of data processed via Splunk MCP TA we can see that in the specific case of a Postgress SQL MCP server we can observe the actual queries performed via MCP. We can also observe that some of these queries may be malicious in nature, which brings another challenge with the use of MCP Servers. The dynamic nature of the instructions sent to the MCP server cannot be anticipated; this makes it even more risky when it comes to code generation or in this case a possible SQL injection.

To complicate matters even more in many cases semantically speaking, it is very hard to distinguish what instruction is malicious or benign as they are exactly the same instruction in a non-malicious context.

There are fundamentally three things that make MCP servers extremely dangerous, one direct and at times elevated access to internal resources (files, databases, applications), two access to external resources some of them unvetted or even vulnerable (websites, API, Internet Content), and three the ability to move data from the perimeter to outside the edge base on the granted access and privileges which sets the condition of a unknown unvetted flow of data from inside and outside of the perimeter, especially when involving Agents with multiple tools, APIs and MCP servers.

By having access to this data, we now can see and monitor data that was previously unseen and inaccessible, and using this data we can develop analytics to analyze and discover data with MCP interactions that may be malicious in nature.

Splunk Analytics

Now that we can view what happens during these MCP interactions we can also start to develop analytics to get a more detailed view of the nature of these flows of data and operations, the following are some examples of what we can see using Splunk targeting MCP operations via Splunk MCP TA.

Privilege Escalation Attempts

In the above screenshot, we can see a Postgres MCP Server with queries aiming to escalate privileges from specific users. One of the challenges of MCP is also the introduction of conventional threat vectors in a new wrapper, whereas before things such as a SQL injection could probably be seen at the edge in a WAF now it can be executed semantically using MCP servers and Agents to reach the internal or external backend.

In the next example, we can detect sensitive terms in mcp.method search_files via param.patterns field.

It is not difficult to imagine a MCP server with high privileges accessing api keys or ssh keys. This is also another example of the need for monitoring, especially when there are no official, formal or vetted MCP repositories.

Following the same logic, in the next screenshot we can see how a MCP Github Server can be potentially used to perform reconnaissance against an organization. This highlights the dangers of rogue MCP servers and hijacked Agents, as they can be used to access and exfiltrate sensitive information.

Now that we have seen firsthand the risk amplification brought by the use of MCP Servers, it is time to address how we can at the moment address or mitigate these risks.

The above items can help in the mitigation of risks brought using MCP and Agents, however there is still a lot of work to be done to establish a secure standard of MCP Servers.

The STRT  has now released a new powerful tool that allows organizations to have visibility and actionable data. STRT will also release content related to specific MCP Server threats.

Current rush and drive to adopt AI also bring significant risks that must be addressed. Proceed with caution.

Related Articles

Living Off The Land: Threat Research February 2022 Release
Security
6 Minute Read

Living Off The Land: Threat Research February 2022 Release

In this February 2022 release, the Splunk Threat Research Team (STRT) focused on comparing currently created living off the land security content with Sigma and the LOLBas project.
Staff Picks for Splunk Security Reading November 2023
Security
3 Minute Read

Staff Picks for Splunk Security Reading November 2023

Splunk security experts share their list of presentations, whitepapers, and customer case studies from November 2023 that they feel are worth a read.
Deep Dive on Persistence, Privilege Escalation Technique and Detection in Linux Platform
Security
10 Minute Read

Deep Dive on Persistence, Privilege Escalation Technique and Detection in Linux Platform

Deep dive with the Splunk Threat Research Team on Linux Privilege Escalation and Linux Persistence Techniques.