TidGi-Desktop/docs/MCP.md
lin onetwo 3718d0bd39
Fix/edit agent and several bugs (#670)
* refactor: simplify tool writing

* feat: load prompt from plugin in a wiki, let agent know what to do

based on https://github.com/TiddlyWiki/TiddlyWiki5/issues/9378

* fix: i18n

fix: i18n

fix: wrong i18n structure

fix: empty i18n

* Add ContentLoading component and suspense fallback

* fix: monaco loading

* docs: usage of chrome mcp to contron during dev

* fix: provider config truncate user input when typing

* fix: legacy usage

* Update package.json

* fix: not loadin initial data

* feat: better prompt sort

* fix: sorting of array

* fix: drag

* Create DragAndDrop.md

* feat: directly enter edit mode

* fix: workspace config change cause immediate main wiki restart

* Add 'Press Enter to confirm' to tag help texts

* fix: dont show system tag when adding sub wiki

* feat: inform user to press enter on tag auto complete

* refactor: let sub wiki auto complete tag

* Revert Add 'Press Enter to confirm' to tag help texts

* fix: not able to open prompt editor by click prompt tree

* fix: click to open plugin config

* chore: remove log

* feat: Auto-select the first file if none is selected

* fix: don't preview not enabled prompt parts

* fix: Keep i18n ally think these keys exist, otherwise it will delete them during "check usage"

* lint: fix

* Update externalAPI.logging.test.ts
2025-12-15 17:33:59 +08:00

1.4 KiB

MCP (Chrome DevTools) quick start

This repo ships a ready-to-use chrome-devtools-mcp config at .vscode/mcp.json that points to http://localhost:9222.

Prerequisites

  • Install deps: pnpm install
  • Ensure no other Chrome is occupying 9222 (close Chrome if needed)

Start Electron with DevTools port

  • Run pnpm run start:dev:mcp (check active terminal see if it is already running)
  • Ports: 9222 for Chrome DevTools (renderer), 9229 for Node Inspector (main process)

Connect from VS Code MCP

  • Open Command Palette → MCP: Start Servers (uses .vscode/mcp.json)
  • The Chrome MCP server will attach to http://localhost:9222
  • Use list_pages to see all open windows/pages (including main app and preference windows)
  • Use select_page with page index to switch between different windows
  • Use take_snapshot to inspect the current page's UI elements
  • Use close_page to close a specific window

Troubleshooting

  • If pages do not show: close other Chrome instances or change the port in .vscode/mcp.json and rerun start:dev:mcp
  • If you see Debugger listening on ws://127.0.0.1:9229/..., that is the main-process Node inspector; keep using 9222 for renderer DevTools
  • Multiple windows (e.g., preferences dialog) appear as separate pages in list_pages — use select_page to switch context