<?xml version="1.0" encoding="utf-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><script src="https://www.rss.style/js/atom-style.js" xmlns="http://www.w3.org/1999/xhtml"/><title>Tower of Kubes</title><link rel="self" type="application/atom+xml" hreflang="en" href="https://www.towerofkubes.com/tags/mcp/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://www.towerofkubes.com/tags/mcp/"/><link rel="alternate" type="application/rss+xml" hreflang="en" href="https://www.towerofkubes.com/tags/mcp/index.xml"/><id>/</id><updated>2025-11-16T00:00:00Z</updated><author><name>Ro'i Bandel</name></author><generator>Hugo 0.157.0</generator><entry><title>Chrome DevTools MCP server</title><link rel="alternate" type="text/html" hreflang="en" href="https://www.towerofkubes.com/articles/chrome-devtools-mcp/"/><id>https://www.towerofkubes.com/articles/chrome-devtools-mcp/</id><updated>2025-11-16T00:00:00Z</updated><summary type="html">Comparison of Playwright MCP server vs. Chrome DevTools MCP server</summary><content type="html"><![CDATA[<p>I have recently been using <a href="https://github.com/ChromeDevTools/chrome-devtools-mcp"  target="_blank" rel="noreferrer">Chrome DevTools MCP server</a> (which I tend to call Chrome MCP) to work on personal projects, notably <a href="https://github.com/CALMe25"  target="_blank" rel="noreferrer">CALMe</a>. In my first day of using MCP, I added <a href="https://github.com/microsoft/playwright-mcp"  target="_blank" rel="noreferrer">Playwright MCP server</a> to my <code>.mcp.json</code>. Both Playwright MCP and Chrome DevTools are MCP <em>servers</em> that work in similar ways, they give MCP <em>clients</em> (<a href="/articles/agentic-cli-tools-comparison/" >agentic CLI tools</a>) various tools that give the ability to browse web pages, click on buttons, read console logs and even “see” how the web page looks by allowing the client to take screenshots/snapshots. Playwright MCP is based on the <a href="https://github.com/microsoft/playwright"  target="_blank" rel="noreferrer">Playwright</a> framework for Web Testing and Automation, and is developed by Microsoft. Chrome DevTools MCP is based on the world’s most popular browser, and specifically its <a href="https://developer.chrome.com/docs/devtools"  target="_blank" rel="noreferrer">DevTools</a>, and is developed by Google. Two big tech giants, which means these MCPs are well developed.</p>

<h2 class="relative group">The comment that prompted me to try Chrome DevTools MCP
    <div id="the-comment-that-prompted-me-to-try-chrome-devtools-mcp" class="anchor"></div>
    
</h2>
<p>While Playwright MCP was working okay for me, I saw that Chrome DevTools was released after and wondered if it’s any better.</p>
<p>A comment from this thread (which I also linked in Cool MCP Servers) prompted me to try it: <a href="https://www.reddit.com/r/ClaudeCode/comments/1olhiam/what_mcps_are_you_using_with_claude_code_right_now/#nmkg5oz"  target="_blank" rel="noreferrer">What MCPs are you using with Claude Code right now? : r/ClaudeCode</a></p>

    <div class="admonition question">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>
        <span>Question</span>
      </div>
      <div class="admonition-content">
        <p>What’s the advantage of chrome devtools vs playwright mcp?</p>
      </div>
    </div><hr>

    <div class="admonition conclusion">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM288 368a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm211.3-43.3c-6.2-6.2-16.4-6.2-22.6 0L416 385.4l-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l40 40c6.2 6.2 16.4 6.2 22.6 0l72-72c6.2-6.2 6.2-16.4 0-22.6z"/></svg>
        <span>Conclusion</span>
      </div>
      <div class="admonition-content">
        <p>Faster, more capable. Reads the console logs, and can execute scripts. The long screenshots are great too</p>
<p>I used to use playwright but Chrome dev tools blew me away</p>
      </div>
    </div>
