Xtarwall
Xtarwall XWatch, free and open source

Install XWatch.

XWatch checks every change on your own machine, or inside your coding agent as an MCP server. One line installs it on macOS or Linux.

macOS and Linux
curl -fsSL https://xtarwall.com/install.sh | sh

Needs Node.js 22.6 or newer. Runs with your own AI key. Free and open source (AGPL-3.0). Windows: use WSL.

The installer downloads XWatch v0.1.0 from GitHub, checks its SHA-256, and installs into ~/.xtarwall. No sudo, no changes to your shell profile. From the .zip: run npm install in the folder, then use node --experimental-strip-types bin/dh.ts mcp as the command below.

Or with npm
npx @xtarwall/xwatch

The npm package is @xtarwall/xwatch. Its commands are xwatch and the alias xtarwall-watch. Install it for good with npm install -g @xtarwall/xwatch.

Connect it to your coding agent

Replace $HOME/code with the folder that holds your repos. XWatch scans repos inside it and nothing else.

Claude Code
claude mcp add xtarwall-watch --scope user -e DH_MCP_ALLOWED_ROOTS="$HOME/code" -- "$HOME/.xtarwall/bin/xtarwall-watch" mcp
Codex
codex mcp add xtarwall-watch --env DH_MCP_ALLOWED_ROOTS="$HOME/code" -- "$HOME/.xtarwall/bin/xtarwall-watch" mcp
Cursor: ~/.cursor/mcp.json
{
  "mcpServers": {
    "xtarwall-watch": {
      "command": "/Users/you/.xtarwall/bin/xtarwall-watch",
      "args": ["mcp"],
      "env": { "DH_MCP_ALLOWED_ROOTS": "/Users/you/code" }
    }
  }
}

For Cursor, use your real home folder in place of /Users/you; the installer prints this block with your path filled in.

Or add it as an MCP server with npx

Claude Code, Codex, Cursor and any other MCP client that takes a JSON config: command npx, args ["-y", "@xtarwall/xwatch", "mcp"]. Nothing to install first.

MCP config (npx)
{
  "mcpServers": {
    "xwatch": {
      "command": "npx",
      "args": ["-y", "@xtarwall/xwatch", "mcp"],
      "env": { "DH_MCP_ALLOWED_ROOTS": "/path/to/your/code" }
    }
  }
}

What a scan does

XWatch gives your coding agent four MCP tools. None of them writes to your repo, and output stays small: paths, ids and short text, capped at 50 items.

ToolWhat it returns
xtarwall_scan_changesLists staged, unstaged and untracked changes in a local git repo, against HEAD or the merge-base of a base ref. Finds which configured candidates the change reaches, assesses them and returns findings in four states, with the result of the signed-ledger check.
xtarwall_get_findingsThe last scan's findings in this session, redacted as for an untrusted reader: no proof-of-concept, no target, no evidence, and the leading 16 hex characters of the SHA-256 proof digest.
xtarwall_explain_findingOne finding: what its state means, the CWE and what to do next.
xtarwall_statusModel mode, whether a model key variable is set (names, never a value), the run budget, candidates, grants, whether active tests are allowed, and the ledger.

Passive by default

Nothing is executed against anything unless all three of these hold:

  1. the agent calls xtarwall_scan_changes with active: true;
  2. you have set DH_MCP_ACTIVE_CONSENT to exactly the value of DH_TARGET, your confirmation that formal authorisation for that target is signed and its owner has a backup;
  3. DH_GRANTS holds a live active scope grant for that target.

Otherwise every grant is capped at passive and the capability gate refuses to execute. The result is Suspected, never an alert, or Not assessed when there is no grant at all. Active tests run against an ephemeral copy, and a production-looking target is refused. Tool arguments can narrow a scan and cannot grant scope: the target, grants, candidates and keys come from the environment you set when you add the server. The scope gate

What it will not do

  • Open a port. XWatch speaks MCP over stdio: no network listener, nothing hosted.
  • Scan a remote. The repo path must be an absolute local path inside a git work tree. URLs and git@host: addresses are refused. Symlinks are resolved, and a path that resolves outside the repo root is refused or dropped.
  • Let a repo run code through git. Git runs without a shell, with hooks and fsmonitor off, no system or global config, the repo's .gitattributes ignored, external diff and textconv off, a 15-second timeout and a minimal environment that does not carry your model keys. A repo whose own git config sets keys that can run a program is refused before any diff runs. Git 2.40 or newer is required; an older git fails closed.
  • Leak detail through errors. An internal error reaches the agent as a code and a fixed sentence. The full message goes to the server's stderr.

Signed record

Every scan seals its start, its finish and each assessment's events onto an Ed25519 hash-chained ledger, and verifies the chain before answering. With DH_KEY_DIR the signing key persists; without it the key lives for the server process. DH_MCP_LEDGER_DIR also writes each run's sealed chain and public key to a file with mode 0600. How the ledger verifies

Limits in v0.1.0

  • Candidates are yours to declare. Without DH_CANDIDATES a scan is a change summary.
  • Model calls are budgeted. With no model key set, every model call goes to an offline mock and costs nothing. A paid call also needs DH_RUN_BUDGET_CENTS; without it every paid call is refused. A malformed budget, model name or key file stops the server at start.
  • Findings live in the server process, for one session. The ledger file is the durable copy.
  • The repo-config refusal is a deny list. A git config key added in a future git release that can run a program would need adding to it.
  • One runtime dependency: the MCP SDK, pinned to an exact version.

Environment

VariableMeaning
DH_MCP_ALLOWED_ROOTSAbsolute folders, joined by :, that may be scanned.
DH_CANDIDATESAbsolute path to a module whose default export is your candidate list. Needs DH_TARGET.
DH_TARGETThe scope target your grants name. Shown as a SHA-256 prefix, never in full.
DH_GRANTSAbsolute path to a JSON array of scope grants: organisation, target, tier and expiry.
DH_MCP_ACTIVE_CONSENTSet to the exact DH_TARGET to allow active tests on it.
DH_RUN_BUDGET_CENTSRun budget in whole cents. Unset means no paid model call.
DH_KEY_DIRAbsolute path of a key directory, for a persistent ledger key.
DH_MCP_LEDGER_DIRAbsolute path, outside the repo, to also write each run's sealed chain.
DH_ORG_ID, DH_APPLICATION_IDLedger ids. Defaults: local and local-repo.

View the source on GitHub · Hosted plans