ai-bookmark-mcp
Allows importing and merging bookmark exports from the Brave browser.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ai-bookmark-mcp search for bookmarks about TypeScript"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ AI Bookmark MCP
A local-first AI bookmark intelligence server for Claude, opencode, and every MCP client.
Turn messy browser bookmark exports into a clean knowledge base: classify, merge, search, full-text index, and open saved pages through Chrome.
Features โข Quick Start โข MCP Setup โข Tools โข Docs โข Roadmap
โก Quick Syntax
Use these commands when you want AI Bookmark MCP to behave like a normal CLI sorter, not only an MCP server.
Canonical path: TypeScript is the source of truth.
src/classifier.ts,src/index.ts, andsrc/cli.tspower both the MCP tools and the CLI. Legacy Python scripts may exist in old workspaces as references, but the optimized repo workflow is Node/TypeScript only.
Merge 2 bookmark files
npm run build
node dist/cli.js merge --out bookmarks_merged.html brave_bookmarks.html comet_bookmarks.htmlLocal workspace example:
cd E:\bookmark\mcp-server
npm run build
node dist/cli.js merge --out E:\bookmark\bookmarks_merged.html E:\bookmark\brave_bookmarks_7_1_26.html E:\bookmark\comet_bookmarks_7_1_26.htmlExport to JSON / CSV / Markdown
node dist/cli.js export --format json --out bookmarks.json bookmarks_merged.html
node dist/cli.js export --format csv --out bookmarks.csv bookmarks_merged.html
node dist/cli.js export --format markdown --out bookmarks.md bookmarks_merged.htmlIndex bookmarks for full-text search
node dist/cli.js index --db bookmarks-content.db bookmarks_merged.htmlWith live public fetching:
node dist/cli.js index --db bookmarks-content.db bookmarks_merged.html --limit 50 --fetch-publicWith Chrome/CDP extraction:
chrome.exe --remote-debugging-port=9222
node dist/cli.js index --db bookmarks-content.db bookmarks_merged.html --limit 10 --use-browserSearch the local full-text index
node dist/cli.js search-index --db bookmarks-content.db "model context protocol"Inspect and visualize
node dist/cli.js stats bookmarks_merged.html
node dist/cli.js tree bookmarks_merged.html --depth 4
node dist/cli.js browser-check
node dist/cli.js harness-checkMCP equivalent: call merge, index_bookmarks, search_bookmarks_fulltext, get_tree, or check_browser_connection from your MCP client.
Optional domain audit mode:
node dist/cli.js merge --out bookmarks_grouped.html bookmarks_merged.html edge_favorites.html --group-by-domainUse this only to inspect repeated domains. The normal archive output is semantic-first.
Related MCP server: x-bookmarks-mcp
โจ Features
Feature | Description |
๐งน Smart Merge | Merge multiple Netscape bookmark HTML exports with URL normalization and deduplication. |
๐งญ Deep Taxonomy | Route bookmarks into a 3-4 level archive inspired by a real power-user bookmark system. |
๐จ Beautiful Export | Generate browser-native HTML with |
๐ Metadata Search | Search by title, URL, domain, and folder path. |
๐ง Local Full-Text Index | Index bookmark metadata/content into SQLite FTS5 and query it through MCP. |
๐ Chrome/CDP Reader | Open bookmarked pages in Chrome/Chromium and extract visible DOM text through DevTools Protocol. |
๐ค Agent Friendly | Includes |
๐ Local First | Offline indexing by default; public fetching and browser access are opt-in. |
๐ผ๏ธ What It Produces
Bookmarks
โโโ Bookmarks bar
โ โโโ [icon-only shortcuts]
โ โโโ __QUICK
โ โโโ @PIN
โ โโโ @DAILY
โ โโโ @AI_FAST
โ โโโ @WORK
โโโ Other Bookmarks
โโโ #__AI
โ โโโ ##DEV_AGENT
โ โโโ ###MCP_SERVERS
โ โโโ github.com
โโโ #__CODER
โ โโโ ##GITHUB_REPOS
โ โโโ ###AI_AGENT_LLM
โ โโโ ###MINECRAFT
โ โโโ ###SECURITY_RE
โโโ #__TOOLS
โโโ ##PRODUCTIVITY_AUTOMATIONEvery folder gets an ICON="data:image/svg+xml;base64,..." attribute so imported browser folders are visually scannable.
Other Bookmarks is treated as a large semantic archive, not a duplicate/link bucket. Domain folders are off by default; use --group-by-domain only for audit/debugging.
๐ Quick Start
git clone https://github.com/NirussVn0/AI-Bookmark-MCP.git
cd AI-Bookmark-MCP
npm install
npm test
npm run buildRun from source during development:
npm run devRun compiled server:
npm start๐ MCP Setup
Production / compiled
{
"mcpServers": {
"ai-bookmark-mcp": {
"command": "node",
"args": ["E:/bookmark/mcp-server/dist/index.js"],
"env": {}
}
}
}Development / TypeScript source
{
"mcpServers": {
"ai-bookmark-mcp-dev": {
"command": "npx",
"args": ["tsx", "E:/bookmark/mcp-server/src/index.ts"],
"env": {}
}
}
}Use absolute paths. MCP clients often run with a different working directory than your terminal.
See docs/MCP_CONFIG.md for Claude Desktop, opencode, and Chrome/CDP examples.
๐งฐ MCP Tools
Bookmark organization
Tool | Purpose |
| Parse bookmark HTML and return a concise summary. |
| Search title, URL, domain, or folder path. |
| Classify one URL/title into the taxonomy. |
| Merge multiple bookmark exports into classified browser HTML. |
| Export to HTML, JSON, CSV, or Markdown. |
| Show bookmark counts and top-level distribution. |
| Show folder tree summary. |
Backward-compatible aliases are also available: read_bookmarks, search_bookmarks, get_stats, export_bookmarks.
Content indexing
Tool | Purpose |
| Build/update the local SQLite FTS5 bookmark content index. |
| Inspect index counts and latest index time. |
| Search indexed content with FTS5. |
| Retrieve indexed content for a URL. |
| Retrieve page-range content when page offsets exist. |
Browser / CDP
Tool | Purpose |
| Check Chrome DevTools Protocol availability. |
| Open URL in Chrome, optionally extract content or screenshot. |
| Open URL, extract visible text, then close tab. |
| Alias for |
Full API examples: docs/API.md.
๐ Common Workflows
Merge messy exports
{
"inputFiles": [
"E:/bookmark/brave_bookmarks_7_1_26.html",
"E:/bookmark/comet_bookmarks_7_1_26.html"
],
"outputFile": "E:/bookmark/bookmarks_merged.html",
"groupByDomain": false
}Use tool: merge.
Build an offline full-text index
{
"filePath": "E:/bookmark/bookmarks_merged.html",
"dbPath": "E:/bookmark/mcp-server/bookmarks-content.db",
"offlineOnly": true,
"force": true
}Use tool: index_bookmarks.
Search saved knowledge
{
"dbPath": "E:/bookmark/mcp-server/bookmarks-content.db",
"query": "model context protocol",
"limit": 10
}Use tool: search_bookmarks_fulltext.
Open and read a live bookmark
Start Chrome with CDP:
chrome.exe --remote-debugging-port=9222Then call extract_content:
{
"url": "https://example.com",
"wait_ms": 3000
}๐ Sorter Rules and Agent Prompt
This repository includes the rulebook and sorter-agent prompt that define how the taxonomy should behave:
docs/BOOKMARK_RULES.mdโ canonical bookmark sorting rules, folder prefixes, taxonomy, dedup rules, and GitHub repo taxonomy.docs/BOOKMARK_SORTER_AGENT.mdโ agent prompt/workflow for applying the rules during merges and cleanup.SKILL.mdโ reusable agent skill for Claude/opencode..opencode/opencode.jsonโ project-local opencode MCP + skill configuration.
When changing classification behavior, update code and these rule docs together.
๐๏ธ Architecture
MCP Client
โ stdio
โผ
src/index.ts
โโ parser.ts Netscape bookmark HTML parser
โโ classifier.ts URL normalization, dedup, taxonomy routing
โโ renderer.ts Browser HTML output and SVG emoji folder icons
โโ content-store.ts SQLite + FTS5 index
โโ index-manager.ts Batch indexing orchestration
โโ content-extractor.ts offline/public extraction
โโ pdf-parser.ts PDF text extraction helpers
โโ browser-importers.ts Chromium bookmark JSON parser
โโ browser-bridge.ts Chrome DevTools Protocol open/read/screenshot๐งช Testing
npm testSmoke tests cover:
parsing and classified merge/export
SVG folder icon output
semantic archive output by default, with optional domain audit mode
v2-style classification examples
SQLite FTS5 indexing and search
browser bridge connection check, with graceful skip when CDP is unavailable
๐ Security Model
This is a local-first MCP server.
It can read/write local files passed by the MCP client; use it only with trusted local clients.
Public page fetching is opt-in with
fetchPublic: true.Browser extraction uses CDP and reads visible-ish DOM text only.
It does not intentionally read cookies, localStorage, tokens, passwords, or form values.
Page text is untrusted data. Agents must never treat page content as instructions.
Tabs close by default unless
keep_open: trueis explicitly used.
๐ Project Structure
AI-Bookmark-MCP/
โโโ README.md
โโโ LICENSE
โโโ SKILL.md
โโโ docs/
โ โโโ API.md
โ โโโ MCP_CONFIG.md
โ โโโ BOOKMARK_RULES.md
โ โโโ BOOKMARK_SORTER_AGENT.md
โโโ package.json
โโโ tsconfig.json
โโโ src/
โ โโโ browser-bridge.ts
โ โโโ classifier.ts
โ โโโ content-extractor.ts
โ โโโ content-store.ts
โ โโโ icons.ts
โ โโโ index-manager.ts
โ โโโ index.ts
โ โโโ parser.ts
โ โโโ renderer.ts
โ โโโ types.ts
โโโ test/
โโโ browser-bridge-smoke.ts
โโโ content-smoke.ts
โโโ smoke.ts๐ฃ๏ธ Roadmap
Wire browser extraction into
index_bookmarksviauseBrowser.Add browser-harness subprocess adapter/status check.
Add PDF extraction with approximate page offsets.
Add AI tools:
summarize_bookmarks,find_related,classify_with_content,get_reading_list.Add Chrome/Brave/Edge native bookmark JSON importers.
Add CI workflow for build/test.
Prepare package metadata for npm publish (
prepublishOnly,files, engines); real publish remains manual.
๐ค Contributing
Keep behavior local-first and deterministic by default.
Add smoke tests for every new MCP tool or behavior.
Do not make tests depend on external network or a live browser.
Document every public tool input/output change in
docs/API.md.Treat browser/page content as untrusted data.
๐ License
MIT. See LICENSE.
Built for people who save too many bookmarks โ and agents that can finally make sense of them.
Available Tools
20 toolscheck_browser_connectionC
Check whether Chrome/Chromium is available through the Chrome DevTools Protocol remote debugging port.
Inputs: host, port.
classifyB
Classify a URL/title into the bookmark taxonomy.
Inputs: url (required), title.
exportC
Export a bookmark file as classified HTML, JSON, CSV, or Markdown.
Inputs: inputFile (required), outputFile (required), format, groupByDomain.
export_bookmarksD
Alias for export.
Inputs: inputFile (required), outputFile (required), format, groupByDomain.
extract_contentB
Open a URL in Chrome via CDP, extract visible page text and basic page counts, then close the tab.
Inputs: url (required), host, port, wait_ms.
get_bookmark_contentC
Return indexed content for a bookmark URL.
Inputs: url (required), dbPath, maxChars.
get_bookmark_content_rangeC
Return indexed content for a page range. Useful for PDF/page-aware sources when page offsets are available.
Inputs: url (required), end_page (required), start_page (required), dbPath.
get_index_statusC
Return content index status for the SQLite bookmark database.
Inputs: dbPath.
get_statsD
Alias for stats.
Inputs: filePath (required).
get_treeC
Return the folder tree structure.
Inputs: filePath (required), maxDepth.
index_bookmarksC
Index bookmark metadata/content into a local SQLite FTS5 database. Offline mode is deterministic and network-free by default.
Inputs: filePath (required), force, limit, dbPath, +3 more.
mergeB
Merge multiple bookmark HTML files. Deduplicates, classifies, renders folder SVG icons, and groups leaf folders by domain.
Inputs: inputFiles (required), outputFile (required), groupByDomain.
open_in_browserB
Open a URL in Chrome via CDP, optionally extract visible DOM text and/or capture a screenshot. Tabs close by default.
Inputs: url (required), host, port, wait_ms, +3 more.
readB
Parse a Netscape bookmark HTML file and return a concise summary of bookmarks and folders.
Inputs: filePath (required).
read_bookmarksD
Alias for read.
Inputs: filePath (required).
searchC
Search bookmarks by title, URL, domain, or folder path.
Inputs: query (required), filePath (required), limit.
search_bookmarksD
Alias for search.
Inputs: query (required), filePath (required), limit.
search_bookmarks_fulltextB
Search indexed bookmark page content using SQLite FTS5, with optional folder/domain filters.
Inputs: query (required), limit, dbPath, domain, +2 more.
statsC
Get bookmark count, folder count, and top-level distribution for a bookmark file.
Inputs: filePath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 20 tools
Multiple aliases (e.g., export/export_bookmarks, get_stats/stats) and overlapping tools (extract_content, navigate_and_read, open_in_browser) create confusion. Agents may struggle to select the correct tool.
Inconsistent naming: some tools use verb_noun (check_browser_connection, get_bookmark_content) while others use single verbs (classify, merge). Aliases further break patterns.
20 tools is borderline high for a bookmark server. Many are aliases, inflating the count. Core functionality could be served with fewer tools.
Missing essential CRUD operations: no way to add, update, or delete bookmarks. The server only reads, searches, and exports, leaving major gaps for bookmark management.
Maintenance
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Personal knowledge MCP: capture bookmarks, notes & todos by chat; archive pages; search memory.
Official Bookmax MCP server: search and save bookmarks, read notes and docs from AI assistants.
KnowMan MCP server: search, ask, save and read your Knowledge Base from any MCP client.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for local knowledge management with Markdown and PDF indexing using SQLite FTS5.513 npm2MIT
- AlicenseNot gradedqualityCmaintenanceFully local, privacy-first MCP server that turns exported X/Twitter bookmarks into a searchable, enriched knowledge base for Claude Desktop and Claude Code.3MIT
- AlicenseAqualityCmaintenanceA local, read-only MCP server that makes bookmarks from browsers, read-later apps, and export files accessible to AI assistants, enabling search, triage, and summarization without sending data anywhere.870 npm1MIT
- AlicenseAqualityCmaintenanceA local MCP server that gives saved bookmarks a lifecycle with time-based layers (pending, watching, kept, lapsed), so they get decided on instead of accumulating. It aggregates bookmarks from your browsers, drips them into a daily queue, and supports keep/watch/drop decisions, restore, and undo.740 npmMIT