<h2 class="relative group">Guide: Using Chrome DevTools MCP
    <div id="guide-using-chrome-devtools-mcp" class="anchor"></div>
    
</h2>

<h3 class="relative group">Claude Code
    <div id="claude-code" class="anchor"></div>
    
</h3>
<p><strong>At the project level, run:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">claude mcp add --scope project chrome-devtools npx chrome-devtools-mcp@latest</span></span></code></pre></div></div>
<p><strong>This configures the following in the <code>.mcp.json</code> file:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">"mcpServers"</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">"chrome-devtools"</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">      <span class="nt">"type"</span><span class="p">:</span> <span class="s2">"stdio"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="nt">"command"</span><span class="p">:</span> <span class="s2">"npx"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="nt">"args"</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl">        <span class="s2">"chrome-devtools-mcp@latest"</span>
</span></span><span class="line"><span class="cl">      <span class="p">],</span>
</span></span><span class="line"><span class="cl">      <span class="nt">"env"</span><span class="p">:</span> <span class="p">{}</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<p>Then simply open a new instance of <code>claude</code> and confirm that you trust the folder and MCP server. Run the <code>/mcp</code> slash command to verify that the MCP server appears as “✔ connected”.</p>
<p>To use the MCP server, I simply tell Claude something like “use chrome mcp to test and troubleshoot website x”. I would add more context depending on the specific task, but in general this is enough to let Claude know that it can use this MCP server.</p>

<h3 class="relative group">Codex CLI
    <div id="codex-cli" class="anchor"></div>
    
</h3>
<p>The Codex CLI sandbox makes working with Chrome DevTools MCP more challenging, though I managed to make it work (<strong>Source:</strong> <a href="https://github.com/ChromeDevTools/chrome-devtools-mcp?tab=readme-ov-file#connecting-to-a-running-chrome-instance"  target="_blank" rel="noreferrer">Connecting to a running Chrome instance | ChromeDevTools/chrome-devtools-mcp: Chrome DevTools for coding agents</a>).</p>
<p><strong>Run the following command:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest --browser-url<span class="o">=</span><span class="s2">"http://127.0.0.1:9222"</span></span></span></code></pre></div></div>
<p><strong>In addition, if live websites need to be tested, allow network access by adding the following lines to the global Codex config:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">mcp_servers</span><span class="p">.</span><span class="nx">chrome-devtools</span><span class="p">]</span> 
</span></span><span class="line"><span class="cl"><span class="nx">command</span> <span class="p">=</span> <span class="s2">"npx"</span> 
</span></span><span class="line"><span class="cl"><span class="nx">args</span> <span class="p">=</span> <span class="p">[</span><span class="s2">"chrome-devtools-mcp@latest"</span><span class="p">,</span> <span class="s2">"--browser-url=http://127.0.0.1:9222"</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">sandbox_workspace_write</span><span class="p">]</span> 
</span></span><span class="line"><span class="cl"><span class="nx">network_access</span> <span class="p">=</span> <span class="kc">true</span> </span></span></code></pre></div></div>
<p><strong>Now, every time we want to use Codex CLI with Chrome DevTools MCP, we must first run this command in the background:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">nohup /usr/bin/google-chrome --remote-debugging-port<span class="o">=</span><span class="m">9222</span> --user-data-dir<span class="o">=</span>/tmp/chrome-debug-headful --no-first-run --disable-gpu about:blank >/tmp/chrome-launch.log 2><span class="p">&</span><span class="m">1</span></span></span></code></pre></div></div>

<h3 class="relative group">Gemini CLI
    <div id="gemini-cli" class="anchor"></div>
    
</h3>
<p><strong>At the project level, run:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">gemini mcp add chrome-devtools npx chrome-devtools-mcp@latest</span></span></code></pre></div></div>
<p><strong>This configures the following project settings:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">"mcpServers"</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">"chrome-devtools"</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">      <span class="nt">"command"</span><span class="p">:</span> <span class="s2">"npx"</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="nt">"args"</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl">        <span class="s2">"chrome-devtools-mcp@latest"</span>
</span></span><span class="line"><span class="cl">      <span class="p">]</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>

