{"id":5531,"date":"2026-08-30T23:10:42","date_gmt":"2026-08-30T14:10:42","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/gemini-kicad-pcb-design-automation-2\/"},"modified":"2026-08-30T23:10:43","modified_gmt":"2026-08-30T14:10:43","slug":"gemini-kicad-pcb-design-automation","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/diy-repair\/3d-printer-cnc\/gemini-kicad-pcb-design-automation\/","title":{"rendered":"Automating PCB Design with Generative AI (Gemini\/Antigravity) and KiCad"},"content":{"rendered":"<p>On a certain YouTube channel, a review of semi-automated circuit design using EasyEDA and generative AI was recently showcased. Witnessing the ongoing shift toward AI integration in cloud-based EDA environments inspired me to explore whether a similar level of automation could be achieved in &quot;KiCad,&quot; the open-source EDA tool I routinely rely on in my local environment.<\/p>\n<p>To enable AI to directly operate tools within a local setup, I utilized the &quot;MCP (Model Context Protocol)&quot; proposed by Anthropic. By having an LLM such as Gemini invoke KiCad&#8217;s internal APIs via an MCP server, the goal is to build a streamlined automation pipeline ranging from natural language prompt instructions to schematic creation, PCB layout, and fabrication data export.<\/p>\n<h2>Failure with the VSCode Configuration and Migration to Antigravity IDE<\/h2>\n<p>Initially, I began testing by combining VSCode\u2014a development environment I am very familiar with\u2014with the Roo Code extension to integrate the Gemini API, KiCAD-MCP-SERVER, and KiCad (VSCode + Roo Code + Gemini API + KiCAD-MCP-SERVER + KiCad).<\/p>\n<p>However, with this setup, the process halted right at the stage of sending a request to the Gemini API and froze while awaiting a response. This was likely caused by payload bloat due to numerous MCP tool definitions and high client-side processing loads, though I was unable to isolate the exact logs.<\/p>\n<p>Therefore, I decided to completely migrate my Gemini development environment from VSCode to Google&#8217;s AI IDE, &quot;Antigravity IDE,&quot; and overhaul the entire system architecture.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4184\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1.png\" alt=\"KiCad MCP Connection Architecture Comparison (VSCode \/ Antigravity)\" width=\"960\" height=\"540\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1.png 960w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-300x169.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-768x432.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-320x180.png 320w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-530x298.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-565x318.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-710x399.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/KiCad_MCP_Comparison_Architecture-1-725x408.png 725w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<h2>KiCAD-MCP-Server Installation and Setup Procedure<\/h2>\n<p>As a prerequisite for integration into Antigravity IDE, you need to install and build the &quot;KiCAD-MCP-Server&quot;\u2014the MCP server designed to control KiCad\u2014in your local environment.<\/p>\n<p>The repository provides a PowerShell script (setup-windows.ps1) that automates environment setup for Windows. Utilizing this script allows you to complete the setup in one go without having to follow manual build procedures.<\/p>\n<p>However, if multiple versions of KiCad are installed on your system, you must modify the <code>$versions<\/code> variable around line 85 of <code>setup-windows.ps1<\/code> to place the version you wish to use at the very beginning of the array.<\/p>\n<p>By default, version 9.0 is listed first as shown below, so you will need to change it to the head of the array if you want to use the latest version 10.0.<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">$versions = @(&amp;quot;10.0&amp;quot;, &amp;quot;9.0&amp;quot;, &amp;quot;9.1&amp;quot;, &amp;amp;amp;amp;amp;amp;lt;del&amp;amp;amp;amp;amp;amp;gt;&amp;quot;10.0&amp;quot;,&amp;amp;amp;amp;amp;amp;lt;\/del&amp;amp;amp;amp;amp;amp;gt; &amp;quot;8.0&amp;quot;)<\/pre>\n<p>Launch PowerShell with administrator privileges, navigate to the directory where you cloned the repository, and run the following commands.<\/p>\n<h3>Cloning and Setting Up the Repository<\/h3>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\ncd C:\ngit clone https:\/\/github.com\/mixelpixx\/KiCAD-MCP-Server.git\ncd KiCAD-MCP-Server\nSet-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process\n.\\setup-windows.ps1\n<\/pre>\n<p>Running this script automatically generates the necessary execution file <code>dist\\index.js<\/code> along with the configuration template file <code>windows-mcp-config.json<\/code>.<\/p>\n<h2>Configuring Antigravity IDE and Applying windows-mcp-config.json<\/h2>\n<p>The procedure for integrating the MCP server into Antigravity IDE is very straightforward.<\/p>\n<ol>\n<li>In the bottom-left corner of Antigravity IDE, select &quot;Settings&quot; > &quot;Customizations&quot; > &quot;Open MCP Config&quot; under Installed MCP Servers.<\/li>\n<li>This opens the directory containing <code>mcp_config.json<\/code> in File Explorer. Open <code>mcp_config.json<\/code> using a text editor like Notepad.<\/li>\n<li>Copy the contents of <code>windows-mcp-config.json<\/code> (which was automatically output upon completion of <code>setup-windows.ps1<\/code>), paste them directly into <code>mcp_config.json<\/code>, and save the file.<\/li>\n<li>Click &quot;Refresh&quot; under Installed MCP Servers in Customizations. Once &quot;kicad&quot; is added and displays a green indicator light, the setup is complete.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4196\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec.png\" alt=\"Adding the MCP Server\" width=\"661\" height=\"648\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec.png 661w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec-300x294.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec-75x75.png 75w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec-530x520.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/08\/e3c8c23e18392c765be1e050186e2cec-565x554.png 565w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/a><\/p>\n<p>The configuration content (example output of <code>windows-mcp-config.json<\/code>) is as follows:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n  &amp;quot;mcpServers&amp;quot;: {\n    &amp;quot;kicad&amp;quot;: {\n      &amp;quot;command&amp;quot;: &amp;quot;node&amp;quot;,\n      &amp;quot;args&amp;quot;: &#x5B;\n        &amp;quot;C:\\KiCAD-MCP-Server\\dist\\index.js&amp;quot;\n      ],\n      &amp;quot;env&amp;quot;: {\n        &amp;quot;PYTHONPATH&amp;quot;: &amp;quot;C:\\\\Program Files\\\\KiCad\\\\10.0\\\\lib\\\\python3\\\\dist-packages&amp;quot;,\n        &amp;quot;KICAD_AUTO_LAUNCH&amp;quot;: &amp;quot;true&amp;quot;,\n        &amp;quot;LOG_LEVEL&amp;quot;: &amp;quot;info&amp;quot;\n      }\n    }\n  }\n}\n<\/pre>\n<p>There is no need to manually construct complex execution paths or environment variables; simply pasting the generated JSON sets up the integration environment with KiCad 10.0. Regarding MCP connection specifications and environment variable handling in Antigravity IDE, I referred to the following official documentation:<\/p>\n<p><a href=\"https:\/\/antigravity.google\/docs\/mcp\">Antigravity IDE Documentation &#8211; MCP<\/a><br \/>\n<a href=\"https:\/\/docs.cloud.google.com\/data-cloud-extension\/antigravity\/use-mcp-servers\">Google Cloud Documentation &#8211; Use MCP servers<\/a><\/p>\n<h2>Execution via Natural Language Prompt and Results<\/h2>\n<p>Once the environment setup was complete, I executed the following prompt instruction from the Antigravity IDE prompt field:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPlease create a circuit for a battery (3V) and an LED (5mm).\nAssume implementation using single-sided copper-clad board.\n<\/pre>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/c8f90a6dedc1e110e3fee14d3b05f5bb.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4188\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/c8f90a6dedc1e110e3fee14d3b05f5bb.png\" alt=\"Prompt Instruction\" width=\"680\" height=\"272\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/c8f90a6dedc1e110e3fee14d3b05f5bb.png 680w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/c8f90a6dedc1e110e3fee14d3b05f5bb-300x120.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/c8f90a6dedc1e110e3fee14d3b05f5bb-530x212.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/c8f90a6dedc1e110e3fee14d3b05f5bb-565x226.png 565w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>The Gemini agent autonomously invoked the MCP server tools, automatically generating the following deliverables all at once without requiring manual GUI intervention:<\/p>\n<ul>\n<li>Schematic (.kicad_sch): Automatically placed a CR2032 coin cell battery holder (BT1), 100\u03a9 resistor (R1), and 5mm LED (D1), connecting the nets properly.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4192\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1.png\" alt=\"Automatically Generated Schematic\" width=\"917\" height=\"350\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1.png 917w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1-300x115.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1-768x293.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1-530x202.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1-565x216.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1-710x271.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4ca53cd9d8f2969ff0f1b0cf40c34ac4-1-725x277.png 725w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/a><\/p>\n<ul>\n<li>PCB Layout (.kicad_pcb): Placed components within a 40mm \u00d7 45mm board outline, applying extra-thick 2.56mm traces on the bottom layer (B.Cu). Since the LED orientation was reversed and traces crossed, it rotated the component to avoid intersection and placed a solid GND fill across the board.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4193\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e.png\" alt=\"Automatically Generated PCB Data\" width=\"743\" height=\"838\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e.png 743w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e-266x300.png 266w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e-470x530.png 470w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e-501x565.png 501w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e-630x710.png 630w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/4b128c33f3cd41458e277b7d2c70ff7e-643x725.png 643w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/><\/a><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4191\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1.png\" alt=\"3D View of Automatically Generated PCB Data\" width=\"731\" height=\"713\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1.png 731w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1-300x293.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1-530x517.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1-565x551.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1-710x693.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/07\/58abb3c5b09ec89df0b8ee67224e66e2-1-725x707.png 725w\" sizes=\"(max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<ul>\n<li>CNC Machining Data: Exported the bottom layer pattern (BatteryLED-B_Cu.gbl), board outline cut (BatteryLED-Edge_Cuts.gm1), and drill files (BatteryLED.drl) to the designated folder.<\/li>\n<\/ul>\n<p>Within a short time after inputting the prompt, a complete set of files ready to be loaded directly into CAM software was generated. This successfully confirmed the practicality of an environment that directly controls local EDA using generative AI.<\/p>\n<p><a href=\"https:\/\/amzn.to\/4yW32u2\" target=\"_blank\" rel=\"noopener\" data-blogcard=\"1\">Sunhayato Copper Clad Laminate (Cut Board) Single-Sided No. 31<\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>Inspired by a YouTube video, I tested automated KiCad PCB design using Gemini by combining Antigravity IDE and KiCAD-MCP-SERVER. To resolve the freezing issues experienced in the VSCode environment, I migrated to Antigravity IDE to simplify the architecture. Environment setup was completed simply by modifying and running <code>setup-windows.ps1<\/code>, then applying the resulting <code>windows-mcp-config.json<\/code> to <code>mcp_config.json<\/code> via Antigravity&#8217;s settings menu (Settings > Customizations > Open MCP Config). Through prompt instructions alone, I fully automated everything from schematic creation and PCB layout\u2014including extra-thick 2.56mm traces and solid GND fills\u2014to Gerber outputs for CNC machining.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On a certain YouTube channel, a review of semi-automated circuit design using EasyEDA and generative AI was re [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":4198,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=4181","footnotes":""},"categories":[1152],"tags":[1158,1161,1006,51,52,384,1157,1159,1160,1162,47,10,104,270],"class_list":["post-5531","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3d-printer-cnc","tag-antigravity","tag-cnc","tag-gemini","tag-git","tag-https","tag-kicad","tag-kicad-mcp-server","tag-mcp","tag-pcb","tag-powershell","tag-python","tag-server","tag-104","tag-270","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=5531"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5531\/revisions"}],"predecessor-version":[{"id":5534,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5531\/revisions\/5534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/4198"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=5531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=5531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=5531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}