Summary
On Windows, get-pointed-element always returns "No element is currently pointed", even though the Chrome extension connects fine and reports ✓ Element sent successfully. The element never reaches the MCP tool.
Root cause
SharedStateService.SHARED_STATE_PATH is hardcoded to a POSIX path:
// packages/server/src/services/shared-state-service.ts:6
static SHARED_STATE_PATH = '/tmp/mcp-pointer-shared-state.json';
On Windows, Node resolves /tmp/... to C:\tmp\... (root of the current drive), which usually doesn't exist. So:
- Extension sends the element → server receives it (
📨 Received message from browser).
saveState() calls fs.writeFile('/tmp/...') → fails with ENOENT (directory doesn't exist).
- The error is swallowed by the
try/catch (only logger.error, and the Web Store build is IS_DEV=false, so nothing is visible in the SW console).
getPointedElement() → readState() → ENOENT → returns null → tool returns "No element is currently pointed".
The browser side is 100% fine — it's purely the server failing to persist state on Windows.
Environment
- OS: Windows 11
- Node: v24
- Chrome: 145
- Extension
0.6.0, @mcp-pointer/server@0.6.0
- Client: Claude Code
Reproduction
- Install on a Windows machine that has no
C:\tmp directory.
Alt+Click an element — the service worker console shows ✓ Element sent successfully.
- Call
get-pointed-element → always "No element is currently pointed".
Confirmation
Manually creating C:\tmp works around it: the state file appears at C:\tmp\mcp-pointer-shared-state.json and the tool returns the element. This confirms the path is the culprit.
Suggested fix
Use os.tmpdir() (cross-platform) instead of the hardcoded /tmp/:
import os from 'os';
import path from 'path';
static SHARED_STATE_PATH = path.join(os.tmpdir(), 'mcp-pointer-shared-state.json');
This preserves the cross-instance shared-state behavior (all instances for the same user resolve to the same temp dir) while working on Windows, macOS and Linux.
I have a PR ready for this and will link it shortly.
Summary
On Windows,
get-pointed-elementalways returns"No element is currently pointed", even though the Chrome extension connects fine and reports✓ Element sent successfully. The element never reaches the MCP tool.Root cause
SharedStateService.SHARED_STATE_PATHis hardcoded to a POSIX path:On Windows, Node resolves
/tmp/...toC:\tmp\...(root of the current drive), which usually doesn't exist. So:📨 Received message from browser).saveState()callsfs.writeFile('/tmp/...')→ fails withENOENT(directory doesn't exist).try/catch(onlylogger.error, and the Web Store build isIS_DEV=false, so nothing is visible in the SW console).getPointedElement()→readState()→ENOENT→ returnsnull→ tool returns"No element is currently pointed".The browser side is 100% fine — it's purely the server failing to persist state on Windows.
Environment
0.6.0,@mcp-pointer/server@0.6.0Reproduction
C:\tmpdirectory.Alt+Clickan element — the service worker console shows✓ Element sent successfully.get-pointed-element→ always"No element is currently pointed".Confirmation
Manually creating
C:\tmpworks around it: the state file appears atC:\tmp\mcp-pointer-shared-state.jsonand the tool returns the element. This confirms the path is the culprit.Suggested fix
Use
os.tmpdir()(cross-platform) instead of the hardcoded/tmp/:This preserves the cross-instance shared-state behavior (all instances for the same user resolve to the same temp dir) while working on Windows, macOS and Linux.
I have a PR ready for this and will link it shortly.