DEV Community

Sunny Raghvendra Singh
Sunny Raghvendra Singh

Posted on

Reading MCP honeypot traffic with Python: 63 initialize requests, no tool calls

The MCP slice of my honeypot dataset contains 369 records from 1–28 November 2026. Of those, 63 contain a JSON-RPC initialize request. None of the parsed messages calls tools/list or tools/call.

You can reproduce that result from a single 21,644-byte Parquet file—about 22 KB. This walkthrough uses Python and DuckDB to read it, count the methods and plot the activity by day. The complete example is on GitHub.[1]

The part that needs care is small but easy to miss: request["method"] and the method inside its body mean different things.

Run it first

From the repository root, with Python 3.10 or later:

python3 -m venv .venv-mcp
.venv-mcp/bin/python -m pip install -r examples/mcp-parquet/requirements.txt
.venv-mcp/bin/python examples/mcp-parquet/analyze_mcp.py \
  --output-dir examples/mcp-parquet/results
Enter fullscreen mode Exit fullscreen mode

The script downloads the MCP file from a fixed Hugging Face revision and checks its size and SHA-256 before reading it. Later runs reuse the checked local copy. Among the output, you should see:

Records: 369; method field present: 326; absent: 43.
JSON-RPC request records/messages: 63/63.
Methods: initialize=63, tools/list=0, tools/call=0; initialization source IPs=61.
Enter fullscreen mode Exit fullscreen mode

It also writes summary.json and daily.csv. The first contains the counts and source details. The second contains all 28 UTC dates, including zeros for categories with no records on a particular day.

The script treats the captured text as data. It does not execute commands from a body, visit logged URLs or look up the recorded IP addresses.

Two JSON layers, two meanings of “method”

The Parquet columns include timestamp, service, event and request. The event and request values are JSON stored as text because their contents vary between services.[2]

Decoding request gets you the logged request object. Its method is the transport-level value, usually something like GET or POST. For the MCP messages here, its body contains another JSON string. Decode that, and you can inspect the JSON-RPC method: initialize, for example.

For a row whose body is valid JSON, the counting step is:

request = json.loads(row["request"])
body = json.loads(request["body"])
messages = body if isinstance(body, list) else [body]

for message in messages:
    if isinstance(message, dict) and message.get("jsonrpc") == "2.0":
        method = message.get("method")
        if isinstance(method, str) and method:
            method_counts[method] += 1
Enter fullscreen mode Exit fullscreen mode

Why bother with the second decode? Because grep initialize counts a matching line regardless of where the word appears. A body could mention tools/call inside a parameter without making that call. Checking the actual field answers the narrower question we care about.

The list handling matters too. A JSON-RPC batch could put several messages into one logged body. The example keeps record counts and message counts separate. They happen to be equal here: 63 records contain 63 matching messages.

Keep the bodies you cannot parse visible

The snippet above starts with valid JSON. The full script has to account for everything else too. Across all 369 records, it finds:

Body classification Records
Contains a JSON-RPC method 63
Empty body 262
No body field 43
Invalid JSON 1

This is why the result says zero tool calls among the parsed messages. There is one body we cannot parse as JSON; it stays in the output as an explicit category.

All 63 recognised JSON-RPC methods are initialize. None of those 63 bodies is marked as truncated. They come from 61 source IPs, and all carry the same user-agent string identifying itself as Infrawatch. No IP in that initialization group appears on more than one UTC date in this extract.[1]

What are the other records?

Looking only at JSON-RPC would leave 306 rows unexplained. Of those, 263 have a logged method but no recognised JSON-RPC message. The remaining 43 have no method: 25 are labelled unexpected_tls_on_http and 18 malformed_request.

There is another useful detail in the method field: one value is t3. A populated field does not guarantee a valid HTTP request. I therefore count records, rather than treating the file as 369 valid HTTP requests or completed sessions.[1]

The daily chart uses these same three categories, so their counts add up to the file total:

Daily MCP records in UTC, separated into JSON-RPC initialization records, other records with a method and records without a method.

1–28 November 2026, UTC. A zero means no retained records in that category on that date. It does not establish whether the sensor was continuously available.

To regenerate the chart and an article preview after running the analysis:

.venv-mcp/bin/python examples/mcp-parquet/build_preview.py --offline
Enter fullscreen mode Exit fullscreen mode

Open examples/mcp-parquet/preview/index.html. The SVG, PNG and underlying daily table are in examples/mcp-parquet/results/.

A fixed input makes this easier to check

The file is pinned to Hugging Face revision bbde1f0cec93b9225a752474e2bf54b9e3300abd, with this SHA-256 from the published manifest:[3]

dc408d2bcd4827a30d9481a70ba35944cd35e9a3d9e390e04664fc645692f98f
Enter fullscreen mode Exit fullscreen mode

The CLI stops if the checksum or expected results differ. The tests cover actual methods versus nested text, batches, malformed bodies, UTC date boundaries and checksum failures:

.venv-mcp/bin/python -m unittest discover \
  -s examples/mcp-parquet -p 'test_*.py' -v
Enter fullscreen mode Exit fullscreen mode

If you extend the analysis to other traps, keep the dataset layout in mind. The ai_traps files overlap the full monthly events files. Choose one representation for a count; adding both together duplicates records.[2]

What this result can tell us

This is four weeks of retained records from one decoy on one IP. An incoming initialize request does not prove a completed MCP session. A shared user-agent does not verify one scanner’s identity, and IP addresses do not identify people. The logs also cannot establish that the senders were AI agents, why they sent the requests, or that exposing an MCP service is safe.

What they do support is specific: the published, parsed messages contain initialization attempts and no requests to list or call tools. The example gives you the counts, the unparseable cases and the daily breakdown to inspect that claim yourself.

Sources

  1. MCP Parquet file at the exact revision used here.
  2. Dataset card: format, overlapping extracts, sanitisation and limitations.
  3. Parquet manifest: sizes, row counts and checksums.
  4. Runnable example and source code.
  5. Bear Builds Honeynet v1.0.0, Zenodo DOI 10.5281/zenodo.24705488.

Data: Sunny Raghvendra Singh, Bear Builds Honeynet v1.0.0, CC BY 4.0. I used AI assistance for the writing and example code. The results above were checked by running the analysis against the pinned public Parquet file.

Top comments (0)