Second brain for Claude Code & OpenCode: distills how your patterns and knowledge evolve over time.
Witness MCP server exists for a simple reason — assistants are far more useful when they can act on Witness directly instead of describing what you should do. Second brain for Claude Code & OpenCode: distills how your patterns and knowledge evolve over time.
A Claude Code / OpenCode plugin that quietly keeps a person-centric archive of how you grow and change as you work — your thinking, workstyle, habits, the cognitive traps you fall into and climb out of, and how all of it shifts over time. Not a record of what your code did (other tools do project memory) — a record of who you are becoming.
Installation goes through your MCP client rather than a global install: point it at @witness-ai/opencode on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Once Witness is connected, these are the calls the assistant has available:
Lenses — The Lenses tool exposed by this serverWindows — Windows uses a self-contained zip instead of the shell installer (there is no guaranteed shell to run the hook shim). DownloadYou will need one environment variable: WITNESS_MODEL_BASE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Among the knowledge and memory options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Witness's toolset — Lenses, Windows — is a fair guide to whether it matches your workflow. It is maintained by IngTian; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| Lenses | The Lenses tool exposed by this server. |
| Windows | Windows uses a self-contained zip instead of the shell installer (there is no guaranteed shell to run the hook shim). Download witness-windows-amd64.zip (Intel/AMD) or witness-windows-arm64.zip from the releases page — e |
{
"mcpServers": {
"witness": {
"command": "npx",
"args": ["-y", "@witness-ai/opencode"],
"env": {
"WITNESS_MODEL_BASE_URL": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| WITNESS_MODEL_BASE_URL | Endpoint or connection string the server talks to. | Yes |
A knowledge graph your assistant keeps between sessions — entities, relations and observations that persist.
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Your workspace, on speaking terms with AI — search, read and write Notion pages and databases.
A structured scratchpad for hard problems — stepwise reasoning with revisions, branches and visible logic.
Symbol-level code navigation, refactoring and memory for coding agents — the IDE brain your assistant has been missing.
Chat with your second brain — search, read and write vault notes through the Local REST API.