wiki-loop-mcp
MCP server that provides tools to add to, search, and manage a wiki knowledge base, enabling AI chat tools to contribute and retrieve information from the wiki via natural language prompts.
README
Prometheus Wiki Loop
Three small tools that turn any AI coding session — Claude Code, OpenCode, Codex, Claude Desktop, Kimi Desktop, Mavis/MiniMax Desktop, or a bare shell — into a contribution to a shared, human-readable, version-controlled knowledge base.
The Karpathy pattern, in shell. Plain markdown wiki, LLM-compiled, TF-IDF searchable, no vector database. Every session closes by writing what was learned into the wiki. The next session opens with the wiki already primed.
What's in the box
| File | What it does | When it runs |
|---|---|---|
bin/kbd-close |
Universal session-close hook. Reads a summary (file, stdin JSON, or fallback), enriches it with active KBD phase context, calls pk ingest to compile into the wiki via the openai-proxy, appends a learning-log JSONL entry, files a skill-update candidate. Always exits 0. |
End of every session (Stop hook, PreCompact hook, notify, or manual) |
bin/kbd-open |
Session-prime companion. Detects active KBD phase from .kbd-orchestrator/current-waypoint.json, reads position reminder + phase goals, runs pk focus on the phase, surfaces pending skill-update candidates + today's learning log. Writes a snapshot to ~/.prometheus/last-open-snapshot.txt. |
Start of every session (SessionStart hook, or manual) |
bin/wiki-loop-mcp |
Zero-dependency Node stdio MCP server. Exposes 7 tools (add_to_wiki, prime_context, search_wiki, focus_wiki, list_recent_learnings, list_wiki_entries, list_pending_skill_updates) so any MCP-capable chat tool can contribute to the wiki by natural-language prompt. |
Whenever the chat tool calls a tool |
All three scripts:
- Are MIT licensed, < 500 lines each, zero non-stdlib dependencies
- Source
~/.prometheus/.envautomatically so the LLM endpoint (openai-proxy, OpenAI, Anthropic, Groq, etc.) is configurable per environment - Always exit 0 — a hook failure never breaks the calling tool
Install
# 1. Install the wrappers to ~/.local/bin (must be on PATH)
./scripts/install.sh
# 2. Seed the env file with your LLM endpoint
cat > ~/.prometheus/.env <<'EOF'
CLOUD_LLM_URL=https://api.openai.com/v1 # or http://localhost:8181/v1 for openai-proxy
LOCAL_LLM_URL=https://api.openai.com/v1
CLOUD_LLM_API_KEY=sk-...
PK_COMPILE_MODEL=gpt-4o-mini
PK_LINT_MODEL=gpt-4o-mini
PK_FOCUS_MODEL=gpt-4o-mini
EOF
# 3. Make sure pk is installed (from the prometheus-knowledge crate)
# and the prometheus-knowledge MCP server is running on port 8942.
# See: https://github.com/Prometheus-AGS/prometheus-knowledge
# 4. (Optional) Register the MCP server in your chat tool
# Claude Desktop, Mavis/MiniMax, Kimi Code CLI, Codex:
{
"mcpServers": {
"wiki-loop": {
"command": "/Users/gqadonis/.local/bin/wiki-loop-mcp"
}
}
}
That's it. From this point:
- Every Claude Code session begins with
last-open-snapshot.txtshowing your active KBD phase + focused wiki hits + pending skill-updates - Every Claude Code session ends (or compacts) with the work written into the wiki
- Codex, OpenCode, Kimi Code, Mavis/MiniMax Desktop — same wiki, different trigger surface
- Chat surfaces (Claude Desktop, Kimi Desktop chat, Codex chat) — say "save this conversation to the wiki" and the agent calls
add_to_wikiautomatically
The full architecture
┌──────────────────────────────────────────────────────────────────┐
│ AI Tools (any of these) │
│ │
│ Claude Code Codex OpenCode Kimi Code │
│ ↓ ↓ ↓ ↓ │
│ Stop/PreCompact notify plugin /kbd-close skill │
│ ↓ ↓ ↓ ↓ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ ~/.local/bin/kbd-close (universal) │ │
│ └──────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ Detect KBD phase + enrich + pk ingest + log │ │
│ └──────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ ~/.prometheus/knowledge/shared/wiki/*.md │ │
│ │ ~/.prometheus/learning-log/YYYY-MM-DD.jsonl │ │
│ │ ~/.prometheus/skill-updates/ │ │
│ └──────────────────────────────────────────────────┘ │
│ │
│ Chat surfaces (Claude Desktop, Kimi Desktop, Codex chat) │
│ ↓ "save this to the wiki" │
│ ┌──────────────────────────────────────────────────┐ │
│ │ ~/.local/bin/wiki-loop-mcp (MCP server) │ │
│ │ 7 tools: add_to_wiki, prime_context, ... │ │
│ └──────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
What it depends on
- bash (for kbd-close / kbd-open)
- node ≥ 18 (for wiki-loop-mcp, zero deps)
- python3 (for the JSON extraction helpers in kbd-close)
- pk CLI (from prometheus-knowledge) — compiled to
~/.prometheus/bin/pkor on PATH - prometheus-knowledge MCP server running on
:8942(or override withPK_BINenv var) - An LLM endpoint reachable by the chosen
CLOUD_LLM_URL(default: OpenAI; works equally with the local openai-proxy on:8181or any OpenAI-compatible service)
The related projects
This toolkit is one piece of the Prometheus Fabric, an open-source multi-repository platform for sovereign agentic AI built on BossFang (librefang). Related crates:
prometheus-knowledge— the RustpkCLI andpk-cherryMCP server this toolkit callssurreal-memory-server— the optional graph-memory + TaskStreams backendprometheus-skill-pack— the 280+ skill manifests and 4-layer PMPO pipeline that uses this toolkit for cross-session compoundingprometheus-entity-management— the React entity graph that consumes the wiki as a knowledge plane
License
MIT — see LICENSE.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。