<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sunny Raghvendra Singh</title>
    <description>The latest articles on DEV Community by Sunny Raghvendra Singh (@beartester34).</description>
    <link>https://dev.to/beartester34</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4281181%2F068784da-ac8c-47b9-abf4-1e0d9e7fcab8.jpg</url>
      <title>DEV Community: Sunny Raghvendra Singh</title>
      <link>https://dev.to/beartester34</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/beartester34"/>
    <language>en</language>
    <item>
      <title>Reading MCP honeypot traffic with Python: 63 initialize requests, no tool calls</title>
      <dc:creator>Sunny Raghvendra Singh</dc:creator>
      <pubDate>Thu, 03 Dec 2026 18:12:34 +0000</pubDate>
      <link>https://dev.to/beartester34/reading-mcp-honeypot-traffic-with-python-63-initialize-requests-no-tool-calls-2m11</link>
      <guid>https://dev.to/beartester34/reading-mcp-honeypot-traffic-with-python-63-initialize-requests-no-tool-calls-2m11</guid>
      <description>&lt;p&gt;The MCP slice of my honeypot dataset contains 369 records from 1–28 November 2026. Of those, 63 contain a JSON-RPC &lt;code&gt;initialize&lt;/code&gt; request. None of the parsed messages calls &lt;code&gt;tools/list&lt;/code&gt; or &lt;code&gt;tools/call&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can reproduce that result from a single &lt;strong&gt;21,644-byte Parquet file&lt;/strong&gt;—about 22 KB. This walkthrough uses Python and DuckDB to read it, count the methods and plot the activity by day. The &lt;a href="https://github.com/beartester34/bearbuilds-honeynet/tree/main/examples/mcp-parquet" rel="noopener noreferrer"&gt;complete example is on GitHub&lt;/a&gt;.[1]&lt;/p&gt;

&lt;p&gt;The part that needs care is small but easy to miss: &lt;code&gt;request["method"]&lt;/code&gt; and the &lt;code&gt;method&lt;/code&gt; inside its body mean different things.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it first
&lt;/h2&gt;

&lt;p&gt;From the repository root, with Python 3.10 or later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;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
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;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.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also writes &lt;code&gt;summary.json&lt;/code&gt; and &lt;code&gt;daily.csv&lt;/code&gt;. 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two JSON layers, two meanings of “method”
&lt;/h2&gt;

&lt;p&gt;The Parquet columns include &lt;code&gt;timestamp&lt;/code&gt;, &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt; and &lt;code&gt;request&lt;/code&gt;. The &lt;code&gt;event&lt;/code&gt; and &lt;code&gt;request&lt;/code&gt; values are JSON stored as text because their contents vary between services.[2]&lt;/p&gt;

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

&lt;p&gt;For a row whose body is valid JSON, the counting step is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"jsonrpc"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"2.0"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;method&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;method_counts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

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

&lt;h2&gt;
  
  
  Keep the bodies you cannot parse visible
&lt;/h2&gt;

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

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Body classification&lt;/th&gt;
&lt;th&gt;Records&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Contains a JSON-RPC method&lt;/td&gt;
&lt;td&gt;63&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Empty body&lt;/td&gt;
&lt;td&gt;262&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No body field&lt;/td&gt;
&lt;td&gt;43&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Invalid JSON&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;p&gt;All 63 recognised JSON-RPC methods are &lt;code&gt;initialize&lt;/code&gt;. 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]&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the other records?
&lt;/h2&gt;

&lt;p&gt;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 &lt;code&gt;unexpected_tls_on_http&lt;/code&gt; and 18 &lt;code&gt;malformed_request&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;The daily chart uses these same three categories, so their counts add up to the file total:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnvar8n7sjpvoox8uy1kf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnvar8n7sjpvoox8uy1kf.png" alt="Daily MCP records in UTC, separated into JSON-RPC initialization records, other records with a method and records without a method." width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;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.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To regenerate the chart and an article preview after running the analysis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.venv-mcp/bin/python examples/mcp-parquet/build_preview.py --offline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;examples/mcp-parquet/preview/index.html&lt;/code&gt;. The SVG, PNG and underlying daily table are in &lt;code&gt;examples/mcp-parquet/results/&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A fixed input makes this easier to check
&lt;/h2&gt;

&lt;p&gt;The file is pinned to Hugging Face revision &lt;code&gt;bbde1f0cec93b9225a752474e2bf54b9e3300abd&lt;/code&gt;, with this SHA-256 from the published manifest:[3]&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dc408d2bcd4827a30d9481a70ba35944cd35e9a3d9e390e04664fc645692f98f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;.venv-mcp/bin/python -m unittest discover \
  -s examples/mcp-parquet -p &lt;span class="s1"&gt;'test_*.py'&lt;/span&gt; -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h2&gt;
  
  
  What this result can tell us
&lt;/h2&gt;

&lt;p&gt;This is four weeks of retained records from one decoy on one IP. An incoming &lt;code&gt;initialize&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/datasets/firstlightdog/bearbuilds-honeynet/blob/bbde1f0cec93b9225a752474e2bf54b9e3300abd/parquet/ai-traps/mcp.parquet" rel="noopener noreferrer"&gt;MCP Parquet file at the exact revision used here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/datasets/firstlightdog/bearbuilds-honeynet/blob/bbde1f0cec93b9225a752474e2bf54b9e3300abd/README.md" rel="noopener noreferrer"&gt;Dataset card: format, overlapping extracts, sanitisation and limitations&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/datasets/firstlightdog/bearbuilds-honeynet/blob/bbde1f0cec93b9225a752474e2bf54b9e3300abd/parquet/PARQUET-MANIFEST.csv" rel="noopener noreferrer"&gt;Parquet manifest: sizes, row counts and checksums&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/beartester34/bearbuilds-honeynet/tree/main/examples/mcp-parquet" rel="noopener noreferrer"&gt;Runnable example and source code&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://doi.org/10.5281/zenodo.24705488" rel="noopener noreferrer"&gt;Bear Builds Honeynet v1.0.0, Zenodo DOI 10.5281/zenodo.24705488&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;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.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>security</category>
      <category>mcp</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
