Labsco
MCP SERVER

TokenKnows

by johnnywuj81

Captures your AI coding sessions and distills them into weekly reports, ADRs, incident reviews and a knowledge graph — every paragraph traced back to the PR or conversation it came from.

LLM Evaluation & Observability
Summary
Zero cloud egress by default, and citations that go back to the source.

Two design choices carry this. First, evidence: the pipeline ranks citations across at least two distinct sources, so a paragraph in a weekly report points at the PR or conversation behind it rather than being a summary of a summary. Second, egress: cloud LLM calls require the instance, project and task switches all on, and paired with Ollama the whole pipeline runs with no cloud keys at all. Most of the deep documentation is in Chinese, which is the project's working language.

What it is

A local-first system that watches where your AI pair-programming actually happens — Claude Code, Codex, Cursor, VS Code, GitHub PRs and commits, local docs — and turns those events into structured documents. Its MCP server is how an assistant submits events and pulls the resulting assets back.

What you get
  • A path for the assistant to push session events into the store and trigger distillation — `submit_session_events`, `distill_document`
  • Retrieval of the produced assets: list them, open one, and walk a long-form document chapter by chapter — `list_assets`, `get_asset`, `get_asset_chapters`
  • Entity lookup across the knowledge graph built from those sessions — `search_entity`
  • Slash commands alongside the tools, including `/tokenknows:weekly` and `/tokenknows:adr`
  • Seven asset types out of the pipeline: weekly reports, tech designs, ADRs, incident reviews, long-form books, reusable agent skills, and the entity graph
Requirements

The backend running at http://localhost:8001 and the web UI at http://localhost:5173, plus uv — the plugin pulls the MCP server from PyPI via `uvx`. All plugin environment variables have working local defaults; set `TOKENKNOWS_API_BASE`, `TOKENKNOWS_API_TOKEN`, `TOKENKNOWS_DEFAULT_PROJECT` or `TOKENKNOWS_WEB_BASE` only for non-default setups, and create an API token in the web UI if your backend requires auth. macOS gets the full experience with collectors auto-starting under launchd; on Linux backend, frontend and collectors are all run manually; Windows is untested, with WSL2 recommended.

Setup effort

Build from source — clone the repository and build it