feat(bridge): keep the stdio bridge useful while the IDE is closed - #36
Merged
Merged
Conversation
- tools/list always returns the real tool list: the IDE's own once seen, otherwise the compiled definitions for the configured tool mode. - The read-only router tools (list_tool_categories, get_category_tools, search_tools) and prompts are answered locally. The server and the bridge now share runRouterDiscoveryTool so both answer identically. - With ARDUINO_AGENT_PATH set, a tool that needs the IDE starts it and waits for its MCP server; without it, the call returns an "open the IDE" tool error instead of failing to connect. - A watcher sends notifications/tools/list_changed when the IDE comes up or restarts with a different tool list. - Add a node:test suite (test/bridge, `yarn test:bridge`) and an offline-parity check to the manual smoke test; update the README, bridge README and skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
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.
Summary
The stdio bridge now stays useful while the Arduino Agent IDE is closed, instead of only reporting that the IDE isn't running.
tools/listalways returns the real tool list. That is the IDE's own list once the bridge has seen it, and otherwise the compiled definitions for the tool mode set in the IDE preferences.list_tool_categories,get_category_tools,search_toolsand the prompts are answered locally. The server and the bridge now sharerunRouterDiscoveryTool(inmcp-tool-router.ts), so both give the same answers.ARDUINO_AGENT_PATHset, a tool that needs the IDE starts it and waits for its MCP server. Without it, the call returns an "open the IDE" tool error instead of failing to connect.notifications/tools/list_changedwhen the IDE comes up or restarts with a different tool list, so clients refresh without a restart.The server-side change is a pure extraction. The three router cases in
mcp-server.tsmoved into the shared function without changing behavior.Test plan
npm run --prefix arduino-mcp-extension build(tsc) passes.yarn test:bridge: the newnode:testsuite (11 tests) runs the bridge against mock servers on random ports with a temporary home directory.test/manual/smoke-test.js) against a running IDE: all 14 checks pass, including the offline-parity checks (initialize instructions, tools/list and search_tools match the live server).search_toolsandget_category_toolsanswered offline, andexecute_tool arduino_contextstarted the IDE throughARDUINO_AGENT_PATHand returned its state.🤖 Generated with Claude Code