<h3 class="relative group">Other MCP clients
    <div id="other-mcp-clients" class="anchor"></div>
    
</h3>
<p>Follow the instructions in <a href="https://github.com/ChromeDevTools/chrome-devtools-mcp?tab=readme-ov-file#mcp-client-configuration"  target="_blank" rel="noreferrer">MCP Client configuration | ChromeDevTools/chrome-devtools-mcp: Chrome DevTools for coding agents</a>.</p>
<hr>
<p><em>Featured image by <a href="https://unsplash.com/@growtika?utm_source=hugo&utm_medium=referral"  target="_blank" rel="noreferrer">Growtika</a> on <a href="https://unsplash.com/?utm_source=hugo&utm_medium=referral"  target="_blank" rel="noreferrer">Unsplash</a>.</em></p>
]]></content><author><name>Ro'i Bandel</name></author><category term="chrome" label="Chrome" scheme="https://www.towerofkubes.com/tags/chrome/"/><category term="browser" label="Browser" scheme="https://www.towerofkubes.com/tags/browser/"/><category term="ai" label="Ai" scheme="https://www.towerofkubes.com/tags/ai/"/><category term="tools" label="Tools" scheme="https://www.towerofkubes.com/tags/tools/"/><category term="agents" label="Agents" scheme="https://www.towerofkubes.com/tags/agents/"/><category term="mcp" label="Mcp" scheme="https://www.towerofkubes.com/tags/mcp/"/><category term="google" label="Google" scheme="https://www.towerofkubes.com/tags/google/"/><published>2025-11-16T00:00:00Z</published></entry><entry><title>MCP Security</title><link rel="alternate" type="text/html" hreflang="en" href="https://www.towerofkubes.com/articles/mcp-security/"/><id>https://www.towerofkubes.com/articles/mcp-security/</id><updated>2025-11-04T00:00:00Z</updated><summary type="html">How to harden MCP security: real-world horror stories, supply-chain risks, malicious servers, and practical defenses for agentic CLI tools.</summary><content type="html"><![CDATA[<p><a href="https://zivawernick.wixstudio.com/home"  target="_blank" rel="noreferrer">Ziva Wernick</a> did a Google AI workshop today and learned about MCP. She raised valuable concerns about MCP security and privacy.</p>
<ol>
<li><strong>Security:</strong> Has to do with the security risk of using MCP servers, and the possibility of those servers to facilitate malicious actions.</li>
<li><strong>Privacy:</strong> Has to do with AI tools constantly collecting private information. In some cases there may be an option to opt-out, or pay for an enterprise license that limits what the provider can do with the data.</li>
</ol>
<p>I will focus on <strong>Security</strong> in regards to how it works with <a href="/articles/agentic-cli-tools-comparison/" >agentic CLI tools</a> and MCP servers.</p>

<h2 class="relative group">MCP Horror Stories
    <div id="mcp-horror-stories" class="anchor"></div>
    
