Repository avatar
Search & Data Extraction
v0.1.0
active

bookmarks

com.mobayilo/bookmarks

Search, read and save links on a personal bookmarks board. Reads are public; saving uses OAuth.

Documentation

Bookmarks

Bookmarks is a small, open-source place for the links you save while you read. You save a page in one click; Bookmarks reads its title and description, picks a category (with your own AI key, or other without one) and shows it on a clean, themed public board. Your AI agent can search, read and save bookmarks for you through MCP, UTCP or a REST API.

  • One owner per install. Reading is public; writing needs the owner.
  • Runs on your own Cloudflare account: one Rust Worker and one D1 database. No server, no Docker, no database to run. It is sized for the Workers free plan.
  • Every bookmark is a valid OKF v0.1 concept; export the whole board as an OKF bundle at any time.

Live: bookmarks.mobayilo.com

Save links

Sign in at /login (a magic link to your email, or Google), then open /capture:

  • Desktop: drag the bookmarklet to your bookmarks bar. On any page, click it: a small window shows the title, description and suggested category; press Save.
  • iPhone and iPad: install the Apple Shortcut from the same page and create its token there. Share any page or post to "Save to Bookmarks".

You edit bookmarks and categories at /admin.

Use Bookmarks with your AI

Read tools (list, search, get, categories, OKF export) are public. Write tools (save, update, delete, categories) need the owner: OAuth for MCP clients, or a personal access token from /admin/tokens (scope read or write, shown once).

InterfaceWhereFor
MCP (Streamable HTTP)/mcpClaude, MCP Inspector and other MCP clients; OAuth 2.1 built in
UTCP 1.0 manual/utcpUTCP clients (token in bookmarks_BOOKMARKS_TOKEN)
REST/api/v1, OpenAPI at /api/v1/openapi.jsonscripts, curl, the iOS Shortcut
A2A agent card/.well-known/agent-card.jsonagent directories
Guide for agents/llms.txtany LLM
# Claude Code: then run /mcp and authenticate (sign in as the owner, press Allow)
claude mcp add --transport http bookmarks https://bookmarks.mobayilo.com/mcp

# REST
B=https://bookmarks.mobayilo.com
curl "$B/api/v1/search?q=d1"
curl -X POST "$B/api/v1/bookmarks" -H "Authorization: Bearer bkm_…" \
  -H 'content-type: application/json' -d '{"url":"https://developers.cloudflare.com/d1/"}'

Step-by-step setup for Claude, ChatGPT, Cursor, VS Code, UTCP, REST and the CLI, with this site's own URLs: the page /agents (bookmarks.mobayilo.com/agents), linked from the board's footer. More examples (OAuth with curl, every route, error codes): crates/bookmarks-worker/README.md.

Your own copy: list it or keep it private

A self-hosted copy works with every client above at its own address; /agents shows that address. Nothing announces it: it is private until you share the URL.

  • Keep it private: do nothing. The MCP Registry proof route (/.well-known/mcp-registry-auth) answers 404 until you set MCP_REGISTRY_AUTH, and usage metrics stay in your own Cloudflare account.
  • List it in the official MCP Registry: edit server.json (a name in the namespace of a domain you control, for example com.example/bookmarks or com.example.bookmarks/bookmarks, and your /mcp URL), prove the domain with mcp-publisher (DNS, or HTTP through the MCP_REGISTRY_AUTH secret) and publish. Steps: docs/RUNBOOK.md, "Publish to the MCP Registry". Do not publish under com.mobayilo: that namespace is this project's.
  • Usage metrics (calls per surface and tool, errors, latency; no personal data) go to your account's Analytics Engine; remove the analytics_engine_datasets block from wrangler.jsonc to turn them off. Queries: RUNBOOK, "Usage metrics".

The old read API (GET /api/resources, /api/categories) still answers with the same JSON as before.

Command line

The bookmarks CLI does the same from a terminal or an agent's shell, with --json, --dry-run, stable exit codes and examples in every --help:

brew install adusingi/tap/bookmarks        # or a binary from GitHub Releases (cli-v*)
bookmarks login                            # paste a write token from /admin/tokens
bookmarks save https://developers.cloudflare.com/d1/
bookmarks search d1 --json
bookmarks export okf ./knowledge

