xtarwall-watch
Inspects local git repositories for staged, unstaged and untracked changes against HEAD or a merge-base, and maps changed paths to configured security candidates for assessment.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
XWatch
XWatch is an open-source security check for coding agents. Before you push or deploy, it looks at what changed in your local git repo, works out which of your declared security candidates the change reaches, assesses them and returns findings your agent can act on. It runs on your own laptop or CI, inside your coding agent as an MCP server (stdio) or as an A2A agent (loopback HTTP), with your own AI key. Nothing is hosted.
npm:
@xtarwall/xwatch(commandxwatch;xtarwall-watchis kept as an alias)
Install
Requirements: Node.js 22.6 or newer and git 2.40 or newer.
npx -y @xtarwall/xwatch mcp # run it without installing
npm install -g @xtarwall/xwatch # or install the `xwatch` command
xwatch --helpOr use the one-line installer shown at https://xtarwall.com/watch/.
From a clone of this repository: run npm install once, then node --experimental-strip-types bin/dh.ts mcp
(TypeScript runs through Node's type stripping). npm run build writes the compiled JavaScript to dist/.
Related MCP server: secretscan-mcp
Add it to your coding agent
Every agent runs the same command, xwatch mcp (or npx -y @xtarwall/xwatch mcp without a global install).
DH_MCP_ALLOWED_ROOTS limits which folders may be scanned; set it to where your code lives.
Claude Code:
claude mcp add xwatch --scope user -e DH_MCP_ALLOWED_ROOTS="$HOME/code" -- npx -y @xtarwall/xwatch mcpCodex:
codex mcp add xwatch --env DH_MCP_ALLOWED_ROOTS="$HOME/code" -- npx -y @xtarwall/xwatch mcpCursor (~/.cursor/mcp.json, or .cursor/mcp.json in a project), and any other MCP client that takes a JSON config:
{
"mcpServers": {
"xwatch": {
"command": "npx",
"args": ["-y", "@xtarwall/xwatch", "mcp"],
"env": { "DH_MCP_ALLOWED_ROOTS": "/path/to/your/code" }
}
}
}Configs written for 0.1.x that run xtarwall-watch mcp keep working: the alias runs the same program.
The four tools
MCP tool | A2A skill | What it does |
|
| Lists staged, unstaged and untracked changes in a local repo (against |
|
| The last scan's findings, redacted: no PoC, no target, no evidence; only a 16-hex-character prefix of the proof digest. |
|
| One finding ( |
|
| Model mode and vendor, which model key variables are set (names only, never a value), the run budget, candidates, grants, whether active tests are allowed, the ledger. |
Findings have four states: Confirmed (a test actually reproduced it, with proof), Suspected, No issue and Not assessed. Only Confirmed is an alert.
Passive by default; active tests need consent per target
Nothing is executed against anything unless all of these hold:
the agent calls
xtarwall_scan_changeswithactive: true;you set
DH_MCP_ACTIVE_CONSENTto exactly the value ofDH_TARGET(your confirmation that written authorization for that one target is signed and the owner has a backup; see CONSENT.md);DH_GRANTSholds a live active scope grant for that target.
Otherwise every grant is capped at passive: the result is Suspected or Not assessed. Active tests run only against the ephemeral copy that your candidate's provisioner names. Tool arguments can narrow a scan but cannot grant scope: target, grants, candidates and keys come only from the environment you set.
Repo access is confined: repoPath must be an absolute local path in a git work tree (URLs and git@host: remotes
are refused), symlinks that leave the repo are dropped, and DH_MCP_ALLOWED_ROOTS narrows which folders may be
scanned. Git runs without a shell, with hooks, fsmonitor, filters, textconv and global config off, and a timeout.
Your own AI key
XWatch calls the model provider you choose, with your key, from your machine. Supported providers:
Provider | Key variable (or | Model id example |
Anthropic |
|
|
OpenAI |
|
|
Google Gemini |
|
|
Groq |
|
|
XTARWALL_MODEL_CHEAPandXTARWALL_MODEL_FRONTIERpick the model for each tier as[vendor:]model. Left unset, XWatch uses the defaults of the first provider that has a key (Anthropic, OpenAI, Google, then Groq).A paid call also needs
DH_RUN_BUDGET_CENTS(whole cents per run). Without it every paid call is refused before the provider is called, so nothing is spent.Models are priced from a dated table. For a model the table does not know, set
XTARWALL_MODEL_CHEAP_PRICE/XTARWALL_MODEL_FRONTIER_PRICEto"<in $/1M>,<out $/1M>"; without a price an unknown model is refused.A vendor-neutral
DH_MODEL_API_KEY(orXTARWALL_MODEL_KEY_FILE) is used only when every tier names the same vendor, so a key is never sent to another vendor's host. There is no base-URL variable: hosts are fixed.With no key set, every model call goes to an offline mock and costs nothing.
xtarwall_status shows which vendor and models are in use and which key variables are set, never their values.
Environment
Variable | Meaning |
| Absolute path to a module that |
| The scope target your grants name. Shown only as a sha256 prefix. |
| Absolute path to a JSON array of |
| Set to the exact |
| Run budget in whole cents (unset = no paid model call). |
| Ledger ids (defaults |
| Absolute key directory for a persistent ledger signing key. |
| Absolute directory (outside the repo) to also write each run's sealed chain. |
|
|
A .ts module in DH_CANDIDATES is loaded by your own Node, so it needs a Node that strips types for files outside
node_modules (22.18+ or 23.6+ by default); a .js or .mjs module works everywhere.
Command line and CI
xwatch mcp # stdio MCP server (what coding agents run)
xwatch a2a serve [--host h] [--port p] [--allow-remote] # A2A 1.0 agentAs an A2A agent, for another agent or a CI job:
DH_A2A_TOKEN_SHA256_FILE=~/.xtarwall/a2a.sha256 xwatch a2a serve --port 8787The Agent Card is at GET /.well-known/agent-card.json; JSON-RPC 2.0 is at POST /a2a/v1 with a bearer token whose
sha256 is in that file. It binds to loopback unless you pass --allow-remote. Clients send A2A-Version: 1.0.
In CI, start it in the job, call scan_changes on the checked-out repo, and fail the job on a Confirmed finding.
The package also ships SARIF 2.1.0 and pull-request comment renderers as library modules (dist/engine/src/report/).
This release has no command that writes SARIF or posts a PR comment for you; a CI script can import them.
Signed record
Every scan seals start and finish events (plus each assessment's own events) onto an Ed25519 hash-chained ledger and verifies the chain before answering.
Tests
npm testHosted plans
XWatch is free and open source. XGuard and XShield are the hosted, paid plans: https://xtarwall.com/pricing/.
Security and licence
Report a vulnerability in XWatch privately as described in SECURITY.md. Use XWatch only on systems you own or are authorized to test (CONSENT.md).
XWatch is licensed under the GNU Affero General Public License, version 3 only (AGPL-3.0-only). In plain words:
Free to use and modify. Run it on your laptop, in CI or inside your coding agents, and change it as you like.
Share your changes if you serve them. If you run a modified version as a service for other people (over a network, for example), you must publish your changes under the same licence. The same applies if you hand a modified copy to someone else.
Commercial licences on other terms are available on request: email licensing@xtarwall.com.
LICENSE holds the full, binding text and NOTICE the copyright notice; this summary does not replace them.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Security reviews for coding agents: diffs checked against your org policy and live infrastructure.
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
Security scanning for code, containers and IaC: request scans, read findings, report fixes.
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables scanning diffs or code blobs for leaked secrets, returning a verdict with severity and masked findings, all processed locally with no data sent externally.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to scan a working tree and git history for committed credentials without exposing raw secrets, returning redacted findings and provider-specific rotation, misuse-check, and clean-up guidance.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to inspect git working trees and history for exposed credentials without letting raw secrets reach the model, with false-positive filtering, baseline support, and remediation guidance.MIT
- AlicenseNot gradedqualityBmaintenanceLets agents scan local source, public GitHub repositories, or live URLs for security and quality findings, returning compact, false-positive-reduced summaries with locations, evidence, impact, and fixes, plus optional dependency audit and model-based triage.PolyForm Noncommercial 1.0.0