LLM Wiki MCP Server
Uses OpenAI-compatible APIs for LLM-based ingestion and chat answering, as well as optional semantic embeddings for retrieval.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LLM Wiki MCP Server查一下 Agent 是什么"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🧠 LLM Wiki — 轻量个人知识库 MCP Server
编译一次,持续复利 · 替代传统 RAG 的"每次从零检索"
15 个源文件 · 4 个运行时依赖 · 无 PyTorch / Chroma / LangGraph
这是什么
LLM Wiki 是一个以 编译复利 为核心的个人知识库工具。它将原始素材编译为带双向链接的结构化 Wiki 页面,而不是像传统 RAG 那样每次查询从零检索碎片。
┌─ 原始素材 ──→ LLM 编译 ──→ 互联 Wiki 页
┌─ query ────┤ ├─→ 结构化回答
└─ 检索 ──────→ BM25 + [可选向量] + RRF + 链接扩展 ──────→ 相关片段可作为 MCP Server 接入 Claude Desktop / Cursor 等任意 MCP Agent,也自带交互式对话框。
Related MCP server: LLM Wiki MCP
快速开始
安装
pip install fastmcp openai pyyaml python-dotenv或克隆后本地安装:
git clone https://github.com/COOLFEATHER/LLMwiki_mcp.git
cd LLMwiki_mcp
pip install -e .启动对话
python3 chat.py界面:
╔══════════════════════════════════════════════╗
║ 🧠 LLM Wiki — 个人知识库对话 ║
╚══════════════════════════════════════════════╝
📡 检索: 向量 + BM25 + RRF + 链接扩展
🎯 Embed: 本地 TF-IDF
🤖 回答: 纯检索
📚 Wiki: 6 页
you> 查一下 Agent 是什么
📄 Agent → Agent 是能感知环境、自主决策、执行动作的系统...作为 MCP Server 启动
llm-wiki-server两种回答模式
模式 | 命令 | 说明 |
纯检索(默认) |
| 直接返回 Wiki 片段,零延迟,无需 API key |
LLM 回答 |
| 检索后让 LLM 组织回答,更易读,需要 API key |
对话中输入 /llm 随时切换。
5 个 MCP 工具
工具 | 说明 | 需要 API key |
| 混合检索 + 链接扩展,返回相关 Wiki 片段 | ❌ |
| 读取 Wiki 页全文(含 frontmatter) | ❌ |
| 新建 Wiki 页,自动建索引 | ❌ |
| 编译原始素材为 Wiki 页(提取概念/建链/标矛盾) | ✅ |
| 全量重建检索索引 | ❌ |
直接调用示例
import server
# 查知识库(无需 API key)
print(server.query("什么是 Agent"))
# 读 Wiki 页
print(server.read_wiki("LLM_Wiki"))
# 写新页(自动建索引)
server.write_wiki("设计模式", "# 设计模式\n\n正文...", tags="编程,架构")
# 编译素材(需要 API key)
print(server.ingest("data/raw/笔记.md"))环境变量
变量 | 默认值 | 说明 |
| — | LLM chat API key(ingest 和 --llm 模式需要) |
| — | 兼容 OpenAI 接口的地址,如 |
|
| 对话模型名 |
|
| Embedding 模式: |
| — | Embedding API key( |
| — | Embedding API 地址 |
|
| Embedding 模型名 |
Embedding 三模式
模式 | 设置 | 检索链路 | 依赖 | 效果 |
local(默认) |
| TF-IDF 向量 + BM25 + RRF + 链接扩展 | 纯 numpy | 本地可用,零配置 |
api | + | 语义向量 + BM25 + RRF + 链接扩展 | openai | 语义理解更好 |
off |
| BM25 + 链接扩展 | 无 | 最轻量 |
数据架构
data/
├── raw/ 原始素材(只增不改,不可变真源)
├── wiki/ 编译产物(frontmatter + markdown)
│ ├── Agent.md
│ ├── LLM_Wiki.md
│ └── ...
├── links.json 双向链接图谱(自动维护)
└── index.json 检索索引(自动重建)三层架构:
Raw Sources — 原始素材,不可变、可重编译
Wiki — LLM 编译产物,
[[双向链接]]互联,派生可重建Schema —
SCHEMA.md维护手册,约束页面规范
轻量化对比
重量级依赖 | 本项目的替代 | 节省 |
sentence-transformers + PyTorch (~2GB) | API embedding / 本地 TF-IDF | ~2GB |
chromadb + duckdb (~500MB) | 扁平 JSON 向量索引(纯 Python) | ~500MB |
langgraph + langchain-core (~50MB) | 5 个 MCP 工具直接调用 | ~50MB |
rank-bm25 + jieba (~10MB) | 自实现 BM25(80 行) | ~10MB |
watchdog (~1MB) | 按需重建,无常驻监听 | ~1MB |
安装体积 < 30MB,核心代码 ~1600 行。
设计要点
无 reranker:Wiki 编译期已做整合/交叉引用/矛盾标注,检索对象是预蒸馏结构,"Wiki 即 reranker"
链接扩展检索:BM25/向量找入口页 → 沿
[[双向链接]]图遍历扩 N 跳,比纯语义召回更准、更可解释自实现 BM25:纯 Python ~80 行,内置中文分词 fallback,无外部依赖
Ingest 编译循环:1 份原始素材 → LLM 提取概念 → 自动创建/更新 3-15 个互联 Wiki 页
接入 MCP Agent
{
"mcpServers": {
"llm-wiki": {
"command": "llm-wiki-server",
"env": {
"OPENAI_API_KEY": "sk-...",
"OPENAI_BASE_URL": "https://api.deepseek.com"
}
}
}
}许可证
MIT
Available Tools
5 toolsingestA
编译一份原始素材为 Wiki 页(提取概念/建链/标矛盾)。
| Name | Required | Description | Default |
|---|---|---|---|
| raw_path | Yes | raw 素材文件路径,如 "data/raw/sample_notes.md" |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the main behaviors (extract concepts, build links, mark contradictions) and implies the side effect of creating a Wiki page, but it does not mention overwrite behavior, reversibility, or other side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the core behavior efficiently. It avoids fluff and includes a parenthetical that adds key detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The presence of an output schema likely covers return values, and the one-parameter schema is simple. However, the description does not explain integration with sibling tools, such as whether ingest already updates the wiki index or whether rebuild_index must be called separately.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage for the single parameter raw_path, which already includes a description and example. The tool description adds marginal value by linking 'raw material' to the parameter, but does not provide substantive additional semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool compiles a raw material into a Wiki page, with specific processing actions: extracting concepts, creating links, and marking contradictions. This differentiates it from sibling tools like write_wiki, read_wiki, and rebuild_index.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for raw materials that need to be converted into Wiki pages, but it does not explicitly state when to use this tool versus alternatives like write_wiki. No prerequisites or exclusions are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
queryA
混合检索 + 链接扩展,返回相关 Wiki 片段。
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | 用户的问题 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It mentions the hybrid retrieval method and the return of Wiki snippets, but does not explicitly state whether the operation is read-only or what 'link expansion' entails in terms of side effects. More detail would improve transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence in Chinese that front-loads the action and result. Every word adds value, with no filler or repetition, making it both compact and informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and an output schema, the description provides sufficient context: it explains what the tool does (hybrid retrieval + link expansion) and what it returns (Wiki snippets). It could be more complete by elaborating on 'link expansion' and potential prerequisites, but the current level is adequate for basic usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single 'question' parameter, so the baseline is 3. The tool description adds minimal extra meaning about the parameter beyond indicating it is the input for the retrieval process. It does not clarify format, length, or any constraints beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs hybrid retrieval and link expansion, returning relevant Wiki snippets. This is a specific action (retrieval) targeting a specific resource (Wiki snippets), and the inclusion of 'hybrid' and 'link expansion' differentiates it from sibling tools like read_wiki or write_wiki.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for searching Wiki content based on a user's question, but it does not explicitly state when to use it instead of alternatives like read_wiki or ingest. No exclusions or alternative references are provided, leaving usage guidance to be inferred from the name and purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_wikiA
读取一个 Wiki 页全文(含 frontmatter)。
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | 页面标题(空格自动转下划线) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that the tool returns full text including frontmatter, which is useful behavioral detail, but does not mention error handling, output format, or side effects. Reading inherently implies non-destructive behavior, but this is not explicitly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, directly states the action and scope, and contains no redundant information. It is both concise and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read tool with an output schema, the description sufficiently conveys the scope of the operation. It includes the important detail about frontmatter, and the output schema presumably covers return structure. Slight lack of usage guidance and error behavior, but these are not critical for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of parameters with a clear description of the 'page' parameter, including automatic underscore conversion. The tool description adds no additional meaning beyond the schema, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads a full Wiki page including frontmatter, with a specific verb and resource. It distinguishes itself from siblings like write_wiki, query, rebuild_index, and ingest.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose of reading a page is implied when full content is needed, but no explicit guidance is given about when to use this tool versus query for searching or write_wiki for editing. No alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rebuild_indexA
全量重建向量 + BM25 索引(从现有 Wiki 页)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavior. It mentions 'full rebuild', indicating a destructive/recreating action, and specifies the source from existing pages. However, it does not disclose side effects such as search unavailability during rebuild, required permissions, or whether the operation is reversible/concurrent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, compact sentence that front-loads the verb and resource, with no wasted words. It captures the essential information efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a zero-parameter tool with an output schema, the description adequately covers what the tool does and its source. It lacks explicit guidance on when to run it relative to other tools, but the description is sufficient for a simple invocation action.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the description does not need to explain parameter meanings. The baseline of 4 applies, and the description adds no extraneous param-related noise.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: to fully rebuild both vector and BM25 indexes from existing Wiki pages. The verb 'rebuild' is specific, and it names the resource ('index') and source ('existing Wiki pages'), distinguishing it from siblings like 'ingest' or 'query'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use after content changes ('from existing Wiki pages') but does not explicitly say when to use it versus alternatives like 'ingest' or whether it is needed after every write. No exclusions or alternative recommendations are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_wikiA
新建一个 Wiki 页(自动生成 frontmatter)。
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Markdown 正文 | |
| tags | No | 逗号分隔的标签 | |
| title | Yes | 页面标题 | |
| page_type | No | 页面类型(concept/entity/summary/index/contradiction) | concept |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral disclosure. It mentions auto-generating frontmatter but fails to reveal important behaviors such as overwrite semantics, what happens if a page already exists, or whether the index is rebuilt. This is a significant gap for a write operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that immediately communicates the tool's purpose. It is appropriately sized and front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a simple create operation with a relatively small parameter set and an output schema. The description covers the essential purpose and a key behavioral detail (frontmatter generation). While it could mention overwrite behavior, the low complexity and rich schema make this generally sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so every parameter (title, body, tags, page_type) is already documented. The description does not add any parameter-specific meaning beyond what the schema provides, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '新建一个 Wiki 页(自动生成 frontmatter)' clearly states the action (create) and resource (Wiki page), with a specific detail about frontmatter generation. It distinguishes from siblings like query and read_wiki which are read operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied by the tool name and the nature of the write operation, but there is no explicit guidance about when to use this vs alternatives like read_wiki or ingest. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct operation: query for retrieval, write_wiki for creating pages, read_wiki for reading pages, rebuild_index for indexing maintenance, and ingest for processing raw material into wiki pages. There is minimal overlap, and descriptions clarify any potential confusion.
The naming pattern is mixed: two tools use verb_noun style (write_wiki, read_wiki), one uses verb_noun but for a different object (rebuild_index), while two tools are single-word verbs (query, ingest). This inconsistency makes the set less predictable, though still readable.
With 5 tools, the set is well-scoped for a wiki server, covering creation, reading, searching, indexing, and ingestion. It is neither too thin nor too heavy, and each tool serves a clear purpose.
The set covers create, read, query, index rebuild, and ingestion, but notably lacks update and delete operations for wiki pages. This creates a gap in the typical CRUD lifecycle, which agents may need to work around.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Self-hosted AI-native knowledge workspace with hybrid search, GraphRAG, and MCP.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal MCP server for indexing personal knowledge into SQLite with hybrid search, chunk-level citations, memory tools, and agent orchestration.4MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for persistent, compounding markdown wikis maintained by LLMs. Enables incremental knowledge base building with interlinked pages, search, and raw source management.331MIT
- AlicenseAqualityAmaintenanceMCP server for managing a local, domain-agnostic knowledge base using Markdown notes with frontmatter. Enables AI agents to capture, read, search, link, and maintain notes with atomic writes and privacy controls.13MIT
- 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/COOLFEATHER/LLMwiki_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server