Skip to content

Commit f03e7c7

Browse files
committed
docs: record exact-call hook routing and Cloud Agent limits
Signed-off-by: crimsonsunset <jsangio1@gmail.com>
1 parent 86c339e commit f03e7c7

2 files changed

Lines changed: 243 additions & 128 deletions

File tree

docs/manual/cursor-workspace-bridge.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,28 @@ constraint on which folder a session may claim, never a way to pick one — see
3030
**Expected:** Cursor connects via stdio (`npx mcp-remote`), not a direct HTTP URL.
3131
On first connect, McpMux may show **Name this machine** — approve it.
3232

33+
## 1b. Install the workspace hook
34+
35+
On the same result screen, click **Install workspace hook**. That writes
36+
`~/.cursor/hooks/mcpmux-workspace-context.js` and merges one `preToolUse` entry
37+
into `~/.cursor/hooks.json` (backup: `hooks.json.mcpmux-bak`). Unrelated hooks
38+
(including WakaTime) stay. If `hooks.json` is JSONC, the installer refuses and
39+
shows a copyable entry.
40+
41+
The hook injects `_mcpmux_context` on `MCP:mcpmux_*` calls when
42+
`workspace_roots` has exactly one path. The gateway uses that root for that
43+
`tools/call` only and never writes `pinned` or `window_pins`.
44+
45+
**Expected:** gateway logs
46+
`call_tool exact workspace context source=cursor_pre_tool_use` with the
47+
agent's root and `tool_use_id`. Two concurrent agents on one `mcp-session-id`
48+
should resolve to different bindings. `tools/list` stays the six core meta
49+
tools when the shared session is still ambiguous.
50+
51+
Cloud Agents do not load `~/.cursor/hooks.json`. They stay on the rootless /
52+
`mcpmux_set_workspace_root` path. See
53+
[`cursor-agent-hooks-workspace-hint.md`](../planning/cursor-agent-hooks-workspace-hint.md#cloud-agents-researched-aug-21).
54+
3355
## 2. Two-window routing
3456

3557
1. Open folder A in one Cursor window, folder B in another.

0 commit comments

Comments
 (0)