[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110598":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":41,"updatedAt":42,"readmeContent":43,"aiSummary":44,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":45,"discoverSource":46},110598,"heypcb-mcp","HeyPCB\u002Fheypcb-mcp","HeyPCB","HeyPCB for AI agents: an MCP server that gives Claude Code, Codex, Cursor and claude.ai a PCB engineer. npx -y @heypcb\u002Fmcp","https:\u002F\u002Fheypcb.ai\u002Fmcp",null,"TypeScript",73,6,52,2,0,4,9,18,13,56.84,"MIT License",false,"main",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"ai-agents","autorouter","claude-code","codex","cursor","eda","electronics","jlcpcb","kicad","lcsc","mcp","mcp-server","model-context-protocol","pcb","pcb-design","2026-11-02 17:54:16","2026-11-23 15:18:16","# @heypcb\u002Fmcp\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fmain\u002Fdocs\u002Fimages\u002Fboard-3d.png\" width=\"760\" alt=\"3D view on heypcb.ai of a 40 by 20 mm board that Claude Code built through this MCP server with build_board: a USB-C connector, a 2 by 3 pin ISP header, four WS2812B RGB LEDs in a row and a push button on a green board\">\n\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Csub>Built from Claude Code with \u003Ccode>build_board\u003C\u002Fcode>: one brief in, a board ready to order out (all 15 fab checks passed; 4 DRC warnings left).\u003C\u002Fsub>\u003C\u002Fp>\n\nHeyPCB for AI agents. Add HeyPCB to Claude Code, Codex, Cursor or Claude\nDesktop and design real KiCad boards from your agent: HeyPCB's server does\nthe engineering (Inky's design agent, parts, placement, routing, DRC\u002FERC,\nfab checks), and your agent calls a few high-level tools such as\n`build_board`, `get_board`, `check_board` and `export`. Or your agent\ndesigns the board itself with HeyPCB's parts library, proven circuit blocks\nand checks: `search_parts`, `get_part`, `add_parts`, `add_block`, `connect`,\n`get_netlist` and the rest of the parts and circuit tools, then lays it out\nwith `set_board_outline`, `set_board_rules`, `move_part`, `lock_parts`,\n`add_ground_pour` and `get_board_layout`, and takes it to fab-ready by\nfollowing `check_board`: every finding names the call that fixes it\n(`fixWith`). It sees what it built with `preview_board` (chosen layers,\nhighlighted nets and parts, open connections), measures it with\n`inspect_net`, `inspect_part` and `check_placement`, says where parts go with\n`set_placement_rules`, controls copper with `rip_up_net`, `add_pour`,\n`add_keepout` and `stitch_vias`, goes back through the board's history with\n`list_history`, `restore_board` and `redo`, and reads the playbook with\n`get_guide`.\n\n## Two ways to design\n\n| | You say | Your agent calls |\n|---|---|---|\n| **Let HeyPCB design it** | \"Build a USB-C powered board for …\" | `build_board`, `get_board`, `check_board`, `export`. HeyPCB's server does the engineering: Inky's design agent, parts, placement, routing, DRC\u002FERC and fab checks. |\n| **Let your agent design it** | \"Add an LDO and wire it to the MCU\" | Parts and blocks: `search_parts`, `get_part`, `add_parts`, `add_block`, `connect`, `get_netlist`. Layout: `set_board_outline`, `set_board_rules`, `move_part`, `lock_parts`, `add_ground_pour`, `get_board_layout`. Then `check_board` until the board is fab-ready. Each finding names the call that fixes it (`fixWith`). |\n\n### On heypcb.ai\n\nThe same board in the heypcb.ai editor: the PCB, and the schematic around\nthe ATtiny85:\n\n![The board's PCB in the heypcb.ai editor: a 40 by 20 mm two-layer board with the USB-C connector J1 at the left edge, the ISP header J2, four WS2812B LEDs D1 to D4 along the top, their capacitors, and the button SW1, all routed, with a copper pour](https:\u002F\u002Fraw.githubusercontent.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fmain\u002Fdocs\u002Fimages\u002Fboard-pcb.png)\n\n![Part of the board's schematic in the heypcb.ai editor: the decoupling capacitors C1 to C5 (100nF) and C6 (10uF) on 5V, and the left side of the ATtiny85 U1, with RESET on PB5 pulled up by R4 10k, LED_DATA on PB3 through R1 330R to LED_DIN, and the button SW1 on PB4](https:\u002F\u002Fraw.githubusercontent.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fmain\u002Fdocs\u002Fimages\u002Fboard-schematic.png)\n\n### Change it by asking\n\nFrom Claude Code: the request and Claude's `ask_inky` call, then its\nanswer once Inky finished. `ask_inky` returns while Inky is still working;\nthe 7 minutes of `wait_for_turn` calls in between are cut at the dashed\nline:\n\n![A Claude Code session: the request to make the board 48 mm long with two M2 mounting holes at the right end, Claude's call to heypcb's Ask Inky tool with the project and that message, and, below a dashed line where the wait is cut, Claude's answer after Inky finished: 48 by 20 mm, two 2.2 mm holes for M2 screws, the parts and routing where they were, all 51 connections routed with 3 more vias (now 30), 0 DRC errors, and a note that the last save has not been re-checked yet](https:\u002F\u002Fraw.githubusercontent.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fmain\u002Fdocs\u002Fimages\u002Fclaude-code-ask-inky.png)\n\nThe board before and after, at the same scale:\n\n![get_board_image's 3D render of the board before and after the change, at the same scale: before, 40 by 20 mm; after, 48 by 20 mm, with the same parts in the same places and two M2 mounting holes at the right end, the copper pour extended a little and kept clear of them](https:\u002F\u002Fraw.githubusercontent.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fmain\u002Fdocs\u002Fimages\u002Fask-inky-before-after.png)\n\n## Quick start\n\nHeyPCB runs the MCP server for you at `https:\u002F\u002Fapi.heypcb.ai\u002Fmcp` (Streamable\nHTTP, OAuth sign-in in your browser). Nothing to install:\n\n```sh\nclaude mcp add --transport http heypcb https:\u002F\u002Fapi.heypcb.ai\u002Fmcp\n```\n\n[![Add to Cursor](https:\u002F\u002Fcursor.com\u002Fdeeplink\u002Fmcp-install-dark.svg)](https:\u002F\u002Fcursor.com\u002Finstall-mcp?name=heypcb&config=eyJ1cmwiOiJodHRwczovL2FwaS5oZXlwY2IuYWkvbWNwIn0%3D)\n\nclaude.ai (as a custom connector) takes the same URL. Codex cannot sign in\nto the remote server (since codex-cli 0.165 it refuses an approve page on\nanother origin than the issuer), so give Codex the local server below. One\npaste adds it and signs it in with a code:\n\n```sh\ncodex mcp add heypcb -- npx -y @heypcb\u002Fmcp && npx -y @heypcb\u002Fmcp login\n```\n\n### Which one do I need?\n\n| | Remote server | Local server (this package) |\n|---|:---:|:---:|\n| Install | nothing | Node.js 18+ |\n| All HeyPCB tools | ✅ | ✅ |\n| Work on a KiCad project in its own folder, edits synced back | ❌ | ✅ `open_kicad_project` |\n| Upload a copy of a KiCad project from your disk | ❌ | ✅ `upload_kicad_project` |\n| Save Gerbers, BOM, CPL, STEP to a folder | ❌ | ✅ `save_export` |\n| HeyPCB parts in the project's own libraries | ❌ | Awaiting the parts-assets API |\n| KiCad's own DRC\u002FERC and exports, free and offline | ❌ | ✅ `check_local`, `export_local` |\n\nUse the remote server unless you use Codex or need one of the local tools.\n\n## Tools\n\nBoth servers offer every tool below, with the same names; the local server\nadds [its own](#the-local-server-this-package). Each tool's full description\nand input schema come from the server itself, so your agent always reads the\ncurrent ones.\n\nSeven tools run paid engine work, at what the same work costs on heypcb.ai:\n`build_board`, `ask_inky`, `answer_decision`, `check_board`, `route_board`,\n`place_parts` and `preview_placement` (`estimate` prices them first). Every\nother tool says it is free in its own description; the design and layout\ntools are rate-limited.\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Let HeyPCB design it\u003C\u002Fb>\u003C\u002Fsummary>\n\n| Tool | What it does |\n|---|---|\n| `whoami` | Your HeyPCB account, plan, balance and what can run. |\n| `list_projects` | Your HeyPCB boards: id, name, last update, web link. |\n| `create_project` | Create an empty HeyPCB board project. |\n| `build_board` | Design a whole PCB from a plain-language brief: schematic, parts, placement, routing and checks. |\n| `ask_inky` | One turn of Inky, HeyPCB's design agent, on a project: a question or an edit. |\n| `wait_for_turn` | Wait for a running Inky turn and return its result. |\n| `stop_turn` | Stop a running Inky turn at its next step. |\n| `answer_decision` | Answer a decision Inky asked for (for example approve the layout). |\n| `get_board` | Board facts: layers, size, parts, nets, routed %, DRC\u002FERC counts, fab readiness, web link. |\n| `get_board_image` | A picture of the PCB (top or bottom), a schematic page or the 3D view. |\n| `check_board` | Run DRC, ERC and the placement check, the full verification, or the fab check, with findings. |\n| `route_board` | Autoroute the board, or only the nets you name, and return the result. |\n| `place_parts` | Re-place the board's parts. |\n| `preview_placement` | Plan a re-place on a copy and show it before anything moves. |\n| `apply_placement` | Land a previewed placement plan exactly, as one undoable change. |\n| `export` | Gerbers, KiCad project, BOM, pick-and-place or STEP as a short-lived download link. |\n| `read_design` | Read the design or a schematic\u002Fboard file's text for inspection. |\n| `estimate` | The price of an operation before running it. |\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Design it yourself: parts and circuit\u003C\u002Fb>\u003C\u002Fsummary>\n\n| Tool | What it does |\n|---|---|\n| `search_parts` | Find real, orderable parts: LCSC stock and price, verified footprints, KiCad symbols. |\n| `get_part` | A part's pins and facts: an LCSC part card, a KiCad symbol's pins, or a part on the board. |\n| `add_parts` | Add parts to the board's design; the board places them. |\n| `remove_parts` | Delete parts from the design and the board. |\n| `set_part_value` | Change one part's value in place. |\n| `rename_part` | Rename a designator everywhere: design, nets, schematic and board. |\n| `source_parts` | Give every unsourced part an orderable LCSC part. |\n| `connect` | Connect pins (REF.PIN) into named nets. |\n| `disconnect` | Remove pins from every net they are on. |\n| `list_blocks` | HeyPCB's proven circuit blocks (USB-C power, regulators, MCU modules…). |\n| `add_block` | Add a proven circuit block to the design. |\n| `set_net_class` | Set a net class: width, clearance, current, impedance, differential pairs. |\n| `rename_net` | Rename a net. |\n| `set_no_connect` | Toggle a no-connect flag on a pin. |\n| `get_netlist` | Every net with its pins, class, drivers and current grade. |\n| `get_design_summary` | The design in one compact read: parts, nets, counts, unsourced parts. |\n| `get_schematic` | One schematic page as text, with the page list. |\n| `tidy_schematic` | Re-lay the schematic's hand-placed symbols with HeyPCB's own layout. |\n| `get_capable_pins` | Which MCU pins can carry a function (UART, I2C, SPI, PWM…) and are free. |\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Design it yourself: the board\u003C\u002Fb>\u003C\u002Fsummary>\n\n| Tool | What it does |\n|---|---|\n| `set_board_outline` | Set the board's outline in mm (rect, rounded, circle, polygon…), with corner mounting holes. |\n| `set_board_rules` | Set the copper layers, HDI, metal core or flex, thickness, colours and finish, and the design rules, e.g. JLCPCB's. |\n| `move_part` | Move parts on the board: x\u002Fy, a shift, beside a pin, against an edge; a routed board keeps its routing. |\n| `lock_parts` | Pin parts where they are so place_parts keeps them. |\n| `unlock_parts` | Release locked parts. |\n| `set_placement_rules` | Say where parts go: edges, locks, caps by a pin, signal chains, rings and grids. |\n| `add_ground_pour` | Pour the GND plane once routing is finished. |\n| `add_pour` | Pour copper on any net and layer, once routing is finished. |\n| `remove_pour` | Take a copper pour off the board. |\n| `add_keepout` | Keep an area clear of tracks, vias, pads, pours or parts. |\n| `rip_up_net` | Delete a net's tracks and vias so it can be routed again. |\n| `stitch_vias` | Stitch a net's pours together with a grid of vias. |\n| `tune_lengths` | Match lengths of a bus or a differential pair with meanders, kept only when DRC holds. |\n| `add_text` | Write text on the board (silkscreen, copper or mask). |\n| `add_mounting_hole` | Put a screw hole (M2–M4) on the board. |\n| `tidy_silkscreen` | Re-place every silkscreen designator beside its part, clear of pads and openings. |\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>See, measure and go back\u003C\u002Fb>\u003C\u002Fsummary>\n\n| Tool | What it does |\n|---|---|\n| `get_board_layout` | The layout in one read: outline, layers, rules, every part's place, rotation, side and box. |\n| `preview_board` | A CAD view of the board: chosen layers, highlighted nets and parts, open connections, cropped. |\n| `inspect_net` | A net measured: status, copper per layer, vias, every open connection pin to pin. |\n| `inspect_part` | A part measured: place, edge gaps, neighbours, open pins, the nearest cap to each supply pin. |\n| `check_placement` | Grade the placement: decoupling, crystals, connectors at edges; each finding names its fix. |\n| `check_routing` | Grade routed copper against pairs, matched lengths and impedance the net classes state. |\n| `undo` | Undo the last change to a project. |\n| `list_history` | Every change the board can go back through, and what redo can put back. |\n| `restore_board` | Put the board back to any point in its history, in one guarded call. |\n| `redo` | Put back changes undo or restore_board took back. |\n| `save_checkpoint` | Save the whole board under a label, past the 50 changes the history keeps. |\n| `delete_checkpoint` | Delete a saved checkpoint. |\n| `get_guide` | The playbook for designing a board with these tools yourself. |\n\n\u003C\u002Fdetails>\n\n`preview_board` shows your agent what it built. Here it highlights the\nLEDs' data chain, from the series resistor through D1 to D4:\n\n![preview_board's picture of the same board: every track dimmed, and the four nets of the WS2812B data chain, LED_DIN, LED_1_TO_2, LED_2_TO_3 and LED_3_TO_4, drawn bright cyan](https:\u002F\u002Fraw.githubusercontent.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fmain\u002Fdocs\u002Fimages\u002Fpreview-board.png)\n\n## The local server (this package)\n\n`npx -y @heypcb\u002Fmcp` runs a small MCP server on your computer (stdio). It\npasses every HeyPCB tool through to the remote server unchanged, with the\nsame names, schemas, results, progress and cancellation. It has no design\nlogic of its own. It adds the tools that need your files:\n\n| Tool | What it does |\n|---|---|\n| `open_kicad_project` | Binds a KiCad project folder on this computer to one HeyPCB project, so every HeyPCB tool works on it and its edits land back in the folder ([see below](#working-on-a-kicad-project-in-its-own-folder)). |\n| `upload_kicad_project` | Zips a KiCad project folder on this computer (board, schematic hierarchy, `.kicad_pro`, `.kicad_dru`, library tables and project-local libraries, but not 3D models, backups or `.kicad_prl`; at most 50 MB) and imports it as a new, separate HeyPCB project: a one-off copy. Returns the project id and its web link. |\n| `save_export` | Saves Gerbers, the KiCad project, BOM, pick-and-place (CPL) or STEP into a folder here, atomically, and returns the file's path. |\n| `install_parts` (not advertised) | Refuses before writing until the server exposes a supported parts-assets API. |\n| `check_local` | KiCad's own DRC or ERC on the project here, with `kicad-cli`: free, no network. A fast pre-check; `check_board` stays the full verification. |\n| `export_local` | Gerbers (+ drill), BOM, pick-and-place or STEP from the project here, with `kicad-cli`. |\n| `restore_local` | Puts back files a sync backed up before HeyPCB's changes replaced them. |\n\nIt needs Node.js 18 or newer and nothing else. Everything it uses is bundled\ninto one file. `check_local` and `export_local` also need KiCad 8 or newer\ninstalled (`kicad-cli` on `PATH`, or in KiCad's standard install folder).\n\n### 1. Sign in (once per computer)\n\n**Option A: sign in with a code**\n\n```sh\nnpx @heypcb\u002Fmcp login\n```\n\nIt opens heypcb.ai\u002Fconnect and shows a code; check the page shows the same\ncode and approve. The sign-in is stored in `~\u002F.config\u002Fheypcb\u002Fcredentials.json`\n(`%APPDATA%\\heypcb\\credentials.json` on Windows), readable only by you. A\nrunning server picks it up on its next call, without a restart.\n\n**Option B: use a personal key**\n\nMake one in **heypcb.ai → Settings → Devices & API keys** and give it to the\nserver as `HEYPCB_API_KEY` (examples below). A key is used instead of a\nstored sign-in while it is set.\n\n> [!TIP]\n> Without either, the server still starts, and every tool answers with these\n> two ways to sign in.\n\n### 2. Add it to your agent\n\n#### Claude Code\n\n```sh\nclaude mcp add heypcb -- npx -y @heypcb\u002Fmcp\n# or with a personal key instead of `login`:\nclaude mcp add heypcb -e HEYPCB_API_KEY=hpcb_pk_… -- npx -y @heypcb\u002Fmcp\n```\n\n#### Cursor\n\n[![Add to Cursor](https:\u002F\u002Fcursor.com\u002Fdeeplink\u002Fmcp-install-dark.svg)](https:\u002F\u002Fcursor.com\u002Finstall-mcp?name=heypcb&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoZXlwY2IvbWNwIl19)\n\nOr add it by hand to `.cursor\u002Fmcp.json` in your project (or `~\u002F.cursor\u002Fmcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"heypcb\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@heypcb\u002Fmcp\"]\n    }\n  }\n}\n```\n\n#### Codex\n\nIn `~\u002F.codex\u002Fconfig.toml`:\n\n```toml\n[mcp_servers.heypcb]\ncommand = \"npx\"\nargs = [\"-y\", \"@heypcb\u002Fmcp\"]\n# env = { HEYPCB_API_KEY = \"hpcb_pk_…\" }\n```\n\n#### Claude Desktop\n\nIn `claude_desktop_config.json` (Settings → Developer → Edit Config):\n\n```json\n{\n  \"mcpServers\": {\n    \"heypcb\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@heypcb\u002Fmcp\"],\n      \"env\": { \"HEYPCB_API_KEY\": \"hpcb_pk_…\" }\n    }\n  }\n}\n```\n\n### 3. Try it\n\nAsk your agent, for example:\n\n- \"Upload my KiCad project at `~\u002Fboards\u002Fsensor` to HeyPCB and run the full check.\"\n- \"Save the Gerbers and BOM for that project into `~\u002Fboards\u002Fsensor\u002Ffab`.\"\n- \"Open my KiCad project at `~\u002Fboards\u002Fsensor`, add a 3.3 V LDO and route the board.\"\n\n### Working on a KiCad project in its own folder\n\nAsk your agent to open the project (`open_kicad_project` with its folder).\nThe first time, the folder is uploaded as a new HeyPCB project and bound to\nit in `.heypcb\u002Fworkspace.json` (added to `.gitignore` when the folder is in a\ngit repository). From then on, every HeyPCB tool called on that project\nkeeps the folder in sync:\n\n- **before a call**, a changed project is uploaded as a complete zip against its last synced revision;\n- **after a call that changes the design**, the files HeyPCB changed come\n  back. The old ones are copied to `.heypcb\u002Fbackup\u002F\u003Crevision>\u002F` first, and\n  the result tells your agent which files to reload in KiCad;\n- **a file you save in KiCad while a call runs is never overwritten**:\n  HeyPCB's version is written beside it as `\u003Cfile>.heypcb-new`, and syncing\n  waits until you choose (`on_conflict: \"take_heypcb\"` or `\"keep_local\"`).\n  The same choice resolves an edit made on heypcb.ai and here at once;\n- part-library installation is not advertised yet: the current API does not\n  serve the required part assets. Direct `install_parts` attempts refuse before writing.\n\nThe project stays a normal KiCad project: open it in KiCad at any time.\nList files you never want uploaded in a `.heypcbignore` next to the\n`.kicad_pro` (one gitignore-style pattern a line).\n\n### Commands\n\n```text\nnpx -y @heypcb\u002Fmcp          run the MCP server on stdio (what your agent runs)\n     --max-spend \u003Camount>   block potentially charged calls until server-side caps are supported\nnpx @heypcb\u002Fmcp login       sign in with a code (--no-browser prints the link only)\nnpx @heypcb\u002Fmcp logout      sign out here and end that sign-in on HeyPCB\nnpx @heypcb\u002Fmcp status      who this computer is signed in as\n```\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Environment variables\u003C\u002Fb>\u003C\u002Fsummary>\n\n| Variable | Meaning |\n|---|---|\n| `HEYPCB_API_KEY` | A personal key (`hpcb_pk_…`). Used instead of a stored sign-in. |\n| `HEYPCB_MCP_URL` | The remote server. Default `https:\u002F\u002Fapi.heypcb.ai\u002Fmcp`. |\n| `HEYPCB_API_BASE` | The API host for sign-in and the local tools. Default: the MCP URL's host, and it must be that host. |\n| `HEYPCB_WEB_BASE` | Where project links point. Default `https:\u002F\u002Fheypcb.ai`. |\n| `HEYPCB_CONFIG_DIR` | Where the sign-in is stored. |\n| `HEYPCB_MCP_TIMEOUT_MS` | How long one remote call may run without progress. Default 10 minutes. |\n\n\u003C\u002Fdetails>\n\n### What it does with your computer\n\n- **Reads** a project's files when you call `upload_kicad_project`,\n  `open_kicad_project`, `check_local` or `export_local`, and before each\n  HeyPCB call on a bound project: only the project's own files listed\n  above, minus what `.heypcbignore` names. **A bound project's files are\n  uploaded to HeyPCB**, again whenever you change them. A file or link that\n  leads outside the project folder stops the upload; nothing partial is sent.\n- **Writes**, in a bound project folder, the files HeyPCB changed (after\n  backing up the old ones in `.heypcb\u002Fbackup\u002F`), `.heypcb\u002F` itself, the\n  `heypcb` libraries and lib-table entries `install_parts` adds, and\n  `exports\u002F` for `export_local`. It never writes outside the project folder\n  there, never through a link that leads out of it, and never over a file\n  you changed since the last sync.\n- **Writes** other files only when you call `save_export`: inside your home\n  folder (it creates missing folders), or into an existing folder elsewhere\n  that you can write to. It never follows a link out of your home folder,\n  never writes into folders that hold keys (`~\u002F.ssh`, `~\u002F.aws`, …), never\n  overwrites a file unless you pass `overwrite: true`, and writes through a\n  temp file it renames into place.\n- **Your sign-in** is only ever sent to the API host it was issued by, over\n  https (plain http only to `localhost`). Refreshes are coordinated between\n  every copy of the server running on your computer, so two agents never\n  spend the same refresh token.\n- **Names your agent and this computer** to HeyPCB, so a board's history\n  can say \"Sam, with Claude Code on Sams-MacBook-Pro\": `login` sends this\n  computer's name (its hostname), and every request the name your agent\n  gives itself when it starts the server (Claude Code calls itself \"Claude\n  Code\"). With a personal key, the history names neither.\n\nIf a connection drops after an edit starts, the edit may still complete.\nThe server returns `write_outcome_unknown` with `inspectWith`, naming the\nread to make before sending another edit. It never automatically repeats\nthat write. A read can be retried safely; a running operation is collected\nusing its existing turn, job or handle.\n\n## Billing\n\nTools cost what the same work costs on heypcb.ai, from the same account and\nwallet. `estimate` prices an operation before it runs; `whoami` shows the\nbalance — and, from the local server, what this session has spent. The\nlocal tools are free.\n\nA session `--max-spend` or per-call `_meta.heypcb.maxCost` is a spending\nconstraint. The current server does not advertise enforcement of these\nmetadata caps, so potentially charged calls are refused before dispatch\nwhen any cap is supplied (including zero). Verified free reads and local\ntools remain usable. Without a cap, pre-existing remote behavior is\nunchanged. A client-generated key does not itself prove server billing\nidempotency; a lost write reply still requires readback, never blind replay.\nSession charge totals are shown only when the server supplied charge data;\nmissing billing metadata is unmeasured, not a measured zero.\n\n## Troubleshooting\n\n| Problem | Fix |\n|---|---|\n| Every tool says to sign in | Run `npx @heypcb\u002Fmcp login`, or set `HEYPCB_API_KEY`. Check with `npx @heypcb\u002Fmcp status`. |\n| Claude Desktop can't find `npx` | It starts servers with a short `PATH`. Put the full path from `which npx` in `command`. |\n| Codex says to sign in after `login` worked | Codex starts servers with a short environment. If you set `HEYPCB_CONFIG_DIR` or `XDG_CONFIG_HOME`, pass it on: `codex mcp add heypcb --env HEYPCB_CONFIG_DIR=… -- npx -y @heypcb\u002Fmcp`. |\n| Running `npx @heypcb\u002Fmcp` in a terminal prints a hint and waits | That's expected: your agent starts the server, not you. Add it to your agent as shown above. |\n| A long call stops with `remote_timeout` | It may still be running on HeyPCB. Read its state (`wait_for_turn` for a turn, `get_board` for a board) before calling it again, or raise `HEYPCB_MCP_TIMEOUT_MS`. |\n\n## Source\n\nThe source is at https:\u002F\u002Fgithub.com\u002FHeyPCB\u002Fheypcb-mcp. Issues and pull\nrequests are welcome there; see `CONTRIBUTING.md`, and send security\nreports as described in `SECURITY.md`. Releases are mirrored there from\nHeyPCB's own repository. That GitHub repository's CI then publishes each\nrelease to npm with provenance, so npm links each version to the commit\nand the build that made it.\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Development\u003C\u002Fb>\u003C\u002Fsummary>\n\nThe package has its own pnpm lockfile and is its own workspace root.\n\n```sh\npnpm install --ignore-workspace --frozen-lockfile\npnpm run typecheck\npnpm run test          # node --test against a fake HeyPCB host\npnpm run build         # dist\u002Fcli.js, one bundled file\npnpm run test:smoke    # the built file over stdio\n```\n\nReleasing: bump `version` in `package.json` and `src\u002Fversion.ts` (a test\nholds them equal) and add the release to `CHANGELOG.md`. When that commit\nreaches `main` in heypcb-mcp, its CI publishes it to npm, with provenance, if\nthat version is not on npm yet.\n\n\u003C\u002Fdetails>\n\n## Changes\n\nWhat each release changed is in\n[CHANGELOG.md](https:\u002F\u002Fgithub.com\u002FHeyPCB\u002Fheypcb-mcp\u002Fblob\u002Fmain\u002FCHANGELOG.md).\n\n## License\n\nMIT; see `LICENSE`. The bundled packages' notices are in\n`dist\u002FTHIRD-PARTY-NOTICES.txt` in the published package.\n","HeyPCB MCP 是一个面向 AI 编程代理的 PCB 设计协议服务，基于 Model Context Protocol（MCP）标准，为 Claude Code、Codex、Cursor 等 AI 开发工具提供专业级电子设计能力。它支持两种工作模式：一是通过高层指令（如 build_board）由后端自动完成原理图生成、元器件选型、布局布线、DRC\u002FERC 及 JLCPCB\u002FLCSC 等厂商的可制造性检查；二是开放细粒度 API（如 add_part、connect、set_board_outline、check_board），供 AI 代理自主完成全流程设计。项目深度集成 KiCad 工具链与主流国产供应链（JLCPCB、LCSC），输出可直接下单的生产文件。适用于硬件原型快速迭代、AI 辅助电路设计教学及嵌入式工程师与大模型协同开发场景。","2026-11-24 04:39:24","CREATED_QUERY"]