vscode-bookmarks-plusVSCode extension to bookmark files and folders (not just lines) in a workspace, with collections and git-repo awareness. See Features
DescriptionsRight-click a bookmark or a collection and choose Set Description to attach a free-text note. The note appears in the hover tooltip. To remove a note, open Set Description again, clear the input box, and submit an empty value. The
|
| Window state | BOOKMARKS_PLUS_WORKSPACE value |
|---|---|
| Single folder open (mirror enabled) | the folder's absolute OS path |
| Two or more folders open | disabled:multi-root |
| No folder open | disabled:no-folder |
A terminal opened before the extension activated, or before the workspace folders last
changed, keeps its original value — reopen the terminal to pick up a change. A disabled:
value stops resolution here — tiers 3 and 4 below are not consulted, even if
CLAUDE_PROJECT_DIR would otherwise resolve. The server still starts in that case; it refuses
each tool call individually instead (see "Limitations" below) — a different failure mode from
"none of the four resolve," which refuses to start at all.
CLAUDE_PROJECT_DIR — set automatically by Claude Code in the environment of any MCP
server it spawns for a project (an integrated VS Code terminal, or claude run from inside a
project directory). This is what lets the recommended registration below carry no workspace
path at all.
BOOKMARKS_MCP_WORKSPACE — a legacy environment variable, checked last. See the
migration note below if you configured the server this way previously.
If none of the four resolve, the server refuses to start.
Recommended: project-scoped, path-free (Claude Code)
Register the server per-project in a committed .mcp.json, with no workspace path in
args — tier 3 above resolves it automatically:
{
"mcpServers": {
"bookmarks-plus": {
"command": "node",
"args": ["${BOOKMARKS_PLUS_MCP:-/absolute/fallback/path/to/mcp-server/dist/index.js}"]
}
}
}
The entry is byte-identical across every project that wants it, so it can be committed and
shared. Each developer sets BOOKMARKS_PLUS_MCP once per machine, to the absolute path of their
local mcp-server/dist/index.js; the ${VAR:-default} form keeps the file loadable even for a
developer who hasn't set it, falling back to the given default path. claude mcp add --scope project can generate the same .mcp.json entry for you instead of hand-writing it.
First use prompts for approval. Claude Code asks for one-time approval before using a
project-scoped server defined in .mcp.json. This is expected, not a bug — reset your choices
with claude mcp reset-project-choices if needed.
Don't register the same server name at both project and user scope. If bookmarks-plus is
defined in both .mcp.json (project scope) and ~/.claude.json (user scope), the CLI and
Claude Desktop's Code tab can resolve to different definitions: the Code tab uses the
~/.claude.json (user-scope) entry, departing from the CLI's own scope precedence. If you
previously tried a user-scope entry and are switching to the project-scoped form above, remove
the old one — otherwise the CLI and the Code tab will silently point at different workspaces.
Explicit workspace path
To pin a specific workspace regardless of auto-detection, pass it as the args positional
argument (tier 1, highest precedence — this is unchanged from before):
{
"mcpServers": {
"bookmarks-plus": {
"command": "node",
"args": [
"/absolute/path/to/vscode-bookmarks-plus/mcp-server/dist/index.js",
"/absolute/path/to/your/workspace"
]
}
}
}
This is the only supported form for Claude Desktop's standalone chat interface. Desktop chat has no per-session project concept — it never spawns from a VS Code terminal, so none of the automatic resolution above applies there. This is a permanent limitation of the design, not a gap to be closed later; Desktop chat users must always configure an explicit workspace path.
Legacy: BOOKMARKS_MCP_WORKSPACE — behavior change
BOOKMARKS_MCP_WORKSPACE used to be the documented way to configure the server without an
args path: set it in the entry's env block, or export it from a shell profile. It still
works, but it is now checked after CLAUDE_PROJECT_DIR (tier 4 of 4, not tier 2). Under
Claude Code, that means a BOOKMARKS_MCP_WORKSPACE value is now silently overridden by the
auto-detected project directory whenever one is available — the two only agree by coincidence.
If you configured the server this way before, switch to the path-free entry above. If you
specifically need a fixed workspace that Claude Code's own project detection cannot override,
use the explicit args path form instead — BOOKMARKS_MCP_WORKSPACE is no longer a reliable
way to pin a workspace under Claude Code.
Tools
list_bookmarks— read-only. Lists the workspace's collections and bookmarked files/folders, including descriptions.add_bookmark— appends a new bookmark, optionally into an existing collection. Rejects an exact duplicate(uri, collection)pair and assignsorderthe same way the extension does. It cannot edit or remove existing bookmarks or collections — that is out of scope for this server.
Limitations
- Last write wins. If VS Code is running and changes bookmarks at the same moment as the
MCP server, one change is lost.
add_bookmarkverifies its own write after a short delay (BOOKMARKS_MCP_VERIFY_DELAY_MS, default 400ms) and reports when it did not survive — it cannot prevent the loss, only detect it. - Single-folder workspaces only. In a multi-root workspace, or in a window with no folder
open, the extension does not maintain the
.vscode/bookmarks.jsonmirror. If the extension is installed and active in that window, it also reports the state to the MCP server viaBOOKMARKS_PLUS_WORKSPACE(see "Configure" above), so every tool call —list_bookmarks,add_bookmark— refuses individually with a message explaining why. If the extension is not installed or not active, nothing sets that variable, resolution falls through toCLAUDE_PROJECT_DIRor the legacy variable, and the server has no way to know the mirror is unavailable —add_bookmarkwrites still succeed, but the extension never picks them up. - Claude Desktop chat has no automatic workspace resolution. It must use the explicit
argspath form described above — see "Explicit workspace path". - No push notifications. The server re-reads the mirror file fresh on every tool call; it does not watch the file or notify the client when bookmarks change.
Requirements
Requires VS Code 1.85.0 or later. The repo-name badge uses the built-in vscode.git extension when it's enabled; the extension works without it, just without badges.
Installation
Install from the VS Code Marketplace: search Bookmarks Plus in the Extensions view (Ctrl+Shift+X) and click Install.
Development
npm install— install dependenciesnpm run compile— bundlesrc/extension.tstodist/extension.jsvia esbuildnpm test— compile tests, then run the full suite in a headless VS Code Extension Development Host- Press F5 in VS Code (or use the "Run Extension" launch config) to open an Extension Development Host with the extension loaded
mcp-server/has its ownpackage.json, build, and test suite — not run by the commands above. See "Using bookmarks from Claude (MCP server)" for its build steps.
