SeekLink

io.github.simonsysun由 GitHub 帳號 simonsysun 發布v0.7.0更新於 Oct 24, 2026

Local read-only semantic search for Markdown vaults through MCP.

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

本機唯讀 MCP 伺服器,讓助理對 Markdown 筆記庫做語意檢索並讀取帶行號定位的結果。

可以做什麼
以關鍵字與向量混合檢索搜尋 Markdown 筆記庫,支援標籤、資料夾與結果數量篩選,Apple Silicon 上可選用重排。依路徑與行號讀取精確的檔案片段,可指定行數或 grep 式上下文。查看索引數量、模型名稱、設定相容性與新鮮度。對 Python、SQLite、本機資料庫、索引相容性與常駐程序狀態做診斷。
適用情境
適合助理需要在個人 Markdown 或 Obsidian 風格筆記庫(包含中英雙語筆記)中尋找並引用段落,又不希望把筆記送到託管服務的情境。較適合概念性或跨語言檢索,而非精確字面比對。
執行需求
透過 uvx 或 pip 以 stdio 本機程序執行,需安裝選用的 MCP 附加套件。需要 Python 3.11-3.14,且 Python 的 sqlite3 連結到 SQLite 3.45 或更新版本並啟用 FTS5。支援 macOS 與 Linux,Windows 非主要支援路徑。須先用命令列建立索引,每個筆記庫執行一個伺服器並傳入絕對路徑。不需 API 金鑰或帳號。
安裝前請注意
專案已標示為暫停,不再積極維護。MCP 介面為唯讀且不提供索引功能,但 status 與 doctor 可能初始化或遷移筆記庫內的本機資料庫結構。首次建立索引會下載嵌入模型,並在筆記庫的 .seeklink 目錄寫入資料庫。啟用與未啟用重排的檢索分數不可互相比較。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 SeekLink,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

SeekLink

English · 中文

[PyPI] [Python 3.11+] [Tests] [License: MIT]

Status: paused. SeekLink is no longer actively maintained. For an actively-developed local Markdown search engine in the same space — local hybrid keyword + vector search, line-anchored results, CLI + MCP, multilingual — we recommend qmd.

SeekLink is a local semantic search CLI and optional read-only MCP stdio server for Markdown vaults. It indexes a folder of .md files, searches with hybrid keyword + vector retrieval, and returns line-anchored results that humans and agents can read with simple shell commands.

It is built for personal knowledge bases, Obsidian-compatible vaults, bilingual English/Chinese notes, and local agent workflows. MCP clients such as Claude Code, Cursor, and VS Code can call the same read-only search/get/status/doctor surface through seeklink[mcp]. It is also a useful search layer for Markdown wiki patterns such as Andrej Karpathy's llm-wiki: an agent can search existing pages, read precise line windows, then update the wiki without sending the vault to a hosted service.

Everything runs locally. No API key. No cloud search service. No Obsidian plugin required.

Install

bash
uv tool install seeklink# orpip install seeklink

For Apple Silicon reranking support, install the optional MLX extra:

bash
uv tool install "seeklink[mlx]"# orpip install "seeklink[mlx]"

For Model Context Protocol (MCP) clients such as Claude Code, Cursor, or VS Code, install the optional MCP extra:

bash
uv tool install "seeklink[mcp]"# orpip install "seeklink[mcp]"

SeekLink requires Python's sqlite3 module to be linked against SQLite 3.45 or newer with FTS5 enabled. seeklink status --vault PATH checks this and prints a clear error if the runtime SQLite is too old.

Quick Start

bash
# 1. Build the index first.seeklink index --vault /path/to/vault
# 2. Search it.seeklink search "machine learning" --vault /path/to/vault

Daily use is simpler if you set a default vault:

bash
export SEEKLINK_VAULT=/path/to/vaultseeklink indexseeklink search "agent memory systems"seeklink get notes/agent-memory-patterns.md:1 -C 20

seeklink search and single-file seeklink index path/to/file.md use a resident daemon when --vault is not passed. The daemon keeps the embedder and optional reranker warm in memory; on macOS this appears as a local Python process. It is local-only, uses a Unix socket, and does not open a network port or call a cloud service. By default it exits after 15 minutes of inactivity. Full-vault seeklink index runs in-process so progress stays on stderr and the final Done: summary stays on stdout. seeklink status and seeklink get always stay cold-start: status only reads SQLite metadata, and get reads the file directly from disk. Use --no-daemon, SEEKLINK_NO_DAEMON=1, or an explicit --vault PATH when a script needs a one-shot cold-start path.

MCP users follow the same first step: build the index with seeklink index --vault PATH before registering the MCP server.

