{"slug": "use-claude-chrome-extension-from-cursor", "title": "Use Claude Chrome Extension from Cursor", "summary": "A developer created a repository that enables Cursor to use the Claude Chrome extension to analyze the currently selected browser tab and return the response to Cursor for code editing. The tool uses macOS Accessibility to read Claude's response from the browser, allowing Cursor to access authenticated sessions that are otherwise unavailable. It is designed for macOS with Chromium-based browsers and the Claude extension installed.", "body_md": "I find Claude Chrome's extension to be much more powerful than Cursor's current browser integration. Especially if I need to debug something that requires being logged in to a system that uses SSO for example. This repository will allow you to use Claude's Chrome extension from Cursor against the currently selected tab in your already-open default browser. I created this so that I could take advantage of Claude's Chrome extension from Cursor: Cursor calls a local helper script, the script activates the existing default Chromium browser session, opens the Claude side panel, sends a prompt, reads Claude's final response through macOS Accessibility, and returns that response to Cursor so Cursor can continue coding or editing files.\n\nOpen the relevant page in your default browser and make sure it is the currently selected tab. Then ask Cursor to use the Claude Chrome extension.\n\nThen prompt in Cursor:\n\n```\n/use-claude-extension to analyze the the logs for the current run of the do_something job. And make suggestions to improve the @do_something.py job.\n```\n\nThe Cursor agent will then activate your system browser and in the currently open tab use the Claude Chrome extension. Cursor will wait for the response from the Claude Chrome extension using the script included in this repository.\n\nCursor is excellent at editing code in a repository, but sometimes the information needed to make the right code change only exists in an authenticated browser session.\n\nThis project lets a Cursor agent ask Claude's Chrome extension to inspect the **currently selected browser tab**, then brings Claude's answer back into Cursor so the agent can use that information to modify code.\n\nIt intentionally does **not** use `claude --chrome`\n\n, Playwright, or a newly launched browser. It uses your existing default browser window, current tab, installed Claude Chrome extension, and logged-in browser session.\n\n- Resolves your macOS default browser.\n- Activates the existing browser window.\n- Uses the currently selected tab.\n- Opens the Claude Chrome extension side panel.\n- Sends a prompt from Cursor to Claude in the browser.\n- Waits for Claude's final response.\n- Reads the response through macOS Accessibility.\n- Returns the response to Cursor so Cursor can continue the coding task.\n\n```\n.\n├── README.md\n├── claude-current-tab.zsh\n└── cursor/\n    ├── install.sh\n    ├── bin/\n    │   └── claude-current-tab.zsh\n    ├── rules/\n    │   └── use-claude-chrome-extension.mdc\n    └── commands/\n        └── use-claude-extension.md\n```\n\n`claude-current-tab.zsh`\n\n— the original helper script.`cursor/bin/claude-current-tab.zsh`\n\n— bundled helper script used by the installer.`cursor/rules/use-claude-chrome-extension.mdc`\n\n— Global Cursor rule that teaches Cursor when and how to use this workflow.`cursor/commands/use-claude-extension.md`\n\n— optional Cursor slash command, available as`/use-claude-extension`\n\nafter installation.`cursor/install.sh`\n\n— one-step installer for the helper command, Global Cursor rule, and slash command.\n\nThe Cursor rule and slash command both invoke this helper command after install:\n\n```\n~/.local/bin/claude-current-tab\n```\n\n- macOS.\n- Cursor.\n- A Chromium-compatible default system browser, such as Brave Browser or Google Chrome.\n- The Claude Chrome extension installed in that default browser/profile.\n- The Claude extension shortcut for toggling the side panel must be available. In the tested setup, the extension command is\n`toggle-side-panel`\n\nand is bound to`Cmd+E`\n\n. - The browser tab you want Claude to analyze must already be the currently selected tab in the default browser.\n- The local helper script must be executable.\n\nSafari and Firefox cannot host the Claude Chrome extension, so they cannot be used for this workflow.\n\nFrom the root of this repository:\n\n```\n./cursor/install.sh\n```\n\nThe installer is safe to re-run. It installs:\n\n```\n~/.local/bin/claude-current-tab\n~/.cursor/rules/use-claude-chrome-extension.mdc\n~/.cursor/commands/use-claude-extension.md\n```\n\nThen reload or restart Cursor so it picks up the new rule and command.\n\nVerify the helper can read your current default-browser tab:\n\n```\n~/.local/bin/claude-current-tab --print-context\n```\n\nYou should see JSON containing the default browser, bundle id, active tab URL, and active tab title.\n\nIf you prefer not to use `install.sh`\n\n, install the pieces manually.\n\nFrom the root of this repository:\n\n```\nchmod +x cursor/bin/claude-current-tab.zsh\nmkdir -p ~/.local/bin\nln -sf \"$(pwd)/cursor/bin/claude-current-tab.zsh\" ~/.local/bin/claude-current-tab\n```\n\nMake sure `~/.local/bin`\n\nis on your `PATH`\n\n. If needed, add this to your shell profile:\n\n```\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\nVerify:\n\n```\n~/.local/bin/claude-current-tab --print-context\nmkdir -p ~/.cursor/rules\ncp cursor/rules/use-claude-chrome-extension.mdc ~/.cursor/rules/\nmkdir -p ~/.cursor/commands\ncp cursor/commands/use-claude-extension.md ~/.cursor/commands/\n```\n\nAfter installing the rule and command, reload or restart Cursor.\n\nThe slash command should be available in Cursor chat as:\n\n```\n/use-claude-extension\n```\n\nBecause this workflow controls the existing browser UI and reads the Claude side panel through macOS Accessibility, you must grant the required macOS permissions.\n\nOpen:\n\n```\nSystem Settings\n  → Privacy & Security\n  → Accessibility\n```\n\nEnable Accessibility access for every app that may run the helper script:\n\n**Cursor**— required when a Cursor agent runs the workflow.** Terminal**,** iTerm**,** Warp**, or any other terminal app you use to run the helper manually.- Any separate local agent or harness app that may launch the script.\n\nmacOS may also show Automation prompts asking whether Cursor or your terminal can control `System Events`\n\nand your browser. Allow those prompts.\n\nIf you use debug screenshots with `--debug-screenshots`\n\n, also open:\n\n```\nSystem Settings\n  → Privacy & Security\n  → Screen Recording\n```\n\nEnable Screen Recording for the app running the helper, such as Cursor or Terminal.\n\nIf the workflow opens the Claude side panel but fails to type into it, or if it sends a prompt but cannot read the response, the most likely cause is missing Accessibility permission for the app that launched the helper.\n\nExpected workflow:\n\n-\nYou open the relevant page in the currently selected tab of your default browser.\n\n-\nCursor sees your request to use the Claude Chrome extension.\n\n-\nCursor runs:\n\n```\n~/.local/bin/claude-current-tab --response-only \"<task for Claude Chrome extension>\"\n```\n\n-\nThe helper activates the existing default browser and opens the Claude side panel for the current tab.\n\n-\nClaude analyzes the browser-only context using your logged-in browser session.\n\n-\nThe helper waits for Claude's final answer and returns it to Cursor.\n\n-\nCursor summarizes the findings, inspects the relevant repo files, and makes any necessary code or script changes.\n\nFor complex debugging tasks, use a prompt like this:\n\n```\nUse the Claude Chrome extension on the currently selected logs tab. Analyze why the job is crashing. Return a concise implementation-focused report with:\n- observed evidence from the logs\n- likely root cause\n- exact repo files/functions/scripts Cursor should inspect\n- recommended code changes\n- any uncertainty\n\nThen use the response to make the necessary changes in this repo.\n```\n\nThe installed Global Cursor rule uses this general prompt shape when delegating browser analysis to Claude:\n\n```\nYou are being used from Cursor. Analyze the currently selected browser tab using the Claude Chrome extension and my logged-in browser session. Return a concise, implementation-focused report with: observed evidence, likely root cause, exact files/functions/scripts Cursor should inspect or modify, recommended code change, and any uncertainty. Do not make code changes yourself unless asked in the browser; Cursor will apply code changes after reading your answer.\n\nTask: <user task>\n~/.local/bin/claude-current-tab --print-context\n~/.local/bin/claude-current-tab --response-only \\\n  \"Analyze the currently selected tab and summarize the actionable findings.\"\n~/.local/bin/claude-current-tab --wait-response \\\n  \"Analyze the currently selected tab and summarize the actionable findings.\"\n~/.local/bin/claude-current-tab --response-only --debug-screenshots \\\n  --screenshot-dir /tmp/claude-current-tab-debug \\\n  \"Analyze the currently selected tab.\"\n```\n\nScreenshots are for visual debugging only. Long or scrolling Claude responses are read through macOS Accessibility from the Claude side panel, not by screenshot OCR.\n\nRecommended integration order:\n\n**Global Cursor rule**— best immediate integration. It lets Cursor automatically know what to do when you ask it to use the Claude Chrome extension, current browser tab, default browser session, logged-in browser accounts.**Slash command**— useful manual helper. Use`/use-claude-extension`\n\nwhen you want to explicitly trigger this workflow.**MCP tool**— best long-term if you want Cursor to see this as a formal named tool, such as`ask_claude_chrome_extension_current_tab`\n\n. This requires more setup but gives cleaner tool-style behavior.\n\n- The default browser must be Chromium-compatible and have the Claude Chrome extension installed.\n- The workflow uses the currently selected browser tab. Make sure the tab you want Claude to analyze is selected before asking Cursor to use the extension.\n- This does not open a new browser and does not use\n`claude --chrome`\n\n. - Long or scrolling Claude responses are read through macOS Accessibility from the Claude side panel, not by screenshot OCR.\n- If Claude asks for browser-side permission, approve it in the browser and then tell Cursor to continue.\n`--response-only`\n\nis best when Cursor needs to consume Claude's answer and continue coding.- By default, response waiting is unlimited so long browser analyses are not cut off. If you want a finite cap, pass\n`--response-timeout <seconds>`\n\nexplicitly. `--wait-response`\n\nreturns JSON metadata, including the active tab URL/title, along with the Claude response.", "url": "https://wpnews.pro/news/use-claude-chrome-extension-from-cursor", "canonical_source": "https://github.com/bebrws/claude-chrome-extension-from-cursor", "published_at": "2026-06-25 00:20:09+00:00", "updated_at": "2026-06-25 00:43:58.965530+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Cursor", "Claude", "Chrome", "macOS", "Brave Browser", "Google Chrome"], "alternates": {"html": "https://wpnews.pro/news/use-claude-chrome-extension-from-cursor", "markdown": "https://wpnews.pro/news/use-claude-chrome-extension-from-cursor.md", "text": "https://wpnews.pro/news/use-claude-chrome-extension-from-cursor.txt", "jsonld": "https://wpnews.pro/news/use-claude-chrome-extension-from-cursor.jsonld"}}