Skip to main content
MCP server CX Codex

witness — Claude Code MCP server: what it does, how to install

Records coding sessions or text streams into SQLite, preserving a dated timeline of how facts change without overwriting them.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add witness -- npx -y @witness-ai/opencode
Open on GitHub

What witness does

The server turns coding chats or external NDJSON streams into a dated log of how facts shift over time. Instead of replacing old statements, witness marks past entries with an end date and creates new records linked to the source events. Everything sits in a local SQLite file named witness.db, with summaries exported as Markdown.

Data moves through four stages: untouched raw turns, atomic observations, dated facets, and on-demand narrative profiles. The engine updates the markdown profile only when requested via get_profile or CLI, keeping idle runs cheap. Cached profile queries return immediately, while a full rebuild takes around 13 seconds.

The tool operates in pull mode and never injects text into active prompts on its own. Out of the box, witness only tracks developer habits and thinking patterns. Tracking other domains requires custom lens directories with three configuration files.

What it helps with

  • track changes in personal coding habits across past agent sessions
  • keep a dated record of changing facts without overwriting old history
  • convert NDJSON text streams into structured chronological facets
  • inspect generated developer profiles on demand via the get_profile tool

Example prompts for the agent

  • Read my witness profile and tell me how my coding habits have evolved
  • Call get_profile to check recent observations about my workflow
  • Query the witness timeline to see which past assumptions were closed

How to install witness

Platform CLI

claude mcp add witness -- npx -y @witness-ai/opencode

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about witness

How to install witness in Claude Code?

Run claude mcp add witness -- npx -y @witness-ai/opencode.

What does the witness MCP server do?

It digests conversation turns or external text into SQLite records, tracking how statements evolve over time without deleting previous observations.

Does witness inject notes into prompts automatically?

No, witness uses a pull-only design. It never injects background context into prompt turns; your agent only receives notes when calling get_profile.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor