wiki-loop-mcp

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.

Category
Visit Server

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/.env automatically 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.txt showing 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_wiki automatically

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/pk or on PATH
  • prometheus-knowledge MCP server running on :8942 (or override with PK_BIN env var)
  • An LLM endpoint reachable by the chosen CLOUD_LLM_URL (default: OpenAI; works equally with the local openai-proxy on :8181 or 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:

License

MIT — see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured