<?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: ryoto miyake</title>
    <description>The latest articles on DEV Community by ryoto miyake (@ryoto_miyake).</description>
    <link>https://dev.to/ryoto_miyake</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%2F3264642%2F947e6ca9-7ad0-408f-a83a-47a2e99127b7.png</url>
      <title>DEV Community: ryoto miyake</title>
      <link>https://dev.to/ryoto_miyake</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ryoto_miyake"/>
    <language>en</language>
    <item>
      <title>Claude-Gemini Integration Tool "CGMB" v1.1.0: Implementing Windows Support</title>
      <dc:creator>ryoto miyake</dc:creator>
      <pubDate>Mon, 12 Jan 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/ryoto_miyake/claude-gemini-integration-tool-cgmb-v110-implementing-windows-support-kcj</link>
      <guid>https://dev.to/ryoto_miyake/claude-gemini-integration-tool-cgmb-v110-implementing-windows-support-kcj</guid>
      <description>&lt;h1&gt;
  
  
  I've released v1.1.0 of "CGMB," an MCP tool that integrates Claude Code and Gemini.
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Previous article: &lt;a href="https://dev.to/ryoto_miyake/i-built-cgmb-an-mcp-that-unifies-claude-code-gemini-cli-and-gemini-api-3b0i"&gt;Bridging Claude and Gemini: Creating the Multimodal Integration Tool "CGMB"&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What You'll Learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;4 new features added in v1.1.0&lt;/li&gt;
&lt;li&gt;Implementation details of Windows path normalization&lt;/li&gt;
&lt;li&gt;How URL auto-routing works&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  v1.1.0 New Features
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🪟 Windows Support&lt;/td&gt;
&lt;td&gt;Path normalization &amp;amp; drive letter handling&lt;/td&gt;
&lt;td&gt;✅ Full Support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📝 OCR Feature&lt;/td&gt;
&lt;td&gt;Scanned PDF support&lt;/td&gt;
&lt;td&gt;✅ New&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔄 URL Auto-Routing&lt;/td&gt;
&lt;td&gt;Layer selection by URL type&lt;/td&gt;
&lt;td&gt;✅ New&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🚀 Latest Models&lt;/td&gt;
&lt;td&gt;gemini-3-flash, gemini-2.5-flash&lt;/td&gt;
&lt;td&gt;✅ Supported&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Windows Path Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Challenge
&lt;/h3&gt;