</h2>
<p><a href="https://www.docker.com/blog/"  target="_blank" rel="noreferrer">Docker Blog</a> wrote a series called <strong>MCP Horror Stories</strong>:</p>
<ol>
<li><strong>Part 1:</strong> <a href="https://www.docker.com/blog/mcp-security-issues-threatening-ai-infrastructure/"  target="_blank" rel="noreferrer">MCP Security Issues Threatening AI Infrastructure | Docker</a></li>
<li><strong>Part 2:</strong> <a href="https://www.docker.com/blog/mcp-horror-stories-the-supply-chain-attack/"  target="_blank" rel="noreferrer">MCP Horror Stories: The Supply Chain Attack | Docker</a></li>
<li><strong>Part 3:</strong> <a href="https://www.docker.com/blog/mcp-horror-stories-github-prompt-injection/"  target="_blank" rel="noreferrer">The GitHub Prompt Injection Data Heist | Docker</a></li>
<li><strong>Part 4:</strong> <a href="https://www.docker.com/blog/mpc-horror-stories-cve-2025-49596-local-host-breach/"  target="_blank" rel="noreferrer">MCP Horror Stories: The Drive-By Localhost Breach | Docker</a></li>
</ol>
<p>Unrelated to Docker, there’s also this article that features “Five Horror Stories That Actually Happened”: <a href="https://www.ajeetraina.com/the-day-i-told-800-engineers-their-ai-dreams-could-become-security-nightmares/"  target="_blank" rel="noreferrer">The Day I Told 800+ Engineers Their AI Dreams Could Become Security Nightmares</a></p>

    <div class="admonition abstract">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"/></svg>
        <span>Five Horror Stories That Actually Happened 😱</span>
      </div>
      <div class="admonition-content">
        <ol>
<li>The GitHub Data Heist (CVSS: 9.6/10)</li>
<li>The mcp-remote Catastrophe (437,000 Environments Compromised)</li>
<li>Container Escape via Tool Poisoning (CVSS: 9.4/10)</li>
<li>The Great Secrets Exposure</li>
<li>WhatsApp MCP Shadowing</li>
</ol>
      </div>
    </div><hr>

    <div class="admonition info">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>
        <span>For more information on each “horror story”, read the full article:</span>
      </div>
      <div class="admonition-content">
        <p><a href="https://www.ajeetraina.com/the-day-i-told-800-engineers-their-ai-dreams-could-become-security-nightmares/"  target="_blank" rel="noreferrer">The Day I Told 800+ Engineers Their AI Dreams Could Become Security Nightmares</a></p>
      </div>
    </div>
<h2 class="relative group">First Malicious MCP in the Wild
    <div id="first-malicious-mcp-in-the-wild" class="anchor"></div>
    
</h2>
<p>On 2025-09-25, <a href="https://www.koi.ai/blog"  target="_blank" rel="noreferrer">Koi Blog</a> wrote this article: <a href="https://www.koi.ai/blog/postmark-mcp-npm-malicious-backdoor-email-theft"  target="_blank" rel="noreferrer">First Malicious MCP in the Wild: The Postmark Backdoor That’s Stealing Your Emails | Koi Blog</a></p>

    <div class="admonition quote">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z"/></svg>
        <span>Quote</span>
      </div>
      <div class="admonition-content">
        <p><code>postmark-mcp</code> - downloaded <strong>1,500 times every single week</strong>, integrated into hundreds of developer workflows. Since version <code>1.0.16</code>, it’s been quietly copying every email to the developer’s personal server. I’m talking password resets, invoices, internal memos, confidential documents - everything.</p>
<p>This is the <strong>world’s first sighting of a real world malicious MCP server</strong>. The attack surface for endpoint supply chain attacks is slowly becoming the enterprise’s biggest attack surface.</p>
      </div>
    </div><p>The article generated some discussion, including on Hacker News: <a href="https://news.ycombinator.com/item?id=45395957"  target="_blank" rel="noreferrer">A Postmark backdoor that’s downloading emails | Hacker News</a>. Some of the comments pointed out that the MCP risk isn’t really different from existing software risks:</p>

    <div class="admonition quote">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z"/></svg>
        <span>Quote</span>
      </div>
      <div class="admonition-content">
        <p>This has nothing to do with MCP really, the same flaw is there in all software: you have to trust the author and the distributor. Nothing stops Microsoft from copying all your Outlook mail. Nothing stops Google from copying all your gmail. Nothing stops the Mutt project from copying all your email. Open source users like to think that “many eyes” keep the code clean and they probably do help, especially on popular projects where all commits get reviewed in detail, but the chance is still there. And the rest of us just trust the developers. This problem is as old as software.</p>
      </div>
    </div>
