Skip to main content
Glama

๐Ÿ”– AI Bookmark MCP

AI Bookmark MCP TypeScript MCP SQLite FTS5 Chrome CDP License: MIT

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, and src/cli.ts power 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.html

Local 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.html

Export 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.html
node dist/cli.js index --db bookmarks-content.db bookmarks_merged.html

With live public fetching:

node dist/cli.js index --db bookmarks-content.db bookmarks_merged.html --limit 50 --fetch-public

With Chrome/CDP extraction:

chrome.exe --remote-debugging-port=9222
node dist/cli.js index --db bookmarks-content.db bookmarks_merged.html --limit 10 --use-browser

Search 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-check

MCP 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-domain

Use 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 Bookmarks bar, semantic Other Bookmarks, and SVG emoji folder icons.

๐Ÿ”Ž 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 SKILL.md so Claude/opencode agents know when and how to use the server safely.

๐Ÿ”’ 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_AUTOMATION

Every 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 build

Run from source during development:

npm run dev

Run 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

read

Parse bookmark HTML and return a concise summary.

search

Search title, URL, domain, or folder path.

classify

Classify one URL/title into the taxonomy.

merge

Merge multiple bookmark exports into classified browser HTML.

export

Export to HTML, JSON, CSV, or Markdown.

stats

Show bookmark counts and top-level distribution.

get_tree

Show folder tree summary.

Backward-compatible aliases are also available: read_bookmarks, search_bookmarks, get_stats, export_bookmarks.

Content indexing

Tool

Purpose

index_bookmarks

Build/update the local SQLite FTS5 bookmark content index.

get_index_status

Inspect index counts and latest index time.

search_bookmarks_fulltext

Search indexed content with FTS5.

get_bookmark_content

Retrieve indexed content for a URL.

get_bookmark_content_range

Retrieve page-range content when page offsets exist.

Browser / CDP

Tool

Purpose

check_browser_connection

Check Chrome DevTools Protocol availability.

open_in_browser

Open URL in Chrome, optionally extract content or screenshot.

extract_content

Open URL, extract visible text, then close tab.

navigate_and_read

Alias for extract_content.

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=9222

Then 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:

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 test

Smoke 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: true is 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_bookmarks via useBrowser.

  • 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

  1. Keep behavior local-first and deterministic by default.

  2. Add smoke tests for every new MCP tool or behavior.

  3. Do not make tests depend on external network or a live browser.

  4. Document every public tool input/output change in docs/API.md.

  5. 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 tools
check_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).

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

    C2/5.0

    Scored across 20 tools

    Disambiguation2/5

    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.

    Naming Consistency2/5

    Inconsistent naming: some tools use verb_noun (check_browser_connection, get_bookmark_content) while others use single verbs (classify, merge). Aliases further break patterns.

    Tool Count3/5

    20 tools is borderline high for a bookmark server. Many are aliases, inflating the count. Core functionality could be served with fewer tools.

    Completeness2/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Fully local, privacy-first MCP server that turns exported X/Twitter bookmarks into a searchable, enriched knowledge base for Claude Desktop and Claude Code.
      3
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      A 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.
      8
      70 npm
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      A 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.
      7
      40 npm
      MIT