Output

Text search output is stable:

text
  SCORE  PATH[:LINE]  TITLE           <content preview, one line, up to 120 chars>
  • PATH is relative to the vault root.
  • LINE is 1-indexed and points to the best matching chunk in the current file.
  • Exit code is 0 for success, including no results; 1 for runtime vault/config/file errors detected by SeekLink; and 2 for command-line usage errors from argument parsing.
  • Scores are useful for sorting within one query. Do not compare scores across reranker-enabled and reranker-disabled runs.

Use JSON when an agent needs structured output:

bash
seeklink search "agent memory systems" --vault PATH --jsonseeklink status --vault PATH --jsonseeklink doctor --vault PATH --jsonseeklink daemon status --json

Common Commands

Search

bash
seeklink search "query" --vault PATH [options]

Options:

text
--top-k N          Number of results. Default: 10.--json             Emit one machine-readable JSON object.--tags TAG [TAG]   Filter by tags. AND semantics.--folder PREFIX    Filter by vault-relative folder prefix.--rerank-k N|auto  Rerank candidate budget. Default: auto.--no-rerank        Skip cross-encoder reranking for this query.--no-daemon        Force an in-process search instead of using the daemon.--title-weight F   Override title/alias/heading channel weight. Default: 1.5.

Get

Read a precise file window without using the database or daemon:

bash
seeklink get notes/spaced-repetition.mdseeklink get notes/spaced-repetition.md:12seeklink get notes/spaced-repetition.md:12 -l 40seeklink get notes/spaced-repetition.md:12 -C 20

-l/--lines prints lines starting at LINE. -C/--context prints lines before and after LINE, grep-style. Path escapes such as ../.. are rejected.

Status

bash
seeklink status --vault PATHseeklink status --vault PATH --json

Status reports index counts, model names, index-configuration compatibility, SQLite WAL status, and freshness warnings. It does not load the embedding or reranking models.

Doctor

bash
seeklink doctor --vault PATHseeklink doctor --vault PATH --json

Doctor checks Python, SQLite, the local database, index compatibility, daemon state, and optional MLX availability. It does not download or load models, but may initialize the local SeekLink database/schema if missing.

MCP

The optional Model Context Protocol (MCP) adapter lets agent clients discover and call SeekLink's read-only tools directly. The CLI keeps working independently; MCP is another surface for the same retrieval path, not a replacement.

bash
seeklink mcp --vault PATH

Install it with seeklink[mcp]. Build the index with the CLI first: seeklink index --vault PATH. The MCP adapter is read-only and exposes four tools: search, get, status, and doctor. It does not expose index, write notes, use HTTP/OAuth, or route through the Unix-socket daemon. Run one MCP server per vault. search keeps its text summary compact with paths and line anchors; result previews stay in structured content for agents that need them. status and doctor may initialize or migrate the local SeekLink schema when an existing .seeklink/seeklink.db needs it, but they do not index or modify Markdown notes. If your MCP client does not inherit your shell PATH, use the absolute path from which seeklink in the examples below.

Claude Code:

bash
claude mcp add --transport stdio --scope project seeklink \  -- seeklink mcp --vault /ABS/PATH/TO/VAULT

Cursor .cursor/mcp.json:

json
{  "mcpServers": {    "seeklink": {      "type": "stdio",      "command": "seeklink",      "args": ["mcp", "--vault", "/ABS/PATH/TO/VAULT"]    }  }}

VS Code .vscode/mcp.json:

json
{  "servers": {    "seeklink": {      "type": "stdio",      "command": "seeklink",      "args": ["mcp", "--vault", "/ABS/PATH/TO/VAULT"]    }  }}

Index

bash
seeklink index --vault PATHseeklink index path/to/file.md --vault PATH

Full-vault indexing skips unchanged files by content hash unless the stored index was built with a different embedder, vector dimension, or chunker configuration, in which case SeekLink rebuilds the derived index contents. Single-file indexing updates one Markdown file only when the existing index configuration is compatible.

Daemon

bash
seeklink daemon statusseeklink daemon stopseeklink daemon restartseeklink daemon pidseeklink daemon run --vault PATH

You normally do not need to start the daemon manually. search and single-file index auto-spawn and auto-restart it when appropriate, then it exits after SEEKLINK_DAEMON_IDLE_TIMEOUT seconds of inactivity. The default is 900 seconds (15 minutes); set it to 0, off, false, or no to keep the daemon warm until stopped.