<h2 class="relative group">Are MCP Security risks real or overblown?
    <div id="are-mcp-security-risks-real-or-overblown" class="anchor"></div>
    
</h2>
<p>MCP security <strong>risks are a real concern</strong> and I do not want to downplay that. In many ways though, these risks have existed for as long as software itself, MCP is just the latest attack vendor.</p>
<p>I will note that the blogs I featured here, from Docker and Koi Security, are from companies that attempt to sell solutions to this problem. This does not mean that the problem is not real or that the solutions are not needed, just something to note. I actually do find <a href="https://www.docker.com/products/mcp-catalog-and-toolkit/"  target="_blank" rel="noreferrer">Docker’s MCP solutions</a> to be very interesting (I mention <a href="https://hub.docker.com/mcp"  target="_blank" rel="noreferrer">Docker MCP Catalog</a> below in <a href="/articles/mcp-security/#supply-chain-security" >Supply-Chain Security</a>).</p>

<h2 class="relative group">MCP Defense
    <div id="mcp-defense" class="anchor"></div>
    
</h2>
<p>The article “<a href="https://www.ajeetraina.com/the-day-i-told-800-engineers-their-ai-dreams-could-become-security-nightmares/"  target="_blank" rel="noreferrer">The Day I Told 800+ Engineers Their AI Dreams Could Become Security Nightmares</a>” (mentioned above  in <a href="/articles/mcp-security/#mcp-horror-stories" >MCP Horror Stories</a>), suggests five defense solutions:</p>

    <div class="admonition abstract">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"/></svg>
        <span>The Solution: Defense in Depth (That Actually Works) 🛡</span>
      </div>
      <div class="admonition-content">
        <ol>
<li>Component Isolation</li>
<li>️Attack Surface Reduction</li>
<li>Supply Chain Security</li>
<li>Input/Output Sanitization</li>
<li>WhatsApp MCP Shadowing</li>
</ol>
      </div>
    </div><hr>

    <div class="admonition info">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>
        <span>For more information on each solution, read the full article:</span>
      </div>
      <div class="admonition-content">
        <p><a href="https://www.ajeetraina.com/the-day-i-told-800-engineers-their-ai-dreams-could-become-security-nightmares/"  target="_blank" rel="noreferrer">The Day I Told 800+ Engineers Their AI Dreams Could Become Security Nightmares</a></p>
      </div>
    </div>
<h2 class="relative group">What I Do
    <div id="what-i-do" class="anchor"></div>
    
</h2>
<p>So far I have been limiting my MCP usage to personal projects and learning. Below are some of the things I have noted while learning about how to use MCP “safely”:</p>

<h3 class="relative group">Supply-Chain Security
    <div id="supply-chain-security" class="anchor"></div>
    
</h3>
<p>When Ziva asked about the MCP security risks, she was told to “read the code”. While it’s true that many MCP servers are open-source, reviewing all of them is not exactly feasible. I often do a surface level look at the repo, its activity and amount of stars, but this is not same as reviewing the code in-depth. For this reason, I believe it is worth using <strong>MCP servers by known publishers</strong>. Docker does come in handy here with their <a href="https://hub.docker.com/mcp"  target="_blank" rel="noreferrer">Docker MCP Catalog</a>. While, this catalog is not as extensive as other MCP galleries, it focuses on quality over quantity. All of the MCP servers are in the Docker MCP Catalog are by known publishers. Note that I still refuse to use Docker Desktop (due to its license), but these MCP servers can also be used in Docker CLI together with an MCP client.</p>

<h3 class="relative group">MCP Server Configuration
    <div id="mcp-server-configuration" class="anchor"></div>
    
