Skip to content

Repository files navigation

wiki-capture

Passively watches your screen and gives Claude memory of what you've been doing on your Mac.

Status: In Development


What it does

wiki-capture runs silently in the background, taking periodic screenshots and summarizing them with a vision model. It keeps a rolling buffer of your screen activity and exposes it to Claude Desktop via an MCP server — so Claude knows what you've been working on without you having to explain.

Ask Claude "What have I been working on?" and it answers from your actual screen history.

Layer 1 — Rolling buffer: The last 24 hours of activity, automatically included at the start of every Claude conversation.

Layer 2 — Wiki synthesis: Claude periodically synthesizes your activity into a persistent knowledge base. Ask about past projects, decisions, and patterns across weeks or months.

Screen capture → Vision model → Buffer/Wiki → MCP server → Claude Desktop

Setup

Requirements

  • macOS 13+ with Apple Silicon (M1/M2/M3/M4)
  • Python 3.11+
  • Claude Desktop

Install

git clone https://github.com/davidmeyer/wiki-capture.git
cd wiki-capture
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp config.template.yaml config.yaml

Connect to Claude Desktop

Step 1: Install Claude Desktop if not already installed.

Step 2: Register wiki-capture with Claude Desktop:

bash scripts/install_mcp.sh

This writes the MCP server entry into ~/Library/Application Support/Claude/claude_desktop_config.json and attempts to inject a system prompt automatically.

Step 3: Restart Claude Desktop.

Step 4: Add the system prompt (if not auto-injected):

Open Claude Desktop → Settings → Custom Instructions and paste this exactly:

You have access to wiki-capture MCP tools that show what I have been
doing on my Mac. At the start of EVERY conversation call
get_context_for_conversation() silently before responding. Use this
context to give relevant answers without me having to explain my situation.

Step 5: Start the capture loop:

source .venv/bin/activate
python capture/main.py

Step 6: Verify it works — open a new Claude Desktop conversation and ask:

What have I been working on?

Claude should describe your recent screen activity without you explaining anything.

Configuration

Edit config.yaml in the project root to customize:

# How often to capture (seconds) — lower = more context, more CPU
polling_interval_seconds: 20

# Apps to never capture (empty = capture everything)
blocked_apps: []

# How long to keep raw screenshots before deleting (minutes)
# 0 = delete immediately (most private); 60 = ~500MB max disk usage
screenshot_retention_minutes: 60

# How far back Claude can see your activity (hours)
buffer_retention_hours: 24

# How many minutes of context Claude gets automatically at conversation start
context_window_minutes: 30

# Layer 2: wiki synthesis (requires Anthropic API key in .env)
wiki_enabled: false
wiki_synthesis_interval_hours: 6

For wiki synthesis, also create a .env file in the project root:

ANTHROPIC_API_KEY=sk-ant-...

Available MCP Tools

Once connected, Claude has access to:

Tool What it does
get_context_for_conversation Auto-called at start — gives Claude your recent activity
get_recent_context(minutes) Last N minutes of screen activity
get_current_screen Live screenshot of your current screen
get_screenshot(timestamp) Screenshot from a specific moment
search_context(query) Search your recent activity by keyword
get_buffer_stats Coverage stats for your context buffer
search_wiki(query) Search long-term wiki (requires wiki enabled)
get_wiki_page(title) Read a wiki page (requires wiki enabled)

Enable Layer 2: Wiki Synthesis

The wiki builds a persistent knowledge base from your screen activity over time. Claude can answer questions about your history, past decisions, and long-term patterns.

Step 1: Add your Anthropic API key to .env:

ANTHROPIC_API_KEY=sk-ant-...

Step 2: Enable wiki in config.yaml:

wiki_enabled: true
wiki_synthesis_interval_hours: 6

Step 3: Run synthesis manually to seed the wiki:

source .venv/bin/activate
python -c "
import sys, os
sys.path.insert(0, '.')
from dotenv import load_dotenv
load_dotenv()
from wiki.synthesizer import WikiSynthesizer
from buffer.db import BufferDB
from capture.config import Config
s = WikiSynthesizer(BufferDB(), Config())
result = s.run()
print(result)
"

Wiki pages are stored as Markdown at ~/.wiki-capture/wiki/pages/ — readable in Obsidian, VS Code, or any text editor.


How it works

  1. Capture — Screenshots taken at a configurable interval, deduplicated via perceptual hash.
  2. Vision — A vision model reads each frame and extracts a structured text summary.
  3. Buffer — Summaries are stored in a local SQLite database with timestamps.
  4. MCP — An MCP server exposes the buffer and wiki to Claude Desktop as tools.
  5. Claude — Claude queries your buffer and wiki to answer questions about your activity.

License

TBD


Early-stage private project. APIs and file formats may change without notice.

About

Passive screen capture that builds a personal knwoledge wiki. Local, private, Mac-only.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages