MCP Bookmarks
A VSCode extension that provides MCP tools for AI assistants to programmatically create, manage, and annotate code bookmarks. It enables AI-driven and manual organization of codebase architecture, flows, and key components through hierarchical bookmarks and groups.
README
MCP Bookmarks
Code bookmarks extension for VSCode with MCP (Model Context Protocol) integration, allowing AI assistants to annotate and explain your codebase.
Features
- MCP Integration: Provides MCP tools for AI assistants (Claude Code, Gemini, etc.) to create and manage bookmarks programmatically
- AI Assistant Support: AI can analyze your code and create organized bookmarks to explain architecture, flows, and key components
- Manual Management: Full support for creating, editing, and organizing bookmarks without AI
- Hierarchical Bookmarks: Create parent-child bookmark relationships to represent call chains and code flows
- Grouped Organization: Bookmarks are organized into groups by topic, feature, or analysis session
- Category System: 4 built-in categories (entry-point, core-logic, issue, note) for clear organization
- Markdown Link Support: Cross-reference code locations with clickable links in bookmark descriptions
- Rich Sidebar: Interactive webview with tree/nested view modes, search, and filtering
- Editor Integration: Inline gutter icons, hover previews, and CodeLens support
- Quick Navigation: Jump to bookmarked locations, navigate between bookmarks with keyboard shortcuts
- Export & Share: Export bookmarks to Markdown, store in
.vscode/mcp-bookmarks.jsonfor version control
Installation
Method 1: Install from VSIX (Recommended)
- Download the latest
.vsixfile from Releases - In VSCode, open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run
Extensions: Install from VSIX... - Select the downloaded
.vsixfile
Method 2: Install from Source
# Clone repository
git clone https://github.com/linonon/mcp-bookmarks.git
cd mcp-bookmarks
# Install dependencies and build
npm install
npm run compile
# Package as VSIX
npm run package
# Install the generated .vsix file
code --install-extension mcp-bookmarks-*.vsix
MCP Configuration
After installing the extension, configure MCP integration for your AI tool.
Quick Setup
- Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run
MCP Bookmarks: Copy MCP Setup Command - Select your AI tool (Claude Code / Gemini / Codex / VSCode)
- The command will be copied to your clipboard
For Claude Code Users
Run this command in your terminal (generated by the extension):
claude mcp add -s user mcp-bookmarks -- node "~/.vscode/mcp-bookmarks-launcher.js"
Or manually configure in .claude/mcp.json:
{
"mcpServers": {
"mcp-bookmarks": {
"command": "node",
"args": ["/Users/YOUR_USERNAME/.vscode/mcp-bookmarks-launcher.js"],
"description": "MCP Bookmarks - Code annotation and navigation"
}
}
}
For Gemini Users
Run this command in your terminal (generated by the extension):
gemini mcp add -s user mcp-bookmarks node "~/.vscode/mcp-bookmarks-launcher.js"
For VSCode MCP Extension Users
- Press
Cmd+P(Mac) orCtrl+P(Windows) - Type
MCP: Open User Configuration - Add the following configuration:
{
"mcpServers": {
"mcp-bookmarks": {
"type": "stdio",
"command": "node",
"args": ["/Users/YOUR_USERNAME/.vscode/mcp-bookmarks-launcher.js"]
}
}
}
For Codex Users
Paste this snippet into ~/.codex/config.toml:
[mcp_servers."mcp-bookmarks"]
command = "node"
args = ["/Users/YOUR_USERNAME/.vscode/mcp-bookmarks-launcher.js"]
Note: Use the Copy MCP Setup Command to get the correct path automatically!
Usage
Complete Setup Flow
Step 1: Install Extension
# Download .vsix from GitHub Releases
# Then in VSCode Command Palette:
Extensions: Install from VSIX...
Step 2: Configure MCP (Automatic)
# In VSCode Command Palette:
MCP Bookmarks: Copy MCP Setup Command
# Select your AI tool (Claude Code / Gemini / Codex / VSCode)
# Copy the generated command
# For Claude Code, run in terminal:
claude mcp add -s user mcp-bookmarks -- node "~/.vscode/mcp-bookmarks-launcher.js"
# For Gemini, run in terminal:
gemini mcp add -s user mcp-bookmarks node "~/.vscode/mcp-bookmarks-launcher.js"
# For VSCode MCP, paste the path into User Configuration
Step 3: Start Using
Now your AI assistant can create bookmarks in your codebase!
Available MCP Tools
create_group- Create a bookmark groupadd_bookmark- Add a bookmark to a groupbatch_add_bookmarks- Add multiple bookmarks at oncelist_groups- List all groupslist_bookmarks- List bookmarks with filtersget_group- Get group details with all bookmarksget_bookmark- Get single bookmark detailsupdate_group- Update group infoupdate_bookmark- Update bookmark propertiesremove_group- Delete a group and its bookmarksremove_bookmark- Delete a single bookmarkclear_all_bookmarks- Clear all data (requires confirmation)
For Users
Commands:
MCP Bookmarks: Refresh- Refresh the bookmark treeMCP Bookmarks: Add Bookmark Here- Manually add a bookmark at cursorMCP Bookmarks: Create Group- Create a new bookmark groupMCP Bookmarks: Edit Group- Edit group title and descriptionMCP Bookmarks: Rename Group- Quick rename a group (F2)MCP Bookmarks: Delete Group- Delete a group and its bookmarksMCP Bookmarks: Edit Bookmark- Edit bookmark propertiesMCP Bookmarks: Delete Bookmark- Delete a bookmarkMCP Bookmarks: Move to Group...- Move bookmark to another groupMCP Bookmarks: Move Bookmark Up/Down- Reorder bookmarks within groupMCP Bookmarks: Search Bookmarks- Search through all bookmarksMCP Bookmarks: Export as Markdown- Export bookmarks to markdownMCP Bookmarks: Toggle View Mode- Switch between group/file viewMCP Bookmarks: Expand All- Expand all tree nodesMCP Bookmarks: Collapse All- Collapse all tree nodes
Configuration
| Setting | Default | Description |
|---|---|---|
mcpBookmarks.mcpPort |
3333 | MCP Server port |
mcpBookmarks.showInlineDecorations |
true | Show bookmark icons in gutter |
mcpBookmarks.viewMode |
"group" | View mode: "group" or "file" |
mcpBookmarks.quickAddMode |
"simple" | Quick add mode: "full" (all options) or "simple" (title only) |
mcpBookmarks.defaultCategory |
"explanation" | Default category for new bookmarks |
mcpBookmarks.confirmBeforeDelete |
true | Show confirmation before deleting |
Data Storage
Bookmarks are stored in .vscode/mcp-bookmarks.json within your workspace. This file can be committed to version control to share bookmarks with your team.
Development
# Install dependencies
npm install
# Watch mode (auto-recompile)
npm run watch
# Compile once
npm run compile
# Package extension
npm run package
# Lint
npm run lint
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。