Listed from the MCP registry; nobody on Odel publishes it.
Measure Wine and macOS GPU use on Apple silicon (Metal System Trace) and Windows (PresentMon)
Runs on your machine from its package; the steps are below.

Not assessed yet.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
uvx metal-gpu-trace
MCP client config
{
"mcpServers": {
"metal-gpu-trace": {
"command": "uvx",
"args": [
"metal-gpu-trace"
]
}
}
}metal-gpu-trace measures how hard a program works the graphics chip (the GPU) of a Mac with Apple silicon or of a Windows PC (PresentMon), and whether its pictures come out evenly. It is for people who port or test games and apps on a Mac (Windows games under Wine included), and for the AI coding agents that help them.
Real example: a 20-second recording of the drawstress test program ran at 104.5 FPS, and the GPU needed 5.6 ms to draw each picture (see A first result).
Ask your agent to record again after a change, and it says with numbers whether the program got faster, slower or stayed the same. It needs Xcode to record on macOS (on Windows, PresentMon records instead), and it does not fix the program.
Your AI agent calls the metal-gpu-trace server. The server starts Instruments (Apple's profiler, installed with Xcode), which records the program for the seconds you asked. It writes a summary (a JSON file with the numbers) and two small tables, one row per frame and one for memory. The agent reads them back and compares them with other recordings or with a saved reference.

Details for people who change the code: How it works.
xcrun xctrace version: it should print a version.brew install uv (Homebrew is the Mac's usual installer for command-line tools; if brew is not found, install it from brew.sh first).uvx metal-gpu-trace init to set up every AI app it finds at once, or, for Claude Code, paste this in the Terminal (METAL_TRACE_OUT is the folder where recordings are saved): claude mcp add --scope user metal-trace -e METAL_TRACE_OUT=$HOME/perf-runs -- uvx metal-gpu-trace. For other AI apps see MCP server.-e METAL_TRACE_WINE=/path/to/wine to the command of step 3 (see Install).Already installed? Using it walks through five typical jobs. Not sure what to read? Where to start says what to read if you are a user, an AI agent or a contributor.
KEEP_TRACE=1. The tables the summary read stay in <run>.tables.sqlite, which trace_query can filter without the .trace (PERF_TABLES=0 skips it).A trimmed summary of a real 20-second recording of the drawstress test program in native Metal (the file holds many more fields):
{
"process": {"name": "drawstress", "arguments": "--mtl"},
"duration_s": 20.78,
"gpu": {
"frames": 2034,
"fps_estimate": 104.5,
"frame_gpu_ms": {"mean": 5.564, "p95": 6.16},
"frame_interval_ms": {"p95": 10.017, "max": 22.189}
},
"encoders": {"per_frame": {"p50": 2}},
"gpu_idle": {"idle_share": 0.422}
}
Read it like this: 2 034 frames in 20.8 s. fps_estimate is 104.5: it comes from the median gap between frames, so it can differ from frames divided by seconds (about 98). The GPU needed 5.6 ms per frame on average, and under 6.2 ms for 95 % of them (p95). The longest wait between two frames was 22.2 ms. The program sent 2 encoders per frame (the median, p50), and the GPU sat idle 42 % of the time. One recording says little by itself: compare two, and repeat a run before calling a difference real.
Version 0.33.0. Older versions: changelog.
screenshots_check tells you which screenshots of a run are black, one flat colour, frozen or flickering, so a test that "passed" on a black screen does not fool you. Proofwine_log_census reads a Wine debug log and counts the fixme, err and warn lines by message, and finds the longest silence in the log, where a stalled start shows. ProofMeasures how a Wine or macOS program uses the GPU on an Apple silicon Mac, and how a native Windows program does with PresentMon, from the command line or through an AI coding agent: GPU time per frame, frame pacing, FPS and memory; whether a translation layer splits the work into too many short encoders; .gputrace captures read without Xcode; and Apple's published facts per GPU family. Python 3.9+ standard library; on macOS zsh and Xcode (for xctrace); on Windows PresentMon. MIT license (LICENSE).
Architecture, decisions and guides: docs/README.md. Sending a change: CONTRIBUTING.md.
| File | What it does |
|---|---|
src/metal_gpu_trace/perf_record.sh | Records a program for N seconds and writes <label>_<date>.json plus per-frame and memory CSVs. Deletes the .trace unless KEEP_TRACE=1. |
src/metal_gpu_trace/perf_report.py | Summarizes an existing .trace the same way. |
src/metal_gpu_trace/gputrace_read.py | Reads a Metal .gputrace without Xcode. Call names marked probable are not confirmed. |
src/metal_gpu_trace/data/apple-gpu-families.json | Apple7 to Apple10: chips, what each family adds, limits that differ, with Apple's sources. |
src/metal_gpu_trace/metal_trace_mcp.py | The MCP server over all of the above. |
tests/ | Self-check without Instruments: python3 -I tests/run.py prints ok; pytest tests runs the same tests. |
PERF_OUT=~/perf-runs zsh src/metal_gpu_trace/perf_record.sh game-d3d12 30 /path/to/wine ~/.wine /path/to/game game.exe
PERF_OUT=~/perf-runs zsh src/metal_gpu_trace/perf_record.sh app-metal 30 native - /path/to/app ./app
Arguments: label, seconds, a Wine directory holding bin/wine (or native), the Wine prefix (the folder holding that Wine's fake Windows drive, ~/.wine by default), the working directory, the program and its arguments. Without PERF_OUT, runs go to ./perf-runs. Reading the trace takes about a minute on an M1 Pro (87 s for a 10 s recording). Through the MCP server the call times out after 15 s per recorded second plus 180 (55 with GPU counters), and an overrun recording leaves no files behind. One recording runs at a time; keep other GPU work off the Mac while it records. Under Wine, record for 30 s: Wine's start-up takes part of the recording. Under 100 frames is too short to compare.
Each recording keeps a JSON summary and three CSVs, about 2 MB for 10 s (most of it the Metal memory samples). The .trace is deleted unless KEEP_TRACE=1. PERF_MEMORY=0 skips the Metal memory table, the slowest to read (41 % faster to summarize a 626 MB trace); the summary then has no metal_memory_mib. The MCP tools perf_record and perf_baseline_record offer the same as memory=false. What each setting deletes: Retention.
The server runs with uvx from PyPI, with nothing to clone (brew install uv installs it). Recording also needs Xcode: xcrun --find xctrace must find xctrace, which the Command Line Tools alone do not include (install Xcode from the App Store and point xcode-select at it).
uvx metal-gpu-trace
This is the command each client below runs. Desktop apps do not see Homebrew's PATH: give them the full path that which uvx prints (/opt/homebrew/bin/uvx on Apple silicon). Unpinned, uvx keeps the version it first downloaded, and a --refresh (or a cache clean) moves you to the latest without warning.
Pin the version you have tested: uvx metal-gpu-trace@X.Y.Z (for example uvx metal-gpu-trace@0.29.0), in the command each client runs and in a CI job. The project is still 0.x and ships often: an incompatible change is listed under ### Removed (incompatible) in the changelog, and a recording's summary keeps its old keys, so older .json files stay readable. What counts as the public surface, and when 1.0 comes, is a proposal: ADR-0010.
Environment variables and project files: Configuration.
inituvx metal-gpu-trace init finds the AI apps installed on this Mac or PC (Claude Code, Claude Desktop, Cursor, Codex
CLI) and adds the server to each, with the absolute path of uvx and METAL_TRACE_OUT set to ~/perf-runs, resolved.
uvx metal-gpu-trace init --dry-run # show what it would write, write nothing
uvx metal-gpu-trace init --client cursor --wine /path/to/wine
Options: --client claude-code|claude-desktop|cursor|codex|vscode, --wine DIR (a Wine directory holding
bin/wine; METAL_TRACE_WINE is used when set), --out DIR, --dry-run, --project. An existing JSON config is
merged (your other servers stay) and copied to <file>.bak first; a file that is not valid JSON is refused untouched.
For Codex the block is appended to config.toml when missing, and only shown when [mcp_servers.metal-trace] is
already there. Claude Code is registered with claude mcp add, not by editing its file. VS Code needs --project
(it writes .vscode/mcp.json); --project files hold absolute paths of your machine, so keep them out of git. init is
supported on macOS and Windows; on other systems it says "not supported yet". Restart the app afterwards.
claude mcp add --scope user metal-trace -e METAL_TRACE_OUT=$HOME/perf-runs -e METAL_TRACE_WINE=/path/to/wine \
-- uvx metal-gpu-trace
claude mcp list
claude mcp list shows metal-trace as connected. --scope user makes it available in every project; leave it out to add it to the current project only.
On Windows the server records native programs (src/metal_gpu_trace/perf_record_windows.py): no Wine, no Metal, and METAL_TRACE_WINE is not needed. Frames come from Intel's PresentMon (MIT), installed with presentmon_install, found on PATH, or pointed to with PRESENTMON_EXE. Without it the summary falls back to DWM composition intervals (gpu.source is dwm-composition), which cover the whole desktop and carry no GPU time. With neither source a recording fails; it never invents frames. Details: Windows engine.
winget install --id=astral-sh.uv -e
uvx metal-gpu-trace init
claude mcp list
init writes the server into Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json), Cursor
(%USERPROFILE%\.cursor\mcp.json) and Codex (%USERPROFILE%\.codex\config.toml), and finds uvx.exe on PATH or in
%USERPROFILE%\.local\bin; without uv it names the winget command. In JSON clients use "command": "uvx" (or the
full path where uvx prints) and Windows paths with doubled backslashes. Run the Windows tests with
python -m pytest tests/test_perf_record_windows.py.
These apps do not expand ~ or $HOME: write absolute paths.
{
"mcpServers": {
"metal-trace": {
"command": "/opt/homebrew/bin/uvx",
"args": ["metal-gpu-trace"],
"env": {
"METAL_TRACE_OUT": "/absolute/path/to/perf-runs",
"METAL_TRACE_WINE": "/absolute/path/to/wine"
}
}
}
}
| Client | File |
|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (Settings, Developer, Edit Config); restart the app |
| Cursor | ~/.cursor/mcp.json |
| VS Code | .vscode/mcp.json in the project; the top key is servers, and the server adds "type": "stdio" |
| Codex CLI | ~/.codex/config.toml: a [mcp_servers.metal-trace] table with the same command, args and env |
28 tools in four groups. Your agent picks them; you rarely call one yourself. Every tool also takes an optional fields, a list of dotted paths such as common.frame_pacing.fps_1pct_low: the result keeps only those (on a page, in each row), so the agent reads a few numbers instead of a whole summary. A path that matches nothing is listed in _meta.fields_missing. Each tool's arguments are in Server and transport.
| Group | Tools (what each is for) |
|---|---|
| Record | perf_record (one run and its summary), perf_attach (a program already running), perf_baseline_record (several runs saved as a reference), perf_ab (two environments, which is better), perf_sweep (one run per value of a setting), perf_cold_warm (first start-up against the second, shader-compile hitches) |
| Judge and compare | perf_compare (two recordings, what got faster or slower), perf_check (same, better or regressed against a reference), perf_gate (pass or fail against your limits), perf_baseline (saves equal runs and shows their spread), perf_history (one number across many runs), perf_diagnose (too many tiny GPU pieces, as translation layers cause), perf_memory_breakdown (Metal allocations by type) |
| Dig deeper | perf_export_trace (frames for Perfetto or Chrome), trace_tables, trace_count, trace_query (tables of a kept .trace), capture_summary, capture_diff, capture_records (.gputrace captures), screenshots_check (black, flat, frozen or flickering PNG screenshots), wine_log_census (what a Wine debug log says is missing or wrong) |
| Setup and test programs | project_info (active project), perf_runs (recordings, newest first), gpu_family (Apple's facts per chip), workload_list, workload_fetch (test programs, checked by SHA-256; Claude Code asks first), presentmon_install (Windows only) |
The test programs, their arguments (workload, api, dim, size, example) and the Mac levers are in Test programs. Reading numbers across runs: Reading and comparing.
METAL_TRACE_TOKEN=<secret of 16+ characters> metal-gpu-trace --http [--port N] serves the same tools at POST http://127.0.0.1:8765/mcp, for a client on the same Mac that cannot start a stdio server. It listens on 127.0.0.1 only, needs Authorization: Bearer <token> on every request, and does not start without the token. It speaks both MCP eras: HTTP, and why two: ADR-0002.
metal-gpu-trace check RUN BASELINE [--margin-pct N] runs perf_check without a client and prints one JSON line. Exit code 0: same or improved; 1: regressed; 2: could not be judged (no such run or reference, or under 100 frames). Recording needs Instruments, so the job runs on a self-hosted macOS runner:
jobs:
perf:
runs-on: [self-hosted, macOS, ARM64]
steps:
- run: PERF_OUT=~/perf-runs zsh path/to/metal-gpu-trace/src/metal_gpu_trace/perf_record.sh pr 30 native - . ./app
- run: METAL_TRACE_OUT=~/perf-runs metal-gpu-trace check "$(ls -t ~/perf-runs/pr_*.json | head -1 | xargs basename -s .json)" main-ref
Fixed limits instead of a reference saved on the runner: metal-gpu-trace gate RUN [--budgets FILE] reads metal-gpu-trace.budgets.json from the project ({"version": 1, "budgets": {"fps": {"min": 55}, "gpu_ms_p95": {"max": 12.5}}}) and prints one JSON line with a result per budget, in the file's order. Exit code 0: every number within its limits; 1: one is over its max or under its min; 2: it could not judge (no budgets file or a malformed one, no such run, under 100 frames, a program that stopped presenting, or a budgeted metric the recording cannot measure). The metrics a file may name are fps, fps_1pct_low, gpu_ms_mean, gpu_ms_p95, frame_interval_ms_p95, stutter_rate_pct, hitches and metal_mib_peak.
metal-gpu-trace import-bench FILE.json... reads the result file VegaFlow's bench.ps1 leaves for a Windows run and saves it in the runs folder as a recording, so perf_runs, perf_compare and perf_history list it. Only the frame-time jitter is the same measurement in both tools; FPS, the 1 % low and the hitches use other formulas under the same names, so they stay empty and the imported values keep their own names under vegaflow_bench. Because of that, gate says a metric cannot be measured on an imported run instead of judging it. Importing the same file again prints same.
.trace or a .gputrace is read: Reading traces.docs/README.md (the ADR index)..gputrace command stream follows tmc/gputrace (MIT); no code is copied. The call ids were matched against Xcode's command list on macOS 27.0.1.