Full-vault index still runs in-process for progress output. Passing --vault to search or single-file index forces a one-shot cold-start path because the daemon is bound to one vault at startup. --no-daemon and SEEKLINK_NO_DAEMON=1 also force the same cold-start path. Use seeklink daemon status to inspect the warm process and seeklink daemon stop to release its memory immediately.

How Search Works

SeekLink fuses four channels with Reciprocal Rank Fusion:

ChannelPurpose
BM25 / FTS5Exact words, code terms, acronyms, CJK lexical matches
Vector searchSemantic matches across different wording
Title / aliases / headingsExact note and section lookup
Wikilink indegreeSmall graph-quality prior from existing [[links]]

The default embedder is jinaai/jina-embeddings-v2-base-zh through fastembed. CJK full-text search uses a jieba FTS5 tokenizer when the local Python/SQLite build can safely register it; otherwise SeekLink falls back to SQLite's built-in trigram tokenizer instead of crashing.

The default vector dimension is 768. Advanced custom-embedder experiments can set SEEKLINK_EMBEDDING_DIM, but it must match the embedder output and requires a full seeklink index rebuild.

On Apple Silicon, SeekLink can rerank candidates with mlx-community/Qwen3-Reranker-0.6B-mxfp8 when installed with seeklink[mlx]. Reranking is local and optional; if MLX is unavailable, SeekLink falls back to first-stage hybrid RRF ranking. Use --no-rerank for one query or set SEEKLINK_RERANKER_MODEL="" to disable it globally.

Frontmatter

Markdown frontmatter is optional. When present, SeekLink uses it for tags and aliases:

yaml
---tags: [ai, memory]aliases: [LLM memory, agent memory]---
  • tags support filtered search: seeklink search "memory" --tags ai
  • aliases are indexed for search and used when resolving wikilinks

Storage

SeekLink writes one SQLite database inside the vault:

text
/path/to/vault/.seeklink/seeklink.db

The database contains source metadata, chunks, FTS5 tables, sqlite-vec vectors, and a wikilink graph. Delete .seeklink/ and run seeklink index to rebuild.

Supported

AreaStatus
Python3.11, 3.12, 3.13, 3.14
SQLitePython sqlite3 linked against SQLite 3.45+ with FTS5
OSmacOS and Linux
WindowsNot supported as a first-class path
File formatMarkdown .md
Vault stylePlain folder or Obsidian-compatible vault
CJKNative path via jieba, with trigram fallback on static SQLite builds
RerankerOptional seeklink[mlx] extra on Apple Silicon; disabled elsewhere
DaemonSingle vault per machine
MCPOptional seeklink[mcp] stdio adapter, one server per vault

Not For

  • Hosted or synced multi-user search.
  • Non-Markdown sources without conversion.
  • A GUI or Obsidian plugin.
  • Sub-millisecond search over millions of notes.
  • Cloud embedding or reranking APIs.

Agent Notes

Agents can use SeekLink through ordinary subprocess calls:

bash
seeklink status --vault PATHseeklink index --vault PATHseeklink search "query" --vault PATH --jsonseeklink get PATH:LINE -C 20 --vault PATH

MCP clients can use the optional read-only adapter:

bash
seeklink mcp --vault PATH

To make an agent choose SeekLink for a Markdown vault, add this to the project's AGENTS.md, CLAUDE.md, or editor rules:

text
When you need to search or inspect this Markdown vault, use SeekLink forsemantic retrieval:
1. Run `seeklink status --vault PATH --json`.2. If no index exists or files changed, run `seeklink index --vault PATH`.3. Run `seeklink search "QUERY" --vault PATH --json`.4. Read exact context with `seeklink get PATH:LINE -C 20 --vault PATH`.
If SeekLink is registered as an MCP server in this client, prefer the`search`, `get`, `status`, and `doctor` MCP tools over shelling out to the CLI.
Prefer SeekLink for conceptual, cross-language, tag/folder-filtered, orObsidian-style note searches. Use rg for exact literal searches.

For hot loops, the daemon exposes a length-prefixed JSON protocol over the Unix socket at ~/.rhizome/seeklink.sock. Most agents should prefer the CLI JSON surface unless they specifically need socket-level latency.

See llms.txt for the compact agent contract.

Evaluation

Search-quality tests live in tests/blind/; the method is documented in docs/blind-test.md. Release claims should be backed by the bundled fixture queries or by clearly labeled private-vault measurements.

Contributing

bash
git clone https://github.com/simonsysun/seeklinkcd seeklinkuv sync --devuv run python -m pytest tests/ -q

Keep runtime dependencies small, keep public docs user-facing, and add a CHANGELOG.md entry for user-visible changes.

License

MIT

來源:README.md,提交 336de57

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.7.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分