litecontext-cli
LiteContext CLI
LiteContext CLI 是一个面向个人知识的本地优先上下文引擎和 MCP 服务器。它为本地 Markdown 或 Obsidian 文件夹建立索引,保留来源引用,并让兼容的 AI 客户端通过 MCP 检索相关的本地上下文。
它无需桌面应用程序、浏览器、云账户或 localhost UI 即可运行。默认情况下,你的来源和索引保留在 ~/.litecontext 中。
安装
Go 引擎目前是一个只读的兼容性预览版。它打开现有的 LiteContext v1 JSON 工作区,应用上下文配置文件边界,并在无需 Node 运行时的情况下提供带引用的搜索、doctor 和 MCP stdio:
go run ./cmd/litecontext doctor --workspace ~/.litecontext --json
go run ./cmd/litecontext search --workspace ~/.litecontext --query "project roadmap" --json
go run ./cmd/litecontext mcp serve --workspace ~/.litecontext它尚不支持写入来源、配置文件或 SQLite。TypeScript CLI 在迁移期间仍然是这些操作的兼容性基线。首个 Go 二进制版本将通过 GitHub Releases 和 Homebrew 分发;npm 不是必需的产品运行时。
Related MCP server: ragi
当前 TypeScript CLI 基线
litecontext source add ~/Documents/notes --source-id notes --name "Personal notes"
litecontext source list
litecontext doctor
litecontext serve --mcp对于 Obsidian 仓库,请添加 --source-type obsidian。source add 会创建一个默认的上下文配置文件,除非提供了 --no-default-profile。使用 source sync <id> 刷新来源,使用 source remove <id> 仅移除 LiteContext 的本地索引和注册表条目,绝不会删除原始文件。
MCP 配置
为 AI 客户端打印可粘贴的配置:
litecontext mcp-config --global服务器命令是 litecontext serve --mcp。当没有桌面应用程序运行时,MCP 服务器会读取相同的本地工作区。
工作区与架构
Local Markdown / Obsidian
-> connectors and ContextItem normalization
-> SQLite/FTS index + Context Profile
-> LiteContext CLI / MCP stdio
-> cited local context for an AI client@litecontext/core— 契约、配置文件、SQLite/FTS 索引、检索。@litecontext/connectors— 可移植的来源连接器。@litecontext/cli— 来源生命周期命令、诊断和 MCP 服务器。
开发
过渡仓库目前同时验证 TypeScript 基线和 Go 只读引擎。它需要 Go 1.24.1、Node 24.13–24.x 和 pnpm 10。
pnpm install
pnpm check
pnpm audit:securitypnpm check 为两种实现运行共享的黄金夹具测试。
请参阅 CONTRIBUTING.md、SECURITY.md、第三方声明 和发布指南。
许可证
This server cannot be deployed
Maintenance
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Related MCP Servers
- AlicenseAqualityDmaintenanceA local-first MCP server that exposes personal notes and files as unified semantic context for AI agents via vector search and file monitoring.6MIT
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.310 npmMIT
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server that turns a .context/ folder of markdown files into a searchable knowledge layer for AI coding agents.17 npm2MIT
- AlicenseNot gradedqualityAmaintenanceLocal-first MCP server for retrieval over markdown wikilink vaults, offering hybrid vector+lexical search, note reading, neighbor expansion, and recent activity tracking with fully local embeddings and no network egress.MIT