<?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: Sandy</title>
    <description>The latest articles on DEV Community by Sandy (@notasandy).</description>
    <link>https://dev.to/notasandy</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3895343%2F638c99af-7768-4d7d-b10a-6741f66f3a21.jpg</url>
      <title>DEV Community: Sandy</title>
      <link>https://dev.to/notasandy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/notasandy"/>
    <language>en</language>
    <item>
      <title>I built an MCP server that reviews your code with Groq — here's what it found</title>
      <dc:creator>Sandy</dc:creator>
      <pubDate>Mon, 04 May 2026 20:35:27 +0000</pubDate>
      <link>https://dev.to/notasandy/i-built-an-mcp-server-that-reviews-your-code-with-groq-heres-what-it-found-3g7f</link>
      <guid>https://dev.to/notasandy/i-built-an-mcp-server-that-reviews-your-code-with-groq-heres-what-it-found-3g7f</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;AI-generated code is everywhere. GitHub Copilot, Claude, ChatGPT — they all write code fast. But they also introduce subtle bugs, SQL injections, and insecure patterns that look totally fine at first glance.&lt;/p&gt;

&lt;p&gt;I wanted a tool that sits &lt;strong&gt;inside&lt;/strong&gt; my AI agent and reviews code &lt;em&gt;before&lt;/em&gt; I ship it. Not a linter. Not a static analyzer. A strict senior engineer who actually explains &lt;em&gt;why&lt;/em&gt; something is wrong and shows the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;mcp-code-sanitizer&lt;/strong&gt; — an MCP server that plugs into Claude Desktop or Cursor and gives you a strict AI code review powered by Groq's free API (llama-3.3-70b).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude Desktop ──MCP──► code-sanitizer ──REST──► Groq API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tools available
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;analyze_code&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Finds bugs, vulnerabilities, rates 0–100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;compare_code&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compares versions, detects regressions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;explain_code&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Step-by-step explanation for any level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;generate_tests&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Writes pytest/jest tests automatically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;analyze_file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Analyzes whole files with parallel chunking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;generate_report&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Builds an HTML report&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Real example
&lt;/h2&gt;

&lt;p&gt;I gave it this code:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT * FROM users WHERE id = &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returned in 2 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Critical SQL injection vulnerability"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"issues"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"severity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"critical"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"line"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SQL Injection"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"f-string directly interpolates user_id into SQL query"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"fix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cursor.execute('SELECT * FROM users WHERE id = %s', (user_id,))"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Score 23/100. Ouch. But accurate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Groq?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free tier&lt;/strong&gt; — generous limits, no credit card needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast&lt;/strong&gt; — llama-3.3-70b responds in ~1-2 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON mode&lt;/strong&gt; — structured output without parsing hacks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;The codebase is split into focused modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server.py       # FastMCP entry (39 lines)
config.py       # Constants
groq_client.py  # API client with auto-retry on rate limits
cache.py        # In-memory cache with TTL
prompts.py      # System prompts
tools/          # One file per tool
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cache layer means identical code isn't sent to Groq twice — useful when reviewing the same function repeatedly during debugging.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Action included
&lt;/h2&gt;

&lt;p&gt;The repo includes a GitHub Action that automatically reviews every PR and posts a structured comment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
&lt;span class="c1"&gt;# ... runs review_pr.py on changed files&lt;/span&gt;
&lt;span class="c1"&gt;# posts comment with issues, warnings, suggestions&lt;/span&gt;
&lt;span class="c1"&gt;# fails check if critical issues found&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get started in 3 commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/notasandy/mcp-code-sanitizer
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
fastmcp dev inspector server.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get a free Groq key at &lt;a href="https://console.groq.com/keys" rel="noopener noreferrer"&gt;console.groq.com&lt;/a&gt; and you're done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Published everywhere
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/notasandy/mcp-code-sanitizer" rel="noopener noreferrer"&gt;notasandy/mcp-code-sanitizer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PyPI: &lt;code&gt;pip install mcp-code-sanitizer&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Official MCP Registry: &lt;code&gt;io.github.notasandy/mcp-code-sanitizer&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Glama catalog: &lt;a href="https://glama.ai/mcp/servers" rel="noopener noreferrer"&gt;glama.ai/mcp/servers&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Would love to hear what you think — especially if you find bugs the sanitizer missed 😄&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>python</category>
      <category>claude</category>
      <category>ai</category>
    </item>
    <item>
      <title>I built a VS Code extension in 3 days because copy-pasting into ChatGPT was annoying</title>
      <dc:creator>Sandy</dc:creator>
      <pubDate>Fri, 24 Apr 2026 18:01:46 +0000</pubDate>
      <link>https://dev.to/notasandy/i-built-a-vs-code-extension-in-3-days-because-copy-pasting-into-chatgpt-was-annoying-3opf</link>
      <guid>https://dev.to/notasandy/i-built-a-vs-code-extension-in-3-days-because-copy-pasting-into-chatgpt-was-annoying-3opf</guid>
      <description>&lt;p&gt;Three days ago I was sitting on yet another ChatGPT session, spending more time explaining where my code lives than actually asking the question. Not a tragedy — just annoying. I don't have a lot of time, and I didn't want to waste it on copy-paste rituals.&lt;/p&gt;

&lt;p&gt;Googled for something that already solved this. Nothing useful. So I spent three evenings building it myself.&lt;/p&gt;




&lt;p&gt;The extension is called &lt;strong&gt;Copy Code to ChatGPT&lt;/strong&gt;. It adds a right-click menu in VS Code that copies your code the way AI actually needs it — with the file path, line numbers, and proper Markdown formatting. Not just the raw snippet.&lt;/p&gt;

&lt;p&gt;So instead of pasting this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;formatOutput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and then typing &lt;em&gt;"this is from utils/formatter.ts around line 45, it's TypeScript, the context is..."&lt;/em&gt; — you just paste and the AI already knows where it came from.&lt;/p&gt;

&lt;p&gt;You can also copy entire folders as a single block, grab the project structure as a tree, and see the token count before sending so you don't hit the limit mid-conversation. There's also basic import-following — point at a file and it pulls in related files by tracing dependencies. Not perfect, but already way more useful than copying things manually.&lt;/p&gt;

&lt;p&gt;I published it on the VS Code Marketplace and on GitHub. It's free, open source, no telemetry.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=notasandy.copy-code-to-chatgpt" rel="noopener noreferrer"&gt;Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/notasandy/copy-for-ai" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work with AI assistants daily and have a better approach to this — genuinely curious what you're doing.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>vscode</category>
      <category>productivity</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
