LLM Wiki
Builds a local, citation-aware wiki from an approved project scope and exposes it as an MCP server with a single read-only tool for agents to explore the wiki.
README
LLM Wiki
@autocut-cli/llm-wiki builds a local, citation-aware wiki from an explicitly
approved project scope. It can be used directly or by any MCP client, including
AutoCut, Claude Code, Codex, and Hermes.
Public surface
- CLI:
llm-wiki - MCP server:
llm-wiki serve --root <project> - MCP transport: stdio
- MCP tools:
wiki_exploreonly - Runtime: Node.js 24 or newer
The management CLI owns initialization, building, provider profiles, and structured knowledge updates. Agents querying over MCP cannot mutate the wiki.
Quick start
npm install --global @autocut-cli/llm-wiki
llm-wiki catalog --root /path/to/project --json
llm-wiki init --root /path/to/project --select README.md --yes --json
llm-wiki provider set wiki-generation \
--kind anthropic --model YOUR_MODEL_ID
llm-wiki provider set-key wiki-generation --key-stdin
llm-wiki provider use wiki-generation --root /path/to/project
llm-wiki build --root /path/to/project --json
llm-wiki serve --root /path/to/project
provider set-key accepts the credential only on stdin, never in process
arguments. The default keyring profile persists until a project selects a
different profile. For headless environments, use
--credential-store env --env-name YOUR_VARIABLE when creating the profile
instead.
init shows only eligible first-level entries and defaults all of them to
selected. Selected directories are traversed recursively. Any path segment that
starts with . and every Git-ignored file are excluded.
If Git metadata is present but Git cannot verify the repository scope,
cataloging, status verification, and builds fail closed with
GIT_SCOPE_UNAVAILABLE; they never fall back to broader filesystem traversal.
Consent also records whether Git or filesystem filtering was confirmed. If that
strategy later changes, source enumeration stops with SOURCE_SCOPE_CHANGED
until the user re-runs init. State created before this field existed must
likewise be reconfirmed once (SOURCE_SCOPE_RECONFIRM_REQUIRED).
If a build process is interrupted, the next status check reclaims its
dead-owner lock and reports BUILD_INTERRUPTED, so rebuilding can resume
automatically. Lock recovery is serialized with a cross-platform process lock,
including recovery from a process that exits during the recovery operation.
Interactive init uses a first-level checklist: Up/Down moves, Space toggles,
Enter confirms, and Escape cancels. Non-interactive callers must pass both
--yes and one or more explicit --select values.
Local files
The only project file intended for commit is llm-wiki.json. Local consent,
credentials references, build state, source proxies, and immutable generations
live under .llm-wiki/. In Git projects, init adds /.llm-wiki/ to the
repository-local .git/info/exclude; it does not edit the shared .gitignore.
Provider secrets are never written to either location. They are read from a system credential store or an explicitly named environment variable.
Compiler adapter
Production builds use an exact-pinned reviewed llm-wiki-compiler fork.
It adds native compile({ embeddings: false, systemPolicy }) support and source
deletion reconciliation. Tests inject a deterministic engine.
Semantic retrieval is off by default. When enabled, it uses a private SQLite derived cache over compiled Wiki pages only; raw source proxies are never the search corpus. Completed page batches are committed immediately, so a later provider failure or cancelled build can resume without resending completed pages. The embedding client supports OpenAI-compatible and Voyage endpoints.
During an incremental build, the remote embedding provider may receive a strictly length-bounded query containing the topic, source locator, and a short new-evidence excerpt from the user-confirmed source scope. This query is used only to recall existing compiled pages and is not added to the searchable corpus. No automatic secret-pattern redaction is claimed: enabling semantic retrieval authorizes this bounded query egress to the selected independent provider.
Semantic mode requires an explicit embedding profile whose name and credential both differ from the Wiki generation profile and credential. The generation key is never passed to the embedding client. A successful build records only the embedding profile, provider kind, model, availability, and a reason code in its manifest—never a credential.
llm-wiki provider set wiki-generation \
--kind openai-compatible --model generation-model \
--credential-store env --env-name WIKI_GENERATION_KEY
llm-wiki provider set wiki-embedding \
--kind voyage --model voyage-3 \
--credential-store env --env-name WIKI_EMBEDDING_KEY
llm-wiki provider use wiki-generation --root /project
llm-wiki provider use-embedding wiki-embedding --root /project
llm-wiki semantic enable --root /project
llm-wiki build --root /project
At build and query time, a missing or changed embedding profile, missing credential, bad index, or provider failure produces a stable semantic reason code and falls back to lexical retrieval from compiled Wiki pages in the last good generation.
serve is strictly read-only and exits with its stdio client. Automatic builds
run only under the explicit llm-wiki watch --root <project> process; a query
never starts a build.
status verifies the approved source scope by default. Polling integrations can
use status --fast to read the committed generation and runtime state without
rescanning or hashing project files; their watcher remains responsible for
marking source changes stale.
Client registration
llm-wiki install and llm-wiki uninstall delegate registration to the
installed Claude Code, Codex, and Hermes CLIs. They do not edit those clients'
configuration files directly. Missing clients produce stable reason codes;
Hermes keeps its required interactive discovery flow.
Management JSON contract
With --json, stdout is exactly one JSON envelope:
{"ok":true,"command":"status","data":{}}
Failures use:
{"ok":false,"command":"build","error":{"code":"ERROR_CODE","message":"..."}}
Structured knowledge never travels in process arguments:
printf '%s' '{"id":"decision-1","title":"Decision","text":"Use stdio."}' |
llm-wiki upsert --root /project --json
delete likewise reads {"id":"decision-1"} from stdin.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。