WorkTrace MCP

WorkTrace MCP

A local MCP server that helps AI agents recover missing historical developer context by capturing and indexing screenshots with OCR and embeddings into a local SQLite database, enabling grounded question-answering with inspectable event citations.

Category
访问服务器

README

WorkTrace MCP

WorkTrace is a local MCP server that helps an AI agent recover missing historical developer context from captured work evidence.

It records manual or periodic screenshots, queues them locally, derives a work-oriented summary and OCR through OpenAI, embeds the summary, stores everything in SQLite/FTS5, and returns grounded answers with inspectable event citations.

Desktop capture
    → local pending image + sidecar
    → OpenAI vision summary/OCR
    → summary embedding
    → local SQLite + FTS5
    → WorkTrace MCP (`ask_context`, `get_event`)
    → host agent

Alpha / proof of concept. WorkTrace helps an agent orient itself to prior work. It does not establish current repository state, command success, causality, or developer intent. Inspect live files, Git, processes, and configuration before acting.

Privacy first

This public repository intentionally contains no screenshots, recordings, database, extracted OCR, embeddings, or developer session data.

Runtime evidence is ignored by Git, including:

  • data/ and SQLite files
  • demo_fixture/, captures/, and artifacts/
  • common image, audio, and video formats
  • .env and private-key formats

Important limitation: ingestion sends source screenshot pixels to OpenAI. Prompt-level output redaction does not redact the image before upload. Pause capture, exclude sensitive windows, or add local image redaction before using WorkTrace with private material.

Requirements

  • Python 3.11+
  • An OpenAI API key
  • Windows for the current Tkinter desktop-recorder demo
  • An MCP host such as Hermes Agent

Install

git clone https://github.com/vblearnstowritecode/worktrace-mcp.git
cd worktrace-mcp
python -m venv .venv

Activate the environment:

# Windows PowerShell
.venv\Scripts\Activate.ps1

# Git Bash
source .venv/Scripts/activate

Install:

python -m pip install -e .
copy .env.example .env

Set open_ai_key in .env. Never commit that file.

Record evidence

Launch the desktop recorder:

worktrace-recorder

Or double-click Run WorkTrace Recorder.cmd on Windows.

The current defaults are:

  • capture every 5 minutes
  • ingest every 30 minutes
  • local capture folder: ~/.worktrace/captures/
  • managed artifacts: ~/.worktrace/artifacts/
  • database: ~/.worktrace/worktrace.db

Use Capture Now for an ad-hoc screenshot, optionally add a note, then use Ingest Pending to analyze and index it immediately. Scheduled capture and scheduled ingestion are independent.

Run the MCP server

worktrace-mcp

For stdio clients, configure:

{
  "command": "C:/absolute/path/to/worktrace-mcp/.venv/Scripts/python.exe",
  "args": ["-m", "worktrace.mcp_server"],
  "cwd": "C:/absolute/path/to/worktrace-mcp"
}

With Hermes, run hermes mcp add worktrace and provide the same executable, module arguments, and working directory when prompted. Start a fresh Hermes session after registration so it discovers the tools.

MCP tools

ask_context

Answers one comprehensive historical-context question using hybrid retrieval and grounded synthesis. The server instructs host agents to call it once per user request rather than iterating unnecessarily.

Inputs:

  • question
  • session_id (default: default)
  • max_evidence (1–8)

get_event

Inspects one cited event, including provenance, capture mode, managed artifact path, and SHA-256 integrity status. Host agents are instructed to use it only when provenance or artifact integrity materially matters.

Independent WorkTrace retrieval and live file/Git/process/configuration checks may run in parallel. get_event must wait for citations returned by ask_context.

Architecture boundaries

  • The MCP host launches WorkTrace as a local stdio subprocess.
  • SQLite, retrieval code, pending sidecars, and managed artifacts stay local.
  • Vision, embedding, query-planning, and synthesis requests use OpenAI.
  • WorkTrace owns its constrained planner and grounded synthesis calls; the host agent invokes tools but does not perform WorkTrace retrieval itself.
  • Screenshot/OCR text is treated as untrusted data and never as executable instructions.

Test

python -m unittest discover -s tests -p "test_*.py" -v

The tests use temporary files and deterministic doubles where possible. Live OpenAI calls are not required by the unit suite.

Status

The MVP includes:

  • manual and periodic desktop capture
  • durable local pending sidecars
  • serialized vision/embedding ingestion
  • SQLite storage and synchronized FTS5
  • semantic + keyword + time-filtered retrieval
  • grounded synthesis with citation validation
  • stdio MCP tools
  • explicit provenance and artifact-integrity checks

Deferred production work includes local image redaction, retention controls, crash recovery, multi-monitor support, automatic session detection, and a measured sqlite-vec evaluation.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选