diff
Check for drift between approved lockfile and live server
Synopsis
mcptrust diff -- <command> [flags]Connects to the live server and compares its current tools against mcp-lock.json.
Flags
| Flag | Default | Description |
|---|---|---|
-h, --help | help for diff | |
-l, --lockfile | "mcp-lock.json" | Path to the lockfile |
-t, --timeout | 10s | Timeout for MCP operations |
Exit Codes
0: No drift (Server matches lockfile exactly).1: Drift detected (Tools added, removed, or changed).2: Usage error (e.g., missing artifacts).
Output
The output uses colored diffs to highlight changes:
tools:
filesystem:
read_file: (unchanged)
- write_file: (removed)
+ write_file_v2: (added)Examples
Checking a local server:
mcptrust diff -- "npx -y @modelcontextprotocol/server-filesystem /tmp"