cherry-studio/src/main
LiuVaayne d41229c69b
Add browser CDP MCP server with session management (#11844)
*  feat: add CDP browser MCP server

* ♻️ refactor: add navigation timeout for browser cdp

* 🐛 fix: reuse window for execute and add debugger logging

*  feat: add show option and multiline execute for browser cdp

*  feat: support multiple sessions for browser cdp

* ♻️ refactor: add LRU and idle cleanup for browser cdp sessions

* Refactor browser-cdp for readability and set Firefox UA

* 🐛 fix: type electron mock for cdp tests

* ♻️ refactor: rename browser_cdp MCP server to browser

Simplify the MCP server name from @cherry/browser-cdp to just browser
for cleaner tool naming in the MCP protocol.

*  feat: add fetch tool to browser MCP server

Add a new `fetch` tool that uses the CDP-controlled browser to fetch URLs
and return content in various formats (html, txt, markdown, json).

Also ignore .conductor folder in biome and eslint configs.

* ♻️ refactor: split browser MCP server into modular folder structure

Reorganize browser.ts (525 lines) into browser/ folder with separate
files for better maintainability. Each tool now has its own file with
schema, definition, and handler.

* ♻️ refactor: use switch statement in browser server request handler

* ♻️ refactor: extract helpers and use handler registry pattern

- Add successResponse/errorResponse helpers in tools/utils.ts
- Add closeWindow helper to consolidate window cleanup logic
- Add ensureDebuggerAttached helper to consolidate debugger setup
- Add toolHandlers map for registry-based handler lookup
- Simplify server.ts to use dynamic handler dispatch

* 🐛 fix: improve browser MCP server robustness

- Add try-catch for JSON.parse in fetch() to handle invalid JSON gracefully
- Add Zod schema validation to reset tool for consistency with other tools
- Fix memory leak in open() by ensuring event listeners cleanup on timeout
- Add JSDoc comments for key methods and classes

* ♻️ refactor: rename browser MCP to @cherry/browser

Follow naming convention of other builtin MCP servers.

* 🌐 i18n: translate pending strings across 8 locales

Translate all "[to be translated]" markers including:
- CDP browser MCP server description (all 8 locales)
- "Extra High" reasoning chain length option (6 locales)
- Git Bash configuration strings (el-gr, ja-jp)
2025-12-16 09:29:30 +08:00
..
apiServer fix(apiServer): use 127.0.0.1 instead of localhost for better compatibility (#11673) 2025-12-04 10:57:42 +08:00
configs fix[SelectionAssistant]: shift+click behavior in macOS and clipboard behavior in Windows (#8390) 2025-07-23 17:24:26 +08:00
integration feat: enable cherryin provider 2025-09-23 20:19:05 +08:00
knowledge fix: ollama url (#11611) 2025-12-03 21:03:07 +08:00
mcpServers Add browser CDP MCP server with session management (#11844) 2025-12-16 09:29:30 +08:00
services fix: add gpustack provider for qwen3 enable think (#11843) 2025-12-11 18:16:47 +08:00
utils feat: Support custom git bash path (#11813) 2025-12-11 15:04:04 +08:00
bootstrap.ts refactor: move initAppDataDir function to a new utils module (#8337) 2025-07-21 15:46:14 +08:00
config.ts feat: enable cherryin provider 2025-09-23 20:19:05 +08:00
constant.ts feat: support portable config dir (#5039) 2025-04-24 17:23:56 +08:00
electron.d.ts feat: add the ability to display the application in tray #297 2024-11-09 08:42:09 +08:00
env.d.ts feat: added vite_main_bundle_id config and improved code cleanliness 2024-09-15 10:35:02 +08:00
index.ts feat: add MCP server log viewer (#11826) 2025-12-11 11:18:56 +08:00
ipc.ts feat: Add print to PDF and save as HTML for mini program webviews (#11104) 2025-12-11 16:42:33 +08:00