x-bookmarks-mcp
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., "@x-bookmarks-mcpsearch my bookmarks for 'rust programming'"
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.
x-bookmarks-mcp
Local-first, privacy-focused MCP server that turns exported X/Twitter bookmarks into a searchable, enriched knowledge base for Claude Desktop, Claude Code, and other MCP clients.
The bookmark database, notes, tags, and search index stay local. Optional enrichment makes outbound requests to public links contained in the export so their readable text can be indexed.
Why I Built This
X bookmarks are easy to save and difficult to reuse. This project turns an exported bookmark collection into a local knowledge base that can be searched, tagged, annotated, enriched, and exposed through MCP.
The project is intentionally small: SQLite is the source of the local index, FTS5 provides search, Python handles import/enrichment, and the MCP server exposes a bounded tool surface.
Related MCP server: BraveMCP
Highlights
Local-first storage — SQLite database and bookmark data stay on your machine.
No X API dependency — import from JSON exports instead of requiring X API credentials.
MCP integration — eight tools for search, browsing, notes, tags, stats, and topic synthesis.
Full-text search — tweet text, exported thread/article text, notes, tags, and enriched linked content.
Incremental imports — unchanged bookmarks are skipped; changed exports update existing records.
X Article preservation — if the exporter includes article title/body/URL, that content is stored locally as an
x-articlelink.Bounded enrichment — public HTTP(S) links only, redirect validation, response-size limits, timeouts, and content extraction.
Docker + CI — non-root container, linting, tests, coverage, dependency audit, secret scan, private-data scan, and Docker validation.
Security Model
URL enrichment processes untrusted links, so the fetcher:
accepts only
http://andhttps://;rejects loopback, private, link-local, multicast, reserved, and other non-public IP destinations;
validates redirect targets before following them;
limits redirects to five hops;
streams responses with a configurable hard byte limit;
accepts text/HTML-style responses only;
applies request timeouts and a descriptive User-Agent.
This is defense in depth for a local enrichment tool. Do not expose the MCP server or its data directory directly to the public Internet.
Current Limits
The project does not log into X or scrape authenticated X pages.
Full X Article text is available only when the bookmark exporter includes that article content. A raw X Article URL by itself may not be enrichable without an authenticated browser/session.
A bookmark marked as a reply can be identified as thread-related, but reconstructing an entire X conversation requires the exporter to include the conversation content.
SQLite is intended for a personal/local collection, not multi-user hosted service use.
Quick Start
1. Export bookmarks
Export X bookmarks to JSON and save the file under data/exports/, for example:
data/exports/bookmarks.json2. Install
git clone https://github.com/p0ki/x-bookmarks-mcp.git
cd x-bookmarks-mcp
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt3. Import and optionally enrich
python -m src import data/exports/bookmarks.json
python -m src enrich
python -m src statsRe-running import is safe:
new bookmark → added;
changed bookmark/export metadata → updated;
unchanged bookmark → skipped.
4. Run the MCP server
python -m src.serverExample MCP client configuration:
{
"mcpServers": {
"xbookmarks": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/absolute/path/to/x-bookmarks-mcp"
}
}
}Docker
Build:
docker build -t xbookmarks-mcp .Run the MCP server over stdio:
docker run --rm -i \
-v "$PWD/data:/app/data" \
-v "$PWD/config.yaml:/app/config.yaml:ro" \
xbookmarks-mcpCLI through Docker Compose:
docker compose run --rm xbookmarks-cli import data/exports/bookmarks.json
docker compose run --rm xbookmarks-cli enrich
docker compose run --rm xbookmarks-cli statsHow It Works
bookmark export
|
v
ingest.py
|
v
SQLite + FTS5 <---- notes / tags
|
+---- optional public URL enrichment
|
v
MCP server (stdio)
|
v
Claude / MCP clientIngest detects supported JSON formats and updates the local collection.
Embedded article content is preserved when the export contains it.
Enrich fetches bounded public linked-page content and extracts readable text.
Tagger applies configurable keyword rules.
FTS5 indexes searchable fields; MCP writes rebuild the index immediately.
MCP exposes a small read/write tool contract.
MCP Tools
Tool | Description |
| Full-text search across bookmark content |
| List tags with bookmark counts |
| Get a bookmark with links, tags, and notes |
| Browse tagged bookmarks, newest first |
| Add or replace a local note |
| Add an idempotent normalized tag |
| Collection and enrichment statistics |
| Gather bounded content for MCP-client synthesis |
Configuration
Variable | Default | Description |
|
| SQLite database path |
|
| Tag configuration |
|
| Delay between links for one bookmark |
|
| HTTP timeout |
|
| Maximum extracted text retained per link |
|
| Maximum downloaded response size |
Tag rules live in config.yaml.
Development
pytest -v
pytest --cov=src --cov-fail-under=80 -v
ruff check src/ tests/
black --check src/ tests/
isort --check-only src/ tests/
python scripts/check_private_data.pyCI tests Python 3.11, 3.12, and 3.13 and also performs dependency, secret, privacy, Docker-image, and Docker-Compose checks.
Dependency Policy
Runtime and development dependencies are pinned for reproducible CI/install behavior. The project intentionally remains on the supported MCP Python SDK 1.x line until a deliberate MCP v2 migration is completed.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Zotero MCP server for Claude and ChatGPT: search, citations, safe writes, PDF passages and pages.
Personal knowledge MCP: capture bookmarks, notes & todos by chat; archive pages; search memory.
Search, organize, and chat with your saved Reddit posts from Claude, Cursor, and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA zero-config personal knowledge management MCP server that enables Claude Desktop to automatically classify, search, and organize local Markdown notes using hybrid search and Graph RAG.4MIT
- AlicenseNot gradedqualityBmaintenanceA local-first browser extension and MCP server that captures your browsing history, bookmarks, highlights, and notes, making them searchable by Claude Desktop as a personal memory assistant.1MIT
- AlicenseAqualityAmaintenanceLocal-first knowledge graph MCP server — hybrid BM25 + vector + graph retrieval over your personal vault with provenance-grade extraction. 8 tools for Claude Desktop including search, archaeology, and graph write.143MIT
- AlicenseCqualityDmaintenanceA local-first MCP server that turns browser bookmark exports into a searchable knowledge base with classification, merging, full-text indexing, and Chrome integration.20MIT