&lt;p&gt;v1.0 only supported Unix paths, but Windows paths have these characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with a drive letter (&lt;code&gt;C:&lt;/code&gt;, &lt;code&gt;D:&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Use backslash (&lt;code&gt;\&lt;/code&gt;) as separator&lt;/li&gt;
&lt;li&gt;May have mixed forward slashes (&lt;code&gt;C:/Users/...&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Node.js's &lt;code&gt;path.isAbsolute()&lt;/code&gt; can correctly determine Windows paths, but cannot handle mixed slashes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Implementation
&lt;/h3&gt;

&lt;p&gt;Handled in the &lt;code&gt;validateAndNormalize&lt;/code&gt; method of &lt;code&gt;CGMBServer.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Detect Windows absolute path pattern (case-insensitive)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isWindowsAbsolutePath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/^&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Za-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;:&lt;/span&gt;&lt;span class="se"&gt;[/\\]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isWindows&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;isWindowsAbsolutePath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Normalize forward slashes to backslashes&lt;/span&gt;
  &lt;span class="nx"&gt;preprocessedPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\/&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;normalizedPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;preprocessedPath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Absolute path detection (considering Windows pattern)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isAbsolute&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isAbsolute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;normalizedPath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;isWindowsAbsolutePath&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resolvedPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;isAbsolute&lt;/span&gt;
  &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;normalizedPath&lt;/span&gt;
  &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;baseDir&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;normalizedPath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Points:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Regex &lt;code&gt;/^[A-Za-z]:[/\\]/&lt;/code&gt; detects drive letters&lt;/li&gt;
&lt;li&gt;Unify slashes before &lt;code&gt;path.normalize()&lt;/code&gt; normalization&lt;/li&gt;
&lt;li&gt;Combine &lt;code&gt;path.isAbsolute()&lt;/code&gt; result with Windows pattern detection&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  File Path Extraction from Prompts
&lt;/h2&gt;

&lt;p&gt;v1.1.0 automatically detects file paths written in prompts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Regex to detect both Windows + Unix paths&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;filePathRegex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;(?:[&lt;/span&gt;&lt;span class="sr"&gt;A-Za-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\\[^\s&lt;/span&gt;&lt;span class="sr"&gt;"'&amp;lt;&amp;gt;|&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z0-9&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+|&lt;/span&gt;&lt;span class="se"&gt;\/(?!&lt;/span&gt;&lt;span class="sr"&gt;https&lt;/span&gt;&lt;span class="se"&gt;?&lt;/span&gt;&lt;span class="sr"&gt;:&lt;/span&gt;&lt;span class="se"&gt;)[^\s&lt;/span&gt;&lt;span class="sr"&gt;"'&amp;lt;&amp;gt;|&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z0-9&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+|&lt;/span&gt;&lt;span class="se"&gt;\.\.?\/[^\s&lt;/span&gt;&lt;span class="sr"&gt;"'&amp;lt;&amp;gt;|&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.[&lt;/span&gt;&lt;span class="sr"&gt;a-zA-Z0-9&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;/gi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;localPathsInPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filePathRegex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This enables usage like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CGMB analyze C:\Users\name\Documents\report.pdf
CGMB analyze /home/user/documents/report.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  URL Auto-Routing
&lt;/h2&gt;

&lt;p&gt;Determines URL type and automatically routes to the optimal AI layer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;detectUrlType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;audio&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;web&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lower&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;urlPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;urlPath&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\.(&lt;/span&gt;&lt;span class="sr"&gt;png|jpg|jpeg|gif|webp|bmp|svg&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;urlPath&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\.(&lt;/span&gt;&lt;span class="sr"&gt;mp3|wav|m4a|ogg|flac|aac&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;urlPath&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;audio&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;web&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Routing Destinations
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;URL Type&lt;/th&gt;
&lt;th&gt;Destination&lt;/th&gt;
&lt;th&gt;Reason&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PDF&lt;/td&gt;
&lt;td&gt;AI Studio&lt;/td&gt;
&lt;td&gt;OCR processing via Gemini File API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Images/Audio&lt;/td&gt;
&lt;td&gt;AI Studio&lt;/td&gt;
&lt;td&gt;Multimodal processing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web Pages&lt;/td&gt;
&lt;td&gt;Gemini CLI&lt;/td&gt;
&lt;td&gt;Real-time information retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Installation &amp;amp; Upgrade
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# New installation&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; claude-gemini-multimodal-bridge

&lt;span class="c"&gt;# Upgrade&lt;/span&gt;
npm update &lt;span class="nt"&gt;-g&lt;/span&gt; claude-gemini-multimodal-bridge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Improvements from v1.0.0
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;v1.0.0&lt;/th&gt;
&lt;th&gt;v1.1.0&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Windows Support&lt;/td&gt;
&lt;td&gt;❌ Unix only&lt;/td&gt;
&lt;td&gt;✅ Full support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OCR Feature&lt;/td&gt;
&lt;td&gt;❌ None&lt;/td&gt;
&lt;td&gt;✅ Scanned PDF support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;URL Routing&lt;/td&gt;
&lt;td&gt;Basic&lt;/td&gt;
&lt;td&gt;✅ Type-based auto-selection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Models&lt;/td&gt;
&lt;td&gt;gemini-2.0-flash&lt;/td&gt;
&lt;td&gt;✅ gemini-3-flash support&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Future Plans
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;More advanced routing algorithms&lt;/li&gt;
&lt;li&gt;Quick support for new Gemini models&lt;/li&gt;
&lt;li&gt;Performance optimization&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/goodaymmm/claude-gemini-multimodal-bridge" rel="noopener noreferrer"&gt;https://github.com/goodaymmm/claude-gemini-multimodal-bridge&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;README&lt;/strong&gt;: &lt;a href="https://github.com/goodaymmm/claude-gemini-multimodal-bridge/blob/main/README.md" rel="noopener noreferrer"&gt;https://github.com/goodaymmm/claude-gemini-multimodal-bridge/blob/main/README.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NPM&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/claude-gemini-multimodal-bridge" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/claude-gemini-multimodal-bridge&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feedback and Issues are welcome!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gemini</category>
      <category>llm</category>
      <category>tooling</category>
    </item>
    <item>
      <title>14Forge: League of Legends Analytics Platform Built with n8n AI Agents and BrightData Web Scraping</title>
      <dc:creator>ryoto miyake</dc:creator>
      <pubDate>Mon, 01 Sep 2025 04:45:51 +0000</pubDate>
      <link>https://dev.to/ryoto_miyake/14forge-league-of-legends-analytics-platform-built-with-n8n-ai-agents-and-brightdata-web-scraping-573o</link>
      <guid>https://dev.to/ryoto_miyake/14forge-league-of-legends-analytics-platform-built-with-n8n-ai-agents-and-brightdata-web-scraping-573o</guid>
      <description>&lt;h2&gt;
  
  
  14Forge - LoL Performance Analytics Platform
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/brightdata-n8n-2025-08-13"&gt;AI Agents Challenge powered by n8n and Bright Data&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🏆 Contest Entry - BrightData + n8n Contest 2025
&lt;/h2&gt;

&lt;p&gt;A revolutionary League of Legends analytics platform featuring unique &lt;strong&gt;14-Minute Analysis™&lt;/strong&gt; technology, powered by n8n AI Agents and BrightData web scraping.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Every League of Legends player faces three critical challenges:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;"Why did I lose?"&lt;/strong&gt; - Statistics alone don't explain defeats&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gap with higher-rank players is invisible&lt;/strong&gt; - Benchmarks and improvement paths are unclear&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meta information is fragmented&lt;/strong&gt; - Need to check multiple sites for comprehensive analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;14Forge solves all of these problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎥 Live Demo Video
&lt;/h3&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/4DA_6hwkKf0"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  📸 Screenshots
&lt;/h3&gt;

&lt;h4&gt;
  
  
  AI Coaching Analysis
&lt;/h4&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.amazonaws.com%2Fuploads%2Farticles%2Fjtt4i61abr3zqv0a6akv.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.amazonaws.com%2Fuploads%2Farticles%2Fjtt4i61abr3zqv0a6akv.png" alt="AI Coaching"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F1rca7o51vzcm08hw5mfx.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.amazonaws.com%2Fuploads%2Farticles%2F1rca7o51vzcm08hw5mfx.png" alt="AI Coaching"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  14-Minute Analysis Dashboard
&lt;/h4&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.amazonaws.com%2Fuploads%2Farticles%2F6g7dckrxjkno001q9ghj.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.amazonaws.com%2Fuploads%2Farticles%2F6g7dckrxjkno001q9ghj.png" alt="14-Min Analysis"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F84rfpvrgzt35i0tv6ri6.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.amazonaws.com%2Fuploads%2Farticles%2F84rfpvrgzt35i0tv6ri6.png" alt="14-Min Analysis"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  n8n Workflows
&lt;/h3&gt;

&lt;p&gt;Workflows are publicly available at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/goodaymmm/14Forge" rel="noopener noreferrer"&gt;GitHub - 14Forge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/goodaymmm/14Forge/tree/main/n8n_workflows" rel="noopener noreferrer"&gt;GitHub - n8n Workflows&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Main workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;14coacher.json&lt;/strong&gt; - Core AI coaching analysis workflow&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;data-dragon-sync&lt;/strong&gt; - Champion and item data collection from Riot official API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build-Blitz-Collector.json&lt;/strong&gt; - Meta data collection from Blitz.gg&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match-Statistics-Collector.json&lt;/strong&gt; - Match statistics aggregation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Technical Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  n8n AI Agent Workflow
&lt;/h3&gt;

&lt;p&gt;The core workflow consists of 5 main components:&lt;/p&gt;

&lt;h4&gt;
  
  
  Workflow Components
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Webhook Node&lt;/strong&gt; - Receives match data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BrightData Node&lt;/strong&gt; - Scrapes current tier and next tier meta data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Agent Node&lt;/strong&gt; - Performance analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL Node&lt;/strong&gt; - Stores results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Response Node&lt;/strong&gt; - Returns coaching analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  BrightData Node's Role
&lt;/h3&gt;

&lt;p&gt;The BrightData node plays a crucial role in enabling personalized meta data retrieval:&lt;/p&gt;

&lt;p&gt;The workflow generates URLs for both current tier and next tier data. For example, if a player is currently SILVER, it retrieves both SILVER and GOLD tier meta data. This enables the system to provide "realistic next steps" rather than "copying pro players" - a fundamental difference in 14Forge's approach&lt;/p&gt;

&lt;p&gt;The system generates two URLs dynamically for each player:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Current Tier Data&lt;/strong&gt;: Performance benchmarks from the player's current rank&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next Tier Data&lt;/strong&gt;: Target benchmarks from one rank higher&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This tier-based approach ensures players receive achievable, incremental improvement goals rather than unrealistic pro-level targets.&lt;/p&gt;

&lt;p&gt;This approach provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time personalization optimized for the player's rank, server, and patch immediately after match completion&lt;/li&gt;
&lt;li&gt;Presenting "realistic steps to the next rank" instead of "imitating pros"&lt;/li&gt;
&lt;li&gt;Completely different advice for SILVER→GOLD vs DIAMOND→MASTER even with the same champion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, BrightData collects matchup statistics against specific enemy champions and optimal item choices for those matchups, enabling deeper strategic advice. The system also dynamically adjusts recommendations based on the role played.&lt;/p&gt;

&lt;h3&gt;
  
  
  Innovation: Real-time Personalization
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Retrieves data optimized for player's rank, server, and patch even right after match ends&lt;/li&gt;
&lt;li&gt;Provides "realistic steps to next rank" rather than "copying pro players"&lt;/li&gt;
&lt;li&gt;Different advice for SILVER→GOLD vs DIAMOND→MASTER transitions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠️ Technical Challenges and Solutions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AI Match Analysis: Core Innovation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Context Building Optimization
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Conveying complex match situations within LLM token limits&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Implemented a template-based rendering system that dynamically generates prompts based on player context, role, and language preferences.&lt;/p&gt;

&lt;p&gt;The system uses the &lt;code&gt;promptContextBuilder.ts&lt;/code&gt; service (backend/api/src/services/promptContextBuilder.ts) to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetch current patch meta data dynamically from the database&lt;/li&gt;
&lt;li&gt;Build context with player performance metrics from 14-minute analysis&lt;/li&gt;
&lt;li&gt;Render templates with actual values using the &lt;code&gt;renderTemplate&lt;/code&gt; method that replaces {{placeholders}} with real data&lt;/li&gt;
&lt;li&gt;Support three languages (English, Japanese, Korean) by dynamically loading locale-specific prompt templates&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📈 Achievements
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Technical Implementation Success
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Caching Strategy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL 6-hour cache (period when meta doesn't change significantly)&lt;/li&gt;
&lt;li&gt;Immediate response for same matchId requests&lt;/li&gt;
&lt;li&gt;Cache check implementation within n8n workflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Response Time&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial analysis: 2-3 minutes (BrightData scraping + AI analysis)&lt;/li&gt;
&lt;li&gt;Cached response: 0.5 seconds (PostgreSQL read only)&lt;/li&gt;
&lt;li&gt;Significant improvement in perceived performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Multi-language Support&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Three language templates (English, Japanese, Korean)&lt;/li&gt;
&lt;li&gt;Each with culturally appropriate coaching approaches&lt;/li&gt;
&lt;li&gt;Japanese: Polite improvement suggestions&lt;/li&gt;
&lt;li&gt;Korean: Competitive and strategic focus&lt;/li&gt;
&lt;li&gt;English: Direct and metrics-focused&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Priority Actions System&lt;/strong&gt;:&lt;br&gt;
The system provides concrete improvement actions through &lt;code&gt;priority_actions&lt;/code&gt;. The n8n workflow (14coacher.json) generates role-specific and time-specific actions based on the player's performance. For example, for support players:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"【8-minute goal】Complete support item quest and switch to Oracle Lens"&lt;/li&gt;
&lt;li&gt;"【3:15-3:30】Level 3-4 assumed, trade with Q+W+E. R not available yet, maintain safe positioning"&lt;/li&gt;
&lt;li&gt;"Place vision ward at dragon pit entrance at 3:15"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These actions are dynamically generated based on the player's actual performance versus tier-appropriate benchmarks.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔮 Future Extensibility
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pro Scene Integration&lt;/strong&gt;: Translate pro play patterns into ranked play analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analysis Optimization&lt;/strong&gt;: Current prompt-based approach has limitations; considering fine-tuned sub-AI models for enhanced output&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;14Forge is not just another statistics tool. It's a platform that answers the "why" and "how" that players truly need. Through the powerful combination of n8n workflow automation and BrightData's reliable data collection, we can provide unprecedented deep insights.&lt;/p&gt;

&lt;p&gt;The unique 14-Minute Analysis™ focuses on the critical turning point in matches, while the tier-based progression system ensures every player receives personalized, achievable improvement goals rather than unrealistic pro-level targets.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>n8nbrightdatachallenge</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Shopping for Algolia Personalized: Privacy-First AI Shopping Assistant with MCP</title>
      <dc:creator>ryoto miyake</dc:creator>
      <pubDate>Sun, 27 Jul 2025 17:57:15 +0000</pubDate>
      <link>https://dev.to/ryoto_miyake/shopping-for-algolia-personalized-privacy-first-ai-shopping-assistant-with-mcp-d95</link>
      <guid>https://dev.to/ryoto_miyake/shopping-for-algolia-personalized-privacy-first-ai-shopping-assistant-with-mcp-d95</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/algolia-2025-07-09"&gt;Algolia MCP Server Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;As an avid online shopper frustrated by generic search results that didn't understand my preferences, I wanted to create a shopping experience that learns and adapts to each user individually. The challenge was clear: how to combine powerful search capabilities with true personalization while keeping user data completely private?&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;Shopping for Algolia Personalized&lt;/strong&gt;, an AI-powered desktop shopping assistant that combines the power of Algolia's search capabilities with advanced machine learning personalization. The application features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI Image Analysis&lt;/strong&gt;: Upload any product image and get instant search results using Google's Gemini 2.5 Flash API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart Personalization&lt;/strong&gt;: ML-driven recommendation engine that learns from your shopping behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Desktop Integration&lt;/strong&gt;: 8 custom MCP tools that allow Claude to analyze your shopping patterns and provide personalized advice&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Index Search&lt;/strong&gt;: Seamless search across fashion, electronics, and other categories with intelligent fallback strategies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery Mode&lt;/strong&gt;: Mix personalized recommendations with inspiration items to discover new products - recreating that serendipitous moment in real shopping when something unexpected catches your eye&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app is built with Electron + React + TypeScript and features a modern, dark-mode-enabled UI that makes shopping both efficient and enjoyable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Video Walkthrough
&lt;/h3&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/_AIdSyxy_T0"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  GitHub Repository
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/goodaymmm" rel="noopener noreferrer"&gt;
        goodaymmm
      &lt;/a&gt; / &lt;a href="https://github.com/goodaymmm/shopping-for-algolia-personalized" rel="noopener noreferrer"&gt;
        shopping-for-algolia-personalized
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Shopping for Algolia Personalized&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Submission for the &lt;a href="https://dev.to/challenges/algolia-2025-07-09" rel="nofollow"&gt;Algolia MCP Server Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;🔗 Algolia MCP Server Application&lt;/strong&gt; - All search operations use the official &lt;a href="https://github.com/algolia/mcp-node" rel="noopener noreferrer"&gt;Algolia MCP Server&lt;/a&gt; via Model Context Protocol.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;AI-powered shopping assistant with image search, ML personalization, and Claude Desktop integration.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Demo&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;📹 &lt;strong&gt;Demo Video&lt;/strong&gt;: &lt;a href="https://youtu.be/_AIdSyxy_T0" rel="nofollow noopener noreferrer"&gt;Watch on YouTube&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: English is not the author's native language, so the English narration is AI-generated.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AI image analysis with Gemini 2.5 Flash&lt;/li&gt;
&lt;li&gt;ML-powered personalization&lt;/li&gt;
&lt;li&gt;Claude Desktop MCP integration&lt;/li&gt;
&lt;li&gt;Multi-index Algolia search via MCP&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Algolia MCP Server&lt;/strong&gt;: All search operations via MCP protocol&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;AI Image Search&lt;/strong&gt;: Gemini 2.5 Flash for product recognition&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;ML Personalization&lt;/strong&gt;: Category and brand learning&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;8 MCP Tools&lt;/strong&gt;: Full suite for Claude Desktop integration&lt;/li&gt;
&lt;li&gt;🎨 &lt;strong&gt;Modern UI&lt;/strong&gt;: React + TypeScript with dark mode&lt;/li&gt;
&lt;li&gt;🔒 &lt;strong&gt;Secure Storage&lt;/strong&gt;: OS keychain for API credentials&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;AI-Powered Image Search&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/goodaymmm/shopping-for-algolia-personalized/SS/01Gemini_Analyze.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fgoodaymmm%2Fshopping-for-algolia-personalized%2FSS%2F01Gemini_Analyze.png" alt="Gemini Image Analysis"&gt;&lt;/a&gt;
&lt;em&gt;Upload any&lt;/em&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/goodaymmm/shopping-for-algolia-personalized" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Utilized the Algolia MCP Server
&lt;/h2&gt;

&lt;p&gt;My implementation leverages the official Algolia MCP Server as the core search engine for an intelligent shopping experience:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Hybrid Approach: Strategic Use of REST and MCP&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I adopted a hybrid approach: REST API for initial setup only, then all operations via MCP.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Initial setup only: Create indices and upload data via REST&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;initializeIndices&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;indicesExist&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createIndicesViaREST&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uploadInitialData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// All subsequent operations use MCP exclusively&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mcpClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AlgoliaMCPClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mcpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Production: All searches via MCP&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;searchProducts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mcpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;searchSingleIndex&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;indexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;determineIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;hitsPerPage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this approach&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Index creation and schema setup are more direct and reliable via REST API&lt;/li&gt;
&lt;li&gt;Once setup is complete, search operations can fully leverage MCP's persistent connection benefits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Results achieved&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search latency improved from 200ms to 120ms average (40% reduction)&lt;/li&gt;
&lt;li&gt;Connection reuse minimized network overhead&lt;/li&gt;
&lt;li&gt;Error handling unified at protocol level, improving reliability&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Innovative AI-Search Fusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Seamlessly integrating Gemini AI's image analysis with Algolia MCP's advanced search capabilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Transform image context into multi-dimensional search&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;searchStrategy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;extractedKeywords&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// "Adidas sneakers black"&lt;/span&gt;
  &lt;span class="na"&gt;fallback1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;withoutBrand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// "sneakers black"&lt;/span&gt;
  &lt;span class="na"&gt;fallback2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;categoryExpansion&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;// "athletic shoes dark"&lt;/span&gt;
  &lt;span class="na"&gt;fallback3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;semanticSimilarity&lt;/span&gt;     &lt;span class="c1"&gt;// "sports footwear"&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Strategic Dataset Design&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Three specialized indices to optimize for category-specific search behaviors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;indices&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;fashion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fashion items only&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;attributes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;brand&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;size&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;color&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;material&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Optimized for size/color filtering common in fashion searches&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;electronics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Electronics only&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;attributes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;brand&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;specs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;compatibility&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Optimized for technical specification filtering&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;other&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cross-category discovery&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1270&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mixed index to promote unexpected discoveries&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Design intent&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fashion (3,000 items)&lt;/strong&gt;: Fast filtering by size, color, material - fashion-specific attributes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Electronics (2,000 items)&lt;/strong&gt;: Detailed search by specs, compatibility, technical details&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Other (1,270 items)&lt;/strong&gt;: Enable cross-category discoveries for serendipitous finds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Results achieved&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;90%+ relevance in category-specific searches&lt;/li&gt;
&lt;li&gt;Discovery Mode successfully mixes products from different indices for "real shopping" feel&lt;/li&gt;
&lt;li&gt;Each search completes within 50ms due to optimized index sizes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Personalization Layer&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Applying proprietary ML scoring on top of Algolia MCP search results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learning weights from past user behavior applied to search results&lt;/li&gt;
&lt;li&gt;Discovery Mode intentionally mixes in unexpected results&lt;/li&gt;
&lt;li&gt;All operations complete within the MCP protocol&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This design achieved both "efficient targeted search" and "joy of unexpected discovery" - showing new possibilities for e-commerce search experiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Challenges Conquered
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎯 Challenge 1: Making MCP Work on Windows Development
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: The official Algolia MCP Server only provided pre-built binaries for macOS/Linux. While the README showed a development approach using npm, making it work on Windows required custom adaptations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Discovered that the official README's Development section could be adapted for Windows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Leveraging the Development Approach&lt;/strong&gt;: The official README showed TypeScript execution for development
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;From&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;official&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;README&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Development&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;section&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;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&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="s2"&gt;"--experimental-strip-types"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"--no-warnings=ExperimentalWarning"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"src/app.ts"&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;ol&gt;
&lt;li&gt;
&lt;strong&gt;Windows-Specific Implementation&lt;/strong&gt;: Adapted this for Windows within Electron
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Custom implementation for Windows compatibility&lt;/span&gt;
&lt;span class="nf"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--experimental-strip-types&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--no-warnings=ExperimentalWarning&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;src/app.ts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;start-server&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--credentials&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;applicationId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;algolia-mcp-source&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;ELECTRON_RUN_AS_NODE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;// Critical for Electron&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: This approach became a blueprint for Windows developers wanting to use MCP technology, proving that official development documentation can be creatively adapted for unsupported platforms.&lt;/p&gt;

&lt;p&gt;In addition to this Windows implementation, I built a &lt;strong&gt;Custom Shopping AI MCP Server&lt;/strong&gt; with 8 specialized tools for e-commerce insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;get_personalization_summary&lt;/code&gt;: Overview of shopping preferences and ML confidence&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_user_preferences&lt;/code&gt;: Category and brand affinity analysis&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_saved_products&lt;/code&gt;: Full product database with price statistics&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_shopping_insights&lt;/code&gt;: Comprehensive spending analysis and recommendations&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_product_comparisons&lt;/code&gt;: Category-based product comparisons&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_interaction_analytics&lt;/code&gt;: Click/save behavior metrics&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;suggest_products&lt;/code&gt;: Context-aware product recommendations&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;search_products&lt;/code&gt;: Placeholder for future Algolia search integration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This dual MCP architecture enables Claude Desktop to access both Algolia's search capabilities and deep shopping insights from the personalization engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧹 Challenge 2: Cleaning Real-World E-commerce Data
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: 15% of products in the Amazon ESCI dataset had broken images, placeholder URLs, or missing metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Built a robust filtering pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Detect and filter invalid product images&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isValidImage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;invalidPatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sr"&gt;/no&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;_-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;image/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sr"&gt;/placeholder/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sr"&gt;/coming&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;_-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;soon/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sr"&gt;/default&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;_-&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;product/i&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;invalidPatterns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Improved search result quality by 40% and eliminated user frustration from broken images.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Challenge 3: Turning Blurry Photos into Perfect Search Results
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Users upload random product photos - blurry, partial, or with backgrounds - expecting accurate results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Implemented a multi-stage search fallback system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Full AI-extracted keywords: "Adidas Ultraboost 22 black running shoes"&lt;/li&gt;
&lt;li&gt;Remove brand for broader results: "Ultraboost 22 black running shoes"&lt;/li&gt;
&lt;li&gt;Simplify to core terms: "black running shoes"&lt;/li&gt;
&lt;li&gt;Category expansion: "athletic footwear"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Achieved 90%+ search accuracy even from ambiguous images.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚡ Challenge 4: The Feedback Loop Timing Dilemma
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: When should personalization kick in? Too fast = unstable results. Too slow = users don't see impact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Hybrid learning approach with confidence levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Immediate: Same products get boosted instantly&lt;/li&gt;
&lt;li&gt;Gradual: Category preferences emerge after 5+ interactions&lt;/li&gt;
&lt;li&gt;Stable: Full personalization at 10+ interactions with 0.8+ confidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Users feel heard immediately while receiving increasingly accurate long-term recommendations.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔐 Challenge 5: Privacy Without Compromise
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: How to provide deep personalization without sending user data to the cloud?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Local-first architecture with complete data sovereignty:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All ML processing happens locally with SQLite&lt;/li&gt;
&lt;li&gt;Only anonymous search queries touch the cloud&lt;/li&gt;
&lt;li&gt;Uninstall = complete data removal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Zero privacy concerns while maintaining full personalization capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons That Changed My Perspective
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Complexity of Real Data and Importance of Cleanup&lt;/strong&gt;: The Amazon ESCI dataset was chosen because it contains actual e-commerce search queries and product mappings. However, about 15% of products had invalid images like &lt;code&gt;no-image-available.jpg&lt;/code&gt;. Building regex and URL pattern matching to detect and filter these improved search quality dramatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Depth of User Behavior Weighting&lt;/strong&gt;: The personalization engine focuses on just two signals: 'save' actions (weight 1.0) and 'click' actions (weight 0.5). I initially tracked viewing time and hover events too, but they added too much noise. By focusing on actions with clear intent, the learning became more accurate. Particularly, handling multiple clicks on the same product with time decay allowed proper reflection of current interests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Feedback Loop Design&lt;/strong&gt;: The most challenging part of the AI image analysis → search → display → user action → personalization update loop was timing the learning reflection. Real-time updates made results unstable, while batch processing was too slow. I solved this with a graduated learning approach: 'immediately prioritize the same products' while 'gradually reflecting category learning' after 5+ interactions. This hybrid approach lets users see immediate impact while receiving increasingly accurate long-term recommendations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Value of Local-First Design&lt;/strong&gt;: One of the most important design decisions was implementing this as a desktop application (.exe) rather than a web service. Storing all personalization data locally on the user's machine had two major benefits:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Complete Privacy Protection&lt;/strong&gt;: User shopping behavior, interests, and search history never leave their machine. Data sovereignty remains entirely with the user - uninstalling removes all data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Design Simplicity&lt;/strong&gt;: By avoiding web service requirements like authentication systems, session management, HTTPS, GDPR compliance, data encryption, and access controls, I could focus entirely on core functionality and user experience.&lt;/p&gt;

&lt;p&gt;Only Algolia API and Gemini API connections use the cloud, limited to search queries and image analysis without any personally identifiable information. By adhering to the principle that "user data belongs to the user," this design enabled both strong technical performance and ethical guarantees regarding user data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;New Possibilities for Desktop Applications&lt;/strong&gt;: Electron desktop apps enable features difficult to achieve on the web: high-speed local SQLite access, OS-level secure credential management (keytar), and local MCP server execution. The Claude Desktop integration was only possible because both run locally. While 'everything to the cloud' seems to be the trend, for privacy and performance-conscious applications, local-first remains the optimal choice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Balancing Personalization with Discovery&lt;/strong&gt;: Just as in real shopping where unexpected items catch your eye while searching for something specific, Discovery Mode recreates this serendipity digitally. The most important lesson was not to sacrifice opportunities for new discoveries in pursuit of personalization accuracy.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Technical Achievements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: Sub-second search responses with intelligent caching&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy&lt;/strong&gt;: 90%+ relevance in image-based searches through Gemini AI integration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: Architecture supports easy addition of new product indices&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt;: All personalization data stored locally with SQLite&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Future-Ready&lt;/strong&gt;: While currently using a static dataset for the challenge, the architecture is designed for seamless transition to dynamic API data sources&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Extensibility: Ready for Real-Time Data
&lt;/h3&gt;

&lt;p&gt;Although this implementation uses a static dataset, the codebase is architected for easy migration to dynamic APIs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Product interface ready for real-time pricing and inventory&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Product&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;           &lt;span class="c1"&gt;// Ready for real-time price updates&lt;/span&gt;
  &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;sourceIndex&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="c1"&gt;// Future fields for dynamic data&lt;/span&gt;
  &lt;span class="nx"&gt;inventory&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;      &lt;span class="c1"&gt;// Real-time stock levels&lt;/span&gt;
  &lt;span class="nx"&gt;originalPrice&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;  &lt;span class="c1"&gt;// For discount calculations&lt;/span&gt;
  &lt;span class="nx"&gt;lastUpdated&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;     &lt;span class="c1"&gt;// Track data freshness&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Service layer abstraction allows swapping data sources&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;mapHitToProduct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;indexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;Product&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;hit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objectID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;hit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unknown Product&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;hit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;hit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salePrice&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// Supports multiple price fields&lt;/span&gt;
    &lt;span class="c1"&gt;// ... mapping ready for any data source&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This design choice ensures that when real e-commerce APIs become available, the transition will require minimal code changes - just updating the data source layer while keeping all ML, personalization, and UI components intact.&lt;/p&gt;

&lt;p&gt;This project demonstrates how Algolia's powerful search capabilities, when combined with AI and personalization, can create a truly intelligent shopping assistant that adapts to each user's unique preferences while respecting their privacy.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>algoliachallenge</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built CGMB: An MCP That Unifies Claude Code, Gemini CLI, and Gemini API</title>
      <dc:creator>ryoto miyake</dc:creator>
      <pubDate>Mon, 07 Jul 2025 16:00:00 +0000</pubDate>
      <link>https://dev.to/ryoto_miyake/i-built-cgmb-an-mcp-that-unifies-claude-code-gemini-cli-and-gemini-api-3b0i</link>
      <guid>https://dev.to/ryoto_miyake/i-built-cgmb-an-mcp-that-unifies-claude-code-gemini-cli-and-gemini-api-3b0i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;As English is not my first language, this post has been carefully translated and refined from the original Japanese version I wrote, which you can find on  &lt;a href="https://qiita.com/goodaymmm/items/47554b8440278bea6df1" rel="noopener noreferrer"&gt;Qiita&lt;/a&gt; here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When exploring tool development using Gemini CLI, I noticed that Google provides generous free usage quotas. By combining these with Claude Code, I thought we could create an &lt;strong&gt;MCP that complements Claude Code's missing capabilities (image generation, audio synthesis, etc.)&lt;/strong&gt;, expanding AI utilization possibilities while keeping costs low. This led to the development of CGMB.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/goodaymmm/claude-gemini-multimodal-bridge" rel="noopener noreferrer"&gt;&lt;strong&gt;CGMB (Claude-Gemini Multimodal Bridge)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is CGMB? — An MCP for Optimal Claude-Gemini Integration
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎯 Overview
&lt;/h3&gt;

&lt;p&gt;CGMB is equipped with intelligence that understands user intent and automatically routes tasks to the optimal AI layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic switching between 3 AI layers&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer Name&lt;/th&gt;
&lt;th&gt;Functionality&lt;/th&gt;
&lt;th&gt;Application Scenarios&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;Logic processing, long-text summarization, code analysis&lt;/td&gt;
&lt;td&gt;Advanced reasoning, long-form responses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini CLI&lt;/td&gt;
&lt;td&gt;Current information, URL analysis&lt;/td&gt;
&lt;td&gt;Latest news retrieval, web search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini API&lt;/td&gt;
&lt;td&gt;Image/audio/file generation&lt;/td&gt;
&lt;td&gt;Multimodal generation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: For convenience, Gemini API is defined as AI Studio in the code.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Feature List&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🧠 Auto Routing&lt;/td&gt;
&lt;td&gt;Analyzes PDF, URL, image instructions, etc., and automatically routes to the optimal AI.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🖼️ Multimodal&lt;/td&gt;
&lt;td&gt;Supports image generation from text and audio synthesis via Gemini API.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔄 Stabilization Technology&lt;/td&gt;
&lt;td&gt;Implements acceleration through credential caching and retry mechanisms for errors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;💬 Claude Code Integration&lt;/td&gt;
&lt;td&gt;Can be executed directly from within Claude Code using natural language prompts like &lt;code&gt;CGMB ○○&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔐 Secure Authentication&lt;/td&gt;
&lt;td&gt;Supports secure API key management through &lt;code&gt;.env&lt;/code&gt; files and OAuth integration.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Unified AI Experience
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Complete within Claude Code:
"CGMB Search for the latest AI papers, summarize them, and generate related concept diagrams"

→ Automatic coordination of 3 AIs:
  1. Gemini CLI searches for latest papers
  2. Claude Code analyzes and summarizes content
  3. AI Studio (Gemini API) generates concept diagrams

Everything completed in one interface (Time required: 1/3 of traditional approach)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Installation and Initial Setup
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/goodaymmm/claude-gemini-multimodal-bridge" rel="noopener noreferrer"&gt;&lt;strong&gt;CGMB (Claude-Gemini Multimodal Bridge)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Deep Dive: Behind the Scenes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Intelligent Routing
&lt;/h3&gt;

&lt;p&gt;The most complex implementation in CGMB was the request routing logic and its associated error handling.&lt;br&gt;
For natural language prompts from users (e.g., "Summarize /path/to/report.pdf"), CGMB internally performs the following decisions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input Analysis&lt;/strong&gt;: Analyzes strings, file paths, and URLs contained in prompts using regular expressions and pattern matching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource Type Identification&lt;/strong&gt;: Identifies whether the input is a local PDF, a web URL, or plain text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimal Backend Selection&lt;/strong&gt;: Routes to the optimal backend service - PDFs to Claude, web pages to Gemini CLI, image generation instructions to Gemini API, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management and Fallback&lt;/strong&gt;: If a specified backend (e.g., Gemini CLI) is in an authentication error state, processing is halted and a clear error message is returned to the user. This prevents unexpected behavior or incomplete processing results.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By implementing this series of processes robustly, users can focus on their tasks without being aware of backend complexity.&lt;/p&gt;
&lt;h3&gt;
  
  
  Choosing MCP Server
&lt;/h3&gt;

&lt;p&gt;By adopting the MCP protocol, CGMB achieved the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Future-proofing&lt;/strong&gt;: As the MCP ecosystem grows, integration with other tools is also envisioned&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standards compliance&lt;/strong&gt;: Adherence to industry standards rather than proprietary protocols&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By adopting the standardizing MCP protocol, CGMB functions not as an isolated tool but as part of a growing ecosystem, gaining the potential to extend with other tools that may emerge in the future.&lt;/p&gt;
&lt;h2&gt;
  
  
  Unifying Different AI Services
&lt;/h2&gt;

&lt;p&gt;The biggest challenge faced during development was &lt;strong&gt;unifying the response formats of different AI services&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Claude Code, Gemini CLI, and Gemini API each have different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Response formats&lt;/strong&gt;: JSON, plain text, binary data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error handling&lt;/strong&gt;: HTTP status codes, exceptions, custom errors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Asynchronous processing&lt;/strong&gt;: Promises, callbacks, streaming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To absorb these differences, we implemented a unified interface layer.&lt;/p&gt;

&lt;p&gt;Additionally, to improve image generation quality, we also implemented &lt;strong&gt;automatic English translation for multilingual prompts&lt;/strong&gt;. Since Gemini API's image generation achieves optimal results with English prompts, we designed a mechanism that automatically translates prompts input in Japanese or other languages to English internally. This allows users to make requests naturally in their native language while obtaining high-quality image generation results.&lt;/p&gt;

&lt;p&gt;By abstracting the functionality of each AI service to match the structured tool definitions required by the MCP protocol, users can now have a consistent experience without being aware of the implementation details of different AI services.&lt;/p&gt;
&lt;h2&gt;
  
  
  Summary: A New Paradigm for AI Integration
&lt;/h2&gt;

&lt;p&gt;CGMB presents a new approach that makes multiple AIs "collaborate" rather than "compete."&lt;/p&gt;
&lt;h3&gt;
  
  
  Insights Gained Through Development
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. The Importance of Right Tool for Right Job&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rather than trying to solve everything with one AI, the combination that leverages each AI's strengths proved most efficient. By properly combining Claude Code's reasoning capabilities, Gemini CLI's distributed token information retrieval, and Gemini API's generation capabilities, we can create value that cannot be achieved individually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. UX-First Design Philosophy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By making all functions accessible through the unified keyword &lt;code&gt;CGMB&lt;/code&gt;, users can focus on what they want to achieve without being aware of implementation details. This minimized learning costs while maximizing productivity.&lt;/p&gt;
&lt;h3&gt;
  
  
  Expected Use Cases
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Technical Blog Writing Support&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"CGMB Research the new features in Rust 1.70 and generate illustrated sample code"
→ Gemini CLI gathers latest information → Claude Code creates technical explanations → AI Studio (Gemini API) generates illustrations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Automatic Presentation Material Generation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"CGMB Generate images explaining our company's tech stack and create audio narration"
→ Claude Code creates structure → AI Studio (Gemini API) generates charts → Audio synthesis creates narration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Multilingual Document Expansion&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"CGMB Analyze README.md and generate explanatory images for main features in both Japanese and English"
→ Claude Code analyzes documents → AI Studio (Gemini API) generates multilingual images
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Community Contribution
&lt;/h3&gt;

&lt;p&gt;CGMB is released under the MIT license and is available at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/goodaymmm/claude-gemini-multimodal-bridge" rel="noopener noreferrer"&gt;goodaymmm/claude-gemini-multimodal-bridge&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;NPM: &lt;a href="https://www.npmjs.com/package/claude-gemini-multimodal-bridge" rel="noopener noreferrer"&gt;claude-gemini-multimodal-bridge&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Future Expansion Plans
&lt;/h3&gt;

&lt;p&gt;We are planning the following feature expansions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Planned Implementations&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OCR PDF Analysis&lt;/strong&gt;: Text extraction from scanned PDFs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video Generation&lt;/strong&gt;: Video content generation using Gemini API&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If reading this article made you think "I might want to try this out," that alone makes developing it worthwhile. If you find bugs, please let me know. Ideas like "It would be nice to have this feature" are also very welcome.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>gemini</category>
      <category>mcp</category>
    </item>
    <item>
      <title>"AI-Powered Development: Building a Java/Python LoRA Model Without Writing a Single Line of Code"</title>
      <dc:creator>ryoto miyake</dc:creator>
      <pubDate>Tue, 17 Jun 2025 16:00:00 +0000</pubDate>
      <link>https://dev.to/ryoto_miyake/ai-powered-development-building-a-javapython-lora-model-without-writing-a-single-line-of-code-1of8</link>
      <guid>https://dev.to/ryoto_miyake/ai-powered-development-building-a-javapython-lora-model-without-writing-a-single-line-of-code-1of8</guid>
      <description>&lt;p&gt;Hello everyone,&lt;/p&gt;

&lt;p&gt;I am an aspiring software engineer from Japan, currently transitioning from a non-technical background and seeking new opportunities.&lt;/p&gt;

&lt;p&gt;This article serves as my portfolio, documenting an experiment I conducted to answer a single question: &lt;strong&gt;"Can you build a fine-tuned LLM without writing a single line of code yourself?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As English is not my first language, this post has been carefully translated and refined from the original Japanese version, which you can find on Qiita &lt;a href="https://qiita.com/goodaymmm/items/daead2024a1d087177ca" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My goal is to share the valuable lessons I learned about AI-driven development with a global audience. The complete source code is also available on &lt;a href="https://github.com/goodaymmm/LoRA_Java_Python" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I'm currently enrolled in a vocational training program for Java and Python development in Japan.&lt;br&gt;
In this era of rapid AI evolution, I found myself asking: "How should engineers approach coding in the AI age?"&lt;br&gt;
To explore this question, I embarked on an experimental project: &lt;strong&gt;"Having AI write all the code for LoRA fine-tuning."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Through this challenge, I gained clarity on the skills required for AI-era engineers and what we should focus on learning.&lt;br&gt;
In this article, I'll share the insights and practical lessons learned from this journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🎯 Why I Decided to Have AI Write LoRA&lt;/li&gt;
&lt;li&gt;🛠️ Tools Used&lt;/li&gt;
&lt;li&gt;🧩 Implementation Approach&lt;/li&gt;
&lt;li&gt;✍️ What I Had AI Write (Full Prompts Included)&lt;/li&gt;
&lt;li&gt;🐞 Challenges and AI's Mistakes&lt;/li&gt;
&lt;li&gt;🔬 Performance Evaluation&lt;/li&gt;
&lt;li&gt;🔁 Reflection&lt;/li&gt;
&lt;li&gt;🏁 Conclusion&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Why I Decided to Have AI Write LoRA
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Catalyst
&lt;/h3&gt;

&lt;p&gt;I noticed that existing generative AI models struggle with specialized niche content (highly specialized fields, etc.), and realized that these issues could be solved through efficiency improvements by additional training with specialized data.&lt;/p&gt;

&lt;p&gt;Upon discovering that incorporating custom training data could solve these problems, I explored approaches to achieve this and adopted LoRA—&lt;strong&gt;"an efficient training method that specializes models on prepared data by training only additional parameters while maintaining pre-trained models."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Have AI Write It?
&lt;/h3&gt;

&lt;p&gt;Writing LoRA code from scratch is extremely challenging for programming beginners, but we have a modern tool at our disposal: AI.&lt;br&gt;
This led me to the question: &lt;strong&gt;"Can this challenge be solved by having AI write everything?"&lt;/strong&gt; And so I put it into action.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Tools Used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Development Environment

&lt;ul&gt;
&lt;li&gt;Cursor: Using Agent feature with Claude 3.7 Sonnet integration&lt;/li&gt;
&lt;li&gt;Claude Desktop: Used alongside for error handling and distributing token usage&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;I have monthly subscriptions to both Cursor and Claude Pro versions.&lt;/p&gt;

&lt;p&gt;For questions about errors and issues, I used Claude Desktop instead of Cursor's built-in Ask feature.&lt;br&gt;
*Note: During the later stages of development, Claude 4.0 was released, so issues encountered from that point were addressed using Claude 4.0.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why I Didn't Use Claude Code, Windsurf, or Devin

&lt;ul&gt;
&lt;li&gt;Token usage was unpredictable during the planning phase&lt;/li&gt;
&lt;li&gt;Claude Code wasn't available for Pro users at that time&lt;/li&gt;
&lt;li&gt;I had already subscribed to Cursor and Claude Pro plans&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Implementation Approach
&lt;/h2&gt;

&lt;p&gt;First, I outlined the roadmap to implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[1] Prerequisites and Setup&lt;/li&gt;
&lt;li&gt;[2] Downloading the Base Model&lt;/li&gt;
&lt;li&gt;[3] Formatting Custom Datasets&lt;/li&gt;
&lt;li&gt;[4] Executing LoRA Fine-tuning&lt;/li&gt;
&lt;li&gt;[5] Implementing Inference Code&lt;/li&gt;
&lt;li&gt;[6] Deploying Model and Results&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;[1] Prerequisites and Setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since I was learning Java and Python, I decided to build an LLM specialized in these languages.&lt;br&gt;
The envisioned end product was a conversational AI similar to ChatGPT.&lt;/p&gt;

&lt;p&gt;I decided to use Docker to publish the final product on GitHub and enable others to reproduce the same environment.&lt;br&gt;
Additionally, since GPU usage was necessary, I defined CUDA utilization as a prerequisite.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[2] Downloading the Base Model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I selected ELYZA-japanese-CodeLlama-7b.&lt;/p&gt;

&lt;p&gt;The selection criteria were: 7B models were optimal for my PC specs, strong code generation capabilities, &lt;br&gt;
and its pre-training with a focus on the Japanese language.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Alternatives Considered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mistral-7B: High versatility but inferior in code specialization&lt;/li&gt;
&lt;li&gt;Gemma-7B: Similarly more general-purpose&lt;/li&gt;
&lt;li&gt;Larger models: Excluded due to VRAM resource constraints&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;[3] Formatting Custom Datasets&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;I started by extracting data through web scraping from the following three sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub&lt;/li&gt;
&lt;li&gt;AtCoder from CodeContests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The selection criteria were as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub

&lt;ul&gt;
&lt;li&gt;Limited to highly-rated repositories with 1000+ stars&lt;/li&gt;
&lt;li&gt;High-quality code that has undergone code review&lt;/li&gt;
&lt;li&gt;Learning production-level code structures&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;del&gt;Qiita&lt;/del&gt;

&lt;ul&gt;
&lt;li&gt;&lt;del&gt;Abundant technical explanations in Japanese&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Enhanced learning effect through code-explanation pairs&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Strengthening Japanese code generation capabilities&lt;/del&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;AtCoder

&lt;ul&gt;
&lt;li&gt;Code patterns for algorithmic thinking&lt;/li&gt;
&lt;li&gt;Efficient code under constraints&lt;/li&gt;
&lt;li&gt;Practical solutions from competitive programming&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;These were my selection criteria.&lt;/p&gt;

&lt;p&gt;Qiita was initially a scraping target but was removed.&lt;br&gt;
The reason was dataset quality issues, which I'll detail later.&lt;/p&gt;

&lt;p&gt;After extraction, I converted these into JSON format for fine-tuning.&lt;/p&gt;

&lt;p&gt;[4] Executing LoRA Fine-tuning&lt;br&gt;
[5] Implementing Inference Code&lt;br&gt;
[6] Deploying Model and Results&lt;br&gt;
These three steps encountered issues, so I'll describe them in the later section.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. What I Had AI Write
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Everything!&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here's the initial prompt I provided:&lt;/p&gt;

&lt;p&gt;Full Prompt&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Please build according to the following requirements.
Implementation is intended for Ubuntu under Docker environment, so please generate Dockerfile and Docker Compose as well.
Also, don't forget CUDA setup as we'll be using GPU for tuning.
Expected GPU specs: RTX 4070 Ti Super with 16GB VRAM.
Expected physical memory: 32GB.
Expected CPU: i7-14700K.

Download ELYZA-japanese-CodeLlama-7b (URL omitted in this article) to local environment and build a local CodeLLaMA by LoRA fine-tuning with Java/Python data.
Required datasets are as follows:
- GitHub
- Qiita
- AtCoder from CodeContests
These will be scraped.

Also, scraping intervals should be 1 second for GitHub and 2 seconds for Qiita.
Total scraping count should be 100 items each for both GitHub and Qiita.

For AtCoder data, please scrape from the following URL:
[URL omitted in this article]

API tokens for CodeLLaMA, GitHub, and Qiita will be input by the user later.
Since users will input environment variable settings, please include environment variables in the code.

Next, proceed to dataset formatting.
Please output code to format the scraped datasets into JSON.

After formatting, please output code for LoRA fine-tuning.
Then implement inference code.

Finally, document all these procedures including execution commands in a README.MD file.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Of course, this alone didn't work perfectly.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Challenges and AI's Mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Docker Compose Issues
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Problems:

&lt;ul&gt;
&lt;li&gt;The generated Docker Compose didn't properly allocate CPU and memory&lt;/li&gt;
&lt;li&gt;AtCoder decompression was estimated to take about 26-27 hours&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Root Cause:

&lt;ul&gt;
&lt;li&gt;Despite providing host PC specs, appropriate Docker Compose wasn't generated&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Solution:

&lt;ul&gt;
&lt;li&gt;Added supplementary prompts considering WSL environment + memory/GPU/CPU allocation instructions&lt;/li&gt;
&lt;li&gt;Since I was using WSL→Docker connection, I also optimized WSLConfig (manual adjustment)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Here's the corrective prompt I provided:&lt;/p&gt;

&lt;p&gt;Docker Compose Reconfiguration Prompt&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;The current Docker Compose configuration doesn't fully utilize the host PC's specifications.
Host PC environment:
i7-14700K with 20 cores (8P+12E), 64GB memory, GPU is RTX 4070 Ti Super (16GB VRAM).
Please reconfigure to use 16 CPU cores, up to 48GB memory maximum, and allocate 10GB GPU memory.
Since the environment is built with Host PC→WSL→Docker connection, please leave about 4GB memory for WSL.
RTX 4070 Ti Super is a non-MIG compatible device, so please allocate 10GB memory using an alternative approach.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After the fix, I was able to build utilizing the host PC environment properly.&lt;br&gt;
This required more careful attention to the source code - a point for reflection.&lt;/p&gt;

&lt;h3&gt;
  
  
  API Errors During GitHub Scraping
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Problems:

&lt;ul&gt;
&lt;li&gt;Frequent API errors due to ambiguous scraping constraints&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Root Cause:

&lt;ul&gt;
&lt;li&gt;Undefined constraints that should have been determined&lt;/li&gt;
&lt;li&gt;Improper filtering settings&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Solution:

&lt;ul&gt;
&lt;li&gt;Clearly specified scraping targets&lt;/li&gt;
&lt;li&gt;Improved filtering and sorting to enhance scraping accuracy&lt;/li&gt;
&lt;li&gt;Defined appropriate resource allocation&lt;/li&gt;
&lt;li&gt;Rewrote with additional constraint instructions based on the above&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Constraints Prompt&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Please add the following constraints to the GitHub scraper:
- API interval should be 1 second
- Skip files with encoding: none
- Add file size limit (process only files under 1MB)
- Implement filtering to detect only .py and .java files
- Extract only repositories with 1000+ stars
- Set default maximum directory traversal depth to 2
- Since resources are ample, set parallel processing that won't hit API limits
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These constraints helped eliminate waste and optimize processing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fine-tuning Errors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Problem:

&lt;ul&gt;
&lt;li&gt;TensorBoard not installed error&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Root Cause:

&lt;ul&gt;
&lt;li&gt;TensorBoard wasn't installed&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Solution:

&lt;ul&gt;
&lt;li&gt;Resolved by installing TensorBoard&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;The AI-generated code was missing necessary library installation definitions.&lt;br&gt;
An interesting discovery that AI can make human-like mistakes and isn't perfect.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multiple Errors During Inference
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Problems:

&lt;ul&gt;
&lt;li&gt;Failed when loading LoRA Adapter for inference&lt;/li&gt;
&lt;li&gt;First and second training attempts resulted in repeated "oreferrer" responses&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Root Cause:

&lt;ul&gt;
&lt;li&gt;Dataset cleaning wasn't optimized&lt;/li&gt;
&lt;li&gt;Base model produced good results, confirming the issue was on the LoRA side&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Solution:

&lt;ul&gt;
&lt;li&gt;Re-cleaned the dataset and re-executed LoRA training&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;The issue was resolved after the third training attempt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benchmark Errors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Problems:

&lt;ul&gt;
&lt;li&gt;All questions failed during HumanEval benchmark testing with LoRA&lt;/li&gt;
&lt;li&gt;Simple tests adapted to training showed good results&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Root Cause:

&lt;ul&gt;
&lt;li&gt;LoRA trained on 3-space indented code while Python PEP 8 standard is 4 spaces&lt;/li&gt;
&lt;li&gt;Failed to properly incorporate Qiita articles into the dataset&lt;/li&gt;
&lt;li&gt;Determined the issue was with the trained model quality, not the evaluation method&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Solution:

&lt;ul&gt;
&lt;li&gt;Decided to rebuild from dataset formation, excluding Qiita&lt;/li&gt;
&lt;li&gt;Instructed code modifications for re-formation and re-training accordingly&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;note info&lt;br&gt;
While I understood intellectually that &lt;strong&gt;"dataset quality determines model performance,"&lt;/strong&gt; this failure made me acutely aware of its importance. This was a valuable lesson that could only be gained through practice.&lt;/p&gt;

&lt;p&gt;After re-execution, the project was completed successfully. Let me proceed with the accuracy report.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Performance Evaluation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Benchmark
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;a href="https://github.com/bigcode-project/bigcode-evaluation-harness" rel="noopener noreferrer"&gt;Bigcode's HumanEval&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Executed standard 164 problems&lt;/li&gt;
&lt;li&gt;Performance comparison between Code Llama 7B / ELYZA-japanese-Llama-7b / LoRA / GPT-4&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Score Comparison
&lt;/h3&gt;

&lt;p&gt;Model comparison of pass@1 scores:&lt;/p&gt;

&lt;h3&gt;
  
  
  Vertical Bar Chart
&lt;/h3&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.amazonaws.com%2Fuploads%2Farticles%2Fc5nk490drm06pfl33x95.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.amazonaws.com%2Fuploads%2Farticles%2Fc5nk490drm06pfl33x95.png" alt="pass1-score-bar-chart.png" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Horizontal Line Chart
&lt;/h3&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.amazonaws.com%2Fuploads%2Farticles%2F6gd1unh6lzs0ktw79iwg.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.amazonaws.com%2Fuploads%2Farticles%2F6gd1unh6lzs0ktw79iwg.png" alt="pass1-score-line-chart.png" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While GPT-4's score is overwhelming, our tuning successfully improved performance from the base model steadily.&lt;br&gt;
This demonstrates the effectiveness of specialization even with small-scale datasets, &lt;br&gt;
and I believe the results show potential to approach higher-tier models with larger datasets and further refinements.&lt;/p&gt;

&lt;p&gt;Next, the pie chart shows the degree of performance improvement from the base model through our tuning:&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.amazonaws.com%2Fuploads%2Farticles%2Fdctv64he5no1lk7wj8g0.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.amazonaws.com%2Fuploads%2Farticles%2Fdctv64he5no1lk7wj8g0.png" alt="lora-improvement-diagram.png" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Note; Benchmark executions showed score fluctuations of approximately ±3%)&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Reflection
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What Went Well
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Completed the Project&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The experience of setting a goal and seeing it through to completion was significant.&lt;br&gt;
I was able to build a proper roadmap to the outcome, and feel my approach was generally correct.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Written Entirely by AI&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I achieved my goal as planned.&lt;br&gt;
When given appropriate prompts, AI can implement even highly complex problems at a high level.&lt;br&gt;
Understanding architecture and being able to articulate it clearly remains essential for providing appropriate specifications.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Embracing New Knowledge&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While I had developed Java applications before, that didn't extend much beyond my existing knowledge.&lt;br&gt;
This project required starting from scratch with new knowledge, but I felt no resistance to learning in new domains.&lt;/p&gt;

&lt;p&gt;If generative AI alone can accomplish this, it reinforced a key insight for me: in this new era of creation, "small teams or individuals can rapidly develop valuable services with the right ideas." This realization was a major gain.&lt;/p&gt;

&lt;p&gt;Having previously self-taught video editing, I had relatively low resistance to new domains, but this experience further strengthened my ability to approach new challenges from scratch with a positive mindset.&lt;/p&gt;

&lt;h3&gt;
  
  
  Points for Improvement
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Underestimating the Scope&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cause was misjudging the development scale estimation.&lt;br&gt;
This was a medium-scale development of about 2000 lines. For writing larger-scale projects, I should have adopted Claude Code, which excels at parallel development by dividing work into phases and tickets with clear role separation, making debugging and error resolution easier - rather than using Cursor Agent.&lt;/p&gt;

&lt;p&gt;While the improvement might seem minimal due to the small learning scale, it was a valuable discovery that even small datasets can show improvements.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dataset Selection&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using existing datasets made implementation relatively easy and straightforward to form.&lt;br&gt;
The experience of how careless selection can muddy the data was extremely valuable.&lt;/p&gt;

&lt;p&gt;Considering actual operation, I feel I could have tried more niche subjects for dataset formation.&lt;br&gt;
Next time, I plan to tackle development with user experience in mind.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Understanding Architecture&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My understanding of LLM architecture was insufficient, which seemed to cause frequent errors especially around inference.&lt;br&gt;
With deeper understanding, I could have provided more detailed initial prompts and reduced the amount of rework needed.&lt;br&gt;
In the future, I want to prioritize time for understanding the overall technical landscape before implementation to improve development accuracy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges
&lt;/h3&gt;

&lt;p&gt;My personal challenge is determining how much AI can be leveraged in actual workplace settings.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Main Challenges:

&lt;ul&gt;
&lt;li&gt;Is the configuration suitable for maintenance and operations?&lt;/li&gt;
&lt;li&gt;Is the code free from spaghetti code patterns?&lt;/li&gt;
&lt;li&gt;What about security design?&lt;/li&gt;
&lt;li&gt;AI might not perform well with proprietary frameworks&lt;/li&gt;
&lt;li&gt;Can it be applied when joining ongoing projects?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;These challenges are difficult to see in individual development alone, and I'm eager to learn through practical work experience. My next challenge is understanding how to meet workplace requirements such as code maintainability in team development and security levels demanded by products.&lt;/p&gt;

&lt;h3&gt;
  
  
  Future Applications
&lt;/h3&gt;

&lt;p&gt;By utilizing LLMs, we can adapt to various fields.&lt;br&gt;
The success of LoRA fine-tuning depends on how well we can transform highly unique or specialized fields into quality training data. Therefore, deepening knowledge in structuring domain expertise and dataset design becomes a more important differentiating factor than technical implementation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Next Steps
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Building on the insights and confidence gained from this project, I'm currently challenging myself with more applied development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm currently building an MCP client, applying professional software development practices to its creation.&lt;br&gt;
Specifically, it's an Android app themed around &lt;strong&gt;personalization&lt;/strong&gt;.&lt;br&gt;
I'm documenting this creation process as well and will publish it later.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Conclusion
&lt;/h2&gt;

&lt;p&gt;Through this project, I didn't directly acquire the skill of writing LoRA code from scratch by hand.&lt;br&gt;
However, I was able to question the essence of "writing code" and practice a new form of engineering that maximizes the use of AI as a tool to achieve objectives - and this was the greatest gain of all.&lt;/p&gt;

&lt;p&gt;It was also a valuable opportunity to test how far I could push my output capabilities when standing in the engineering arena, and I realized that "learning with AI" is an extremely meaningful approach for me.&lt;/p&gt;

&lt;p&gt;Even within the AI trend, LoRA fine-tuning is a topic that allows deep learning of architectural principles and approaches, and the modern environment is sufficiently equipped for beginners to get started.&lt;/p&gt;

&lt;p&gt;By touching upon the simple truth that &lt;strong&gt;"the quality of questions determines outcomes,"&lt;/strong&gt; I gained significant learning in developing &lt;strong&gt;"questioning skills"&lt;/strong&gt; - something often lacking in beginners.&lt;/p&gt;

&lt;p&gt;I hope this helps others who are similarly thinking about creating something with AI.&lt;br&gt;
And I myself want to continue challenging further applications and contributions based on this experience.&lt;/p&gt;

&lt;p&gt;Thank you for reading to the end.&lt;/p&gt;

&lt;p&gt;If you have any opinions or concerns, please feel free to let me know in the comments.&lt;br&gt;
I would like to incorporate them into future articles and activities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contact Information
&lt;/h3&gt;

&lt;p&gt;If you're interested in this project or in me personally, please feel free to contact me.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Email&lt;/strong&gt;: &lt;code&gt;ry.miyake.worker@gmail.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn&lt;/strong&gt;: &lt;a href="https://www.linkedin.com/in/ryoto-miyake-954a3936a" rel="noopener noreferrer"&gt;ryoto-miyake-954a3936a&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>development</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
