Repository navigation
copper-pilot mcp: CopperPilot's design tools for Claude Code/Cursor/Codex, with login inside the MCP - #89
Merged
Conversation
… the MCP host The default MCP server is now the tool session the Claude Agent and Codex chats use (about 160 design tools, the playbook, copperpilot_subagent) instead of the delegating ask/plan/run conductor (kept as --conductor). - Starts without a login: lists copperpilot_login and copperpilot_status; copperpilot_login runs the browser device login from the host, returns the link to show the user, and sends tools/list_changed once approved. - The CopperPilot guide is the server's instructions when logged in. - Altium staged edits are applied after each edit call (MCP has no turn end). - Workspace defaults to CLAUDE_PROJECT_DIR, else cwd. - auth login prints the link and skips the flow when already logged in (--force to log in again); browsers open without inheriting stdout. - README: step-by-step install for an agent asked to install the MCP. - Plugin 0.2.0 uses the design tools (server name copperpilot).
…der Auto
Nobody can approve a prompt over MCP, so every edit tool's bridge write to a
.kicad_sch/.kicad_pcb was refused ('ToolRejected: write was rejected'). Same
rule as a Claude Agent chat in the TUI (runtime.py): KiCad design files inside
the workspace written by CopperPilot's tools are routine; outside still refused.
Found in the Haiku design bench (L1, first edit).
…e Code and logs in The ST-35 onboarding story (Claude Code on Haiku asked to 'Install the CopperPilot MCP') showed Claude following the README's separate steps but never running the login and never telling the user to restart Claude Code. - copper-pilot mcp install: claude mcp add --scope user copperpilot with this installation's absolute path; device login with the link printed and a ~90 s foreground wait, then a detached helper finishes the login on the same link; ends with 'NEXT STEPS (tell the user)', restart first. - README install section is now two commands plus relaying those steps; tagline and PyPI description/keywords mention the MCP server (discovery).
…outine writes Found by the Haiku design bench: every run stalled before routing because install_kicad_autorouter (writes .copperpilot/skills/kicad_autorouter/main.py), install_kicad_lib_search and set_kicad_project_design_rules (writes the .kicad_dru) were refused: nobody can approve a prompt over MCP. - .kicad_dru, sym-lib-table and fp-lib-table count as KiCad design files for tool-socket writes (also fixes the Claude Agent/Codex chats under Auto). - New broker flag routine_skill_writes: files under .copperpilot/skills/ are routine; only the standalone MCP server sets it (its host approves each CopperPilot tool call). The TUI still asks.
ST-35 candidate2: Claude read the README through WebFetch (a prompt-shaped summary), kept the by-hand 'claude mcp add' alternative and skipped the login. The install block (uv tool install + copper-pilot mcp install + restart) now sits right under the badges, and the agent section has no by-hand variant.
ST-35 candidate4: with COPPER_PILOT_API_URL set, 'claude mcp add -e K=V copperpilot' let the variadic -e swallow the name, registration failed and the NEXT STEPS (restart) were never shown. -e now follows the name; on a failed registration the steps give the manual command and still say to restart. README: if Claude Code's auto mode blocks a step, the user runs it with '!'.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
copper-pilot mcponly exposed whole-turn delegating tools (ask/plan/run), so Claude Code over MCP got far less than a Claude Agent chat in the desktop app or CLI (BYOA), which gets every granular design tool, the guide and the playbook. Installing it also needed a terminal login before the server would do anything.What
copper-pilot mcpnow serves the BYOA tool session by default: about 160 design tools (reads, edits, batches, sync, ERC/DRC, autorouter skills, research),read_copperpilot_playbook,load_server_skill, andcopperpilot_subagent. The CopperPilot guide becomes the serverinstructionswhen logged in, and is also available as the resourcecopperpilot://guide. The old delegating tools are still there behindcopper-pilot mcp --conductor;--tools-sessionis kept as a hidden no-op for existing configs.copperpilot_loginandcopperpilot_status.copperpilot_loginstarts the device flow, opens the browser (without inheriting stdout, so the stdio stream is safe) and returns the link for the agent to show the user.notifications/tools/list_changed, so the design tools appear without restarting Claude Code..kicad_dru,sym-lib-tableandfp-lib-tablenow count as design files too. This also helps Claude Agent and Codex chats under Auto.routine_skill_writes: the skill installers (autorouter, library search, fab order) can write under.copperpilot/skills/. Only the standalone MCP sets it, because there the host approves each CopperPilot tool call; the TUI still asks. Before this, every bench run stalled before routing.copper-pilot mcp install: one command that runsclaude mcp add --scope user copperpilotwith this installation's absolute path, then the device login.--workspace, elseCLAUDE_PROJECT_DIR, else cwd.copper-pilot auth loginprints the link (for SSH and headless use) and says "Already logged in" instead of starting a new flow (--forceto log in again).uv tool install copper-pilot-cliandcopper-pilot mcp install, then restart), plus a detailed section for agents. It is placed at the top so it survives the WebFetch summaries Claude reads READMEs through. The tagline and the PyPI description and keywords now mention the MCP server, to help discovery.docs/cli.mdanddocs/harness.mdare updated to match.copperpilot), and its agent and review skill are rewritten for them.Testing
make lint(ruff clean;tyshows only diagnostics that were already on main) andpytest -m "not live": 1149 passed. Newtests/test_mcp_standalone.pycovers the logged-out tool list, the login link → approve →list_changedsequence over a real in-memory MCP session, the guide as instructions, edit → apply, the revoked key, the other-server login and routine design writes.claude -pon Haiku 5.5 at low effort answered a net-count question throughmcp__copperpilot__query_design(6 nets, about $0.005).-eordering, the restart step). With this branch, Claude's owncopper-pilot mcp installtriggered the browser login, and after a restart the question was answered throughquery_design.