BOOKMARKS_TOKEN (wins over the keychain) and --server/BOOKMARKS_SERVER (self-hosters) work too. Every command: crates/bookmarks-cli/README.md.

Self-host on Cloudflare

You need a Cloudflare account, Rust 1.99+ with the wasm32-unknown-unknown target, worker-build 0.9 (cargo install worker-build --version 0.9.0 --locked), Node 24 and pnpm.

git clone https://github.com/adusingi/bookmarks && cd bookmarks
pnpm install
pnpm exec wrangler login

# 1. The database: put the printed database_id into wrangler.jsonc
pnpm exec wrangler d1 create bookmarks
pnpm exec wrangler d1 migrations apply bookmarks --remote

# 2. Secrets (each command asks for the value)
pnpm exec wrangler secret put OWNER_EMAIL
pnpm exec wrangler secret put ZEPTOMAIL_SEND_MAIL_TOKEN
# optional: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, ADMIN_PASSWORD,
#           ANTHROPIC_API_KEY or OPENAI_API_KEY, SUPADATA_API_KEY

# 3. Deploy (builds the web assets and the Worker; --env= is the top level)
pnpm exec wrangler deploy --env=

wrangler.jsonc also defines env.preview (the maintainer's preview Worker with its own database); you can ignore it or delete it.

Then add your domain: "routes": [{ "pattern": "bookmarks.example.com", "custom_domain": true }] in wrangler.jsonc and deploy again (or set "workers_dev": true to use bookmarks.<subdomain>.workers.dev).

SecretNeededWhat it does
OWNER_EMAILyesthe only address that can sign in
ZEPTOMAIL_SEND_MAIL_TOKENfor email sign-insends the magic link (ZeptoMail HTTP API)
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETnoboth set → "Continue with Google"; redirect URI <origin>/login/google/callback
ADMIN_PASSWORDnofallback sign-in, only while no email provider is set (12+ characters)
ANTHROPIC_API_KEY / OPENAI_API_KEYnopicks a category; without a key every bookmark goes to other
SUPADATA_API_KEYnobetter titles for YouTube and social links

Plain settings in wrangler.jsonc vars: AI_PROVIDER (anthropic, openai, none; empty = the first key present), AI_MODEL, WEATHER_LAT/WEATHER_LON (the header weather badge). The rate-limit namespace_ids (1002, 1003) must be unique in your account. The magic-link sender address is noreply@mobayilo.com: self-hosters change FROM_ADDRESS in crates/bookmarks-worker/src/auth/email.rs to an address verified in their own ZeptoMail account, or use Google or the password fallback.

Coming from the old Docker version (Next.js + Postgres + Telegram bot)? Move your data with the importer: it keeps every id, URL, slug, date, category and tag, and a checksum proves it. See docs/RUNBOOK.md, "Postgres → D1 for self-hosters".

Develop

pnpm install
cp .dev.vars.example .dev.vars        # OWNER_EMAIL, ADMIN_PASSWORD
pnpm exec wrangler d1 migrations apply bookmarks --local
pnpm exec wrangler dev                # http://localhost:8787

Checks (the same as CI):

cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
pnpm lint && pnpm typecheck && pnpm web:build
pnpm exec wrangler deploy --dry-run --env= --outdir /tmp/bookmarks-worker
pnpm check:conflicts

Pushes to development deploy the preview Worker bookmarks-preview (its own D1, --env preview); pushes to main apply the D1 migrations and deploy production (GitHub Actions, docs/RUNBOOK.md).

Repository

PathWhat
crates/bookmarks-corepure Rust rules: URLs, slugs, OKF concepts, metadata parsing, search fold (also builds for wasm32)
crates/bookmarks-toolsthe tool registry: one definition per tool → REST, OpenAPI, MCP, UTCP, A2A, llms.txt
crates/bookmarks-workerthe Cloudflare Worker (workers-rs, askama pages, D1)
web/the browser assets: CSS, themes and a small TypeScript bundle (Vite)
migrations/D1 schema
scripts/pg-to-d1/the one-time Postgres → D1 importer, checksums and a dry run
fixtures/golden data from the old TypeScript app that the Rust code is tested against
wrangler.jsoncthe Worker config

Docs

Support

MIT licensed.

No installation packages available.