</h3>
<p>Some MCP servers may have permissive default permissions, but can be configured to be more “locked-down” and limited and what they can do and access.</p>
<p>As an example, <a href="https://github.com/containers/kubernetes-mcp-server"  target="_blank" rel="noreferrer">Kubernetes MCP Server</a> can be run in <a href="https://github.com/containers/kubernetes-mcp-server?tab=readme-ov-file#configuration-options"  target="_blank" rel="noreferrer"><strong>read-only mode</strong></a> (this is not the default but can be set with a flag when setting up the MCP server). In this mode, the Kubernetes MCP server cannot make changes to clusters (for example, it is unable to apply manifests, but can still view existing resources). Note that even in this mode there can be security risks. One example is viewing secrets. In Kubernetes, secrets are stored in Base64 strings, which are trivial to decode for anyone that has full read access to the cluster. I have personally witnessed Claude Code attempt to read and decode Kuberenets Secrets (either with Kubernetes MCP Server or just <code>kubectl</code> commands) when asked to help troubleshoot my homelab cluster. For this reason, when using <a href="/articles/agentic-cli-tools-comparison/" >agentic CLI tools</a>, I prefer to approve each command individually. Further, Kubernetes access can be regulated with <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"  target="_blank" rel="noreferrer">Role-based access control (RBAC)</a>.</p>

<h3 class="relative group">Ignore files
    <div id="ignore-files" class="anchor"></div>
    
</h3>
<p>Similar to <a href="https://git-scm.com/docs/gitignore"  target="_blank" rel="noreferrer"><code>.gitignore</code></a> files, most <a href="/articles/agentic-cli-tools-comparison/" >agentic CLI tools</a> have a way to exclude specific files from the context. For example, a <code>.env</code> file (that may include secrets), should be specifically excluded (when not doing this, I have seen Claude Code attempt to read these files). Unfortunately, there isn’t really a standard “ignore file” for this, each tool has it own way to achieve this. If using multiple tools, multiple files might be needed.</p>

<h4 class="relative group">Documentation on excluding/ignoring files
    <div id="documentation-on-excludingignoring-files" class="anchor"></div>
    
</h4>
<ul>
<li><a href="https://developers.google.com/gemini-code-assist/docs/create-aiexclude-file"  target="_blank" rel="noreferrer">Exclude files from Gemini Code Assist use  |  Google for Developers</a></li>
<li><a href="https://docs.claude.com/en/docs/claude-code/settings#excluding-sensitive-files"  target="_blank" rel="noreferrer">Claude Code settings - Claude Docs</a></li>
<li><a href="https://cursor.com/docs/context/ignore-files"  target="_blank" rel="noreferrer">Ignore files | Cursor Docs</a></li>
<li><a href="https://docs.github.com/en/copilot/how-tos/configure-content-exclusion/exclude-content-from-copilot"  target="_blank" rel="noreferrer">Excluding content from GitHub Copilot - GitHub Docs</a></li>
<li><a href="https://github.com/charmbracelet/crush?tab=readme-ov-file#ignoring-files"  target="_blank" rel="noreferrer">charmbracelet/crush: The glamourous AI coding agent for your favourite terminal 💘</a></li>
<li><a href="https://opencode.ai/docs/config/#watcher"  target="_blank" rel="noreferrer">Config | OpenCode</a></li>
</ul>
<hr>
<p><em>Featured image by <a href="https://unsplash.com/@flyd2069?utm_source=hugo&utm_medium=referral"  target="_blank" rel="noreferrer">FlyD</a> on <a href="https://unsplash.com/photos/red-and-black-love-lock-zAhAUSdRLJ8?utm_source=hugo&utm_medium=referral"  target="_blank" rel="noreferrer">Unsplash</a>.</em></p>
]]></content><author><name>Ro'i Bandel</name></author><category term="mcp" label="Mcp" scheme="https://www.towerofkubes.com/tags/mcp/"/><category term="ai" label="Ai" scheme="https://www.towerofkubes.com/tags/ai/"/><category term="security" label="Security" scheme="https://www.towerofkubes.com/tags/security/"/><published>2025-11-04T00:00:00Z</published></entry></feed>