Project Lore

io.github.tamas-fm由 GitHub 帳號 tamas-fm 發布v0.1.1更新於 Oct 24, 2026

A local-first MCP server that routes development tasks to authoritative project documentation.

概覽

AI 產生的概覽

一個本地優先的 MCP 伺服器,為儲存庫文件建立索引,並把開發任務導向最相關、最具權威性的文件。

可以做什麼
它會掃描儲存庫中的 Markdown、文字、HTML、YAML、JSON、Mermaid 與指令檔案,依類型與權威層級分類,並建立可重建的本地 SQLite(FTS5)索引,依內容雜湊增量更新。它提供三個工具:route_task 針對指定開發任務回傳應優先閱讀的文件與章節順序;search_project_knowledge 對文件做全文檢索,並依權威層級與狀態重新排序,每筆結果顯示新鮮度;get_document_context 回傳單一文件的章節與具型別的關聯。回答是有界摘錄並附精確來源位置,而非整個檔案,同時會標記過期或被取代的來源。
適用情境
當助理需要了解專案為何如此設計、哪份文件約束某項任務,或該知識是否仍然有效時適用。它補足那些回答程式碼實作位置與相依關係的程式碼智慧伺服器。最適合擁有實質書面文件、決策紀錄或限制條件的儲存庫。
執行需求
需要 Node.js 22 或以上版本。透過 npm 套件 project-lore-mcp 以本地 stdio 程序執行,可全域安裝或以 npx 執行。需要提供要索引的儲存庫根路徑,且每個儲存庫單獨設定。若引用儲存庫以外的文件根目錄,用戶端必須被授予對這些路徑的檔案系統存取權。不需要帳號、API 金鑰或網路存取。
安裝前請注意
此伺服器預設僅在本機執行,無網路存取、無遙測、無上傳,.project-lore/ 下的索引可重建且可安全刪除。它會讀取儲存庫文件,因此為儲存庫建立索引會把這些內容以引用摘錄形式暴露給助理。文件內容被視為不可信資料。專案層級設定會將 .mcp.json 檔案寫入儲存庫,用戶端會在執行專案層級伺服器前要求使用者核准。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

project-lore-mcp

A local-first MCP server that routes coding agents to the smallest useful set of project documentation — decisions, intent, and constraints — with provenance and freshness.

Code-intelligence tools (such as codebase-memory-mcp) answer where is this implemented and what depends on it. This project answers the complementary questions: why was it designed this way, which document governs this task, and is that knowledge still current?

What it does

Point it at a repository (plus optional external documentation roots). It:

  1. discovers Markdown, text, HTML, YAML, JSON, Mermaid, and Claude instruction files;
  2. classifies each document by kind and authority (instructions → canonical → design → planning → historical → generated → proposed);
  3. extracts headings, sections, links, frontmatter, ADR status, and explicit "read first" / "supersedes" / task-routing relationships — deterministically, with recorded provenance (structural extraction applies to Markdown; other formats receive plain-text indexing);
  4. stores a rebuildable local index in SQLite (FTS5), updated incrementally by content hash;
  5. answers task and knowledge queries with bounded excerpts and exact source locations — never whole files, flagging stale or superseded sources instead of hiding them.

MCP tools

ToolPurpose
route_taskGiven a development task, return the ordered documents/sections to read first. Explicit manifest routes win over ranked search.
search_project_knowledgeFull-text search over documentation, re-ranked by authority and status; freshness is shown per result.
get_document_contextSections + typed relationships of one document, without returning the whole file.

Install and run

Requires Node.js ≥ 22.

bash
npm install -g project-lore-mcp   # or npx -y project-lore-mcp (no install needed)project-lore index --root /path/to/your/repo   # one-shot index + statsproject-lore serve --root /path/to/your/repo   # stdio MCP server

Claude Code

Run this once from inside the repository you want to index:

bash
# Personal setup — stored in your local Claude Code config, not committedclaude mcp add project-lore --scope local -- \  npx -y project-lore-mcp serve --root "$PWD"

For teams, commit a shared configuration instead:

bash
# Shared setup — writes .mcp.json into the repositoryclaude mcp add project-lore --scope project -- \  npx -y project-lore-mcp serve --root .

The project scope uses a relative root (.) so it works on any checkout. Claude Code will ask each user to approve project-scoped servers before running them.

One repository, one configuration. Project Lore's command contains a fixed root path, so it always indexes one specific repository. Register it separately per repository rather than globally.

It coexists with codebase-memory-mcp — configure both; they own different questions. If your configuration references documentation outside the repository, Claude Code must be granted filesystem access to those paths (add them as additional working directories or approve the permission prompts).

Try the example

bash
npm run index:example        # index examples/documented-projectnpm run serve:example        # serve it over stdio

Configuration

Optional project-lore.config.yaml at the repository root:

yaml
sources:  - id: repository    type: directory    path: .    authority: canonical  - id: design-handoff    type: directory    path: ../product-docs      # explicit opt-in external root    authority: designclassification:  rules:    - pattern: "docs/legacy/**"      authority: historical

See docs/configuration.md for the full reference and docs/concepts.md for the authority model.

Design principles

Store and retrieve documented intent conservatively. Derive structure automatically. Preserve provenance always.

  • Local-only by default. No network access, no telemetry, no uploads. The index is regenerable and safe to delete (.project-lore/, gitignored).
  • Deterministic before AI. v1 uses no LLM and no embeddings. Every stored relationship records how it was extracted; inferred data can never masquerade as documented fact.
  • Evidence, not instructions. Retrieved excerpts are quoted, bounded, and attributed. Document content is treated as untrusted data (see docs/provenance-and-trust.md).

Project status

v0.1.0 — first vertical slice. See docs/architecture.md, the ADRs in docs/adr/, and CONTRIBUTING.md.

License: MIT.

來源:README.md,提交 2841711

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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