wpa-mcp
wpa-mcp
Local, evidence-driven Windows ETL analysis for MCP clients.
中文 | Latest release | Client compatibility | Contributing
wpa-mcp lets an AI client investigate an ETL trace without loading the entire trace into model context. The server opens the trace locally, applies explicit process, thread, and time scopes, and returns structured evidence in bounded pages.
What it does
Reuses an opened trace through a stable trace reference instead of reopening the ETL for every question.
Analyzes sampled CPU, precise CPU and scheduler activity when the trace contains the required events.
Narrows analysis by process, PID, thread, TID, module, stack, and time window.
Uses
thread_compare_windowsto compare named fast/slow intervals for one exact thread instance without mixing PID/TID reuse.Resolves symbols on demand and reports when missing symbols limit attribution.
Returns capability evidence, warnings, partial failures, and pagination state instead of silently treating missing data as zero.
Keeps high-cardinality stack output compact and supports snapshot-backed pagination for batch CPU and thread-window analysis.
Related MCP server: wpa-mcp
Quick start
1. Install and register in one command (recommended)
PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/tooluse-labs/wpa-mcp/main/scripts/install.ps1) }"Git Bash on Windows:
curl -fsSL https://raw.githubusercontent.com/tooluse-labs/wpa-mcp/main/scripts/install.sh | bashThe installer downloads the latest complete wpa-mcp-win-x64.zip bundle to %USERPROFILE%\.local, verifies that the executable is usable, and registers its absolute path with every detected Codex, Claude Code, and Claude Desktop installation. The bundle is self-contained; no .NET runtime or SDK is required.
Verify the installed executable directly:
& "$HOME\.local\bin\wpa-mcp.exe" --versionRemote scripts should be reviewed before execution. To pin a release or select one client explicitly:
iex "& { $(irm https://raw.githubusercontent.com/tooluse-labs/wpa-mcp/main/scripts/install.ps1) } -Tag '<release-tag>' -Client codex"2. Install manually
Windows x64 users can install the complete ZIP bundle without running a remote script. Keep the bin and native directories together:
$archive = Join-Path $env:TEMP 'wpa-mcp-win-x64.zip'
$install = Join-Path $HOME '.local\share\wpa-mcp'
$bin = Join-Path $install 'bin'
Invoke-WebRequest 'https://github.com/tooluse-labs/wpa-mcp/releases/latest/download/wpa-mcp-win-x64.zip' -OutFile $archive
Expand-Archive -LiteralPath $archive -DestinationPath $install -Force
# Make wpa-mcp available in this PowerShell session.
$env:Path = "$bin;$env:Path"
# Persist the bin directory for new processes and terminals.
$userPath = [Environment]::GetEnvironmentVariable('Path', 'User')
$userEntries = @($userPath -split ';' | Where-Object { $_ })
if ($userEntries -notcontains $bin) {
[Environment]::SetEnvironmentVariable(
'Path', (($userEntries + $bin) -join ';'), 'User')
}
wpa-mcp.exe --versionIf user-level environment changes are restricted by policy, omit the persistent PATH block and use the absolute command & "$install\bin\wpa-mcp.exe". Restart existing terminals and MCP clients after changing the persistent PATH.
The standalone wpa-mcp-win-x64.exe asset is intended for portable smoke checks. Use the ZIP bundle for normal installations because native dependencies and in-place updates require the complete bin plus native layout.
3. Connect an MCP client
Configure the client to launch bin\wpa-mcp.exe over stdio. Use an absolute path. JSON-based clients commonly use this shape:
{
"mcpServers": {
"wpa": {
"command": "C:\\Users\\you\\.local\\share\\wpa-mcp\\bin\\wpa-mcp.exe"
}
}
}Codex, Claude Code, and Claude Desktop use different configuration locations. Follow the exact recipe in Client compatibility.
3. Ask the first question
Open C:\traces\startup.etl. Summarize trace duration and available capabilities,
then show the top CPU processes. Do not resolve symbols yet.Start broad, select the relevant PID or TID, and then request stacks or symbols. This produces better evidence and smaller responses than asking for every stack in one call.
Trace access
By default, load_trace opens any readable local .etl/.etlx path. To confine traces to specific directories, configure one or more roots by repeating --trace-root; each occurrence accepts exactly one value:
"args": ["--trace-root", "C:\\Traces", "--trace-root", "D:\\Captures"]Alternatively set WPAMCP_TRACE_ROOTS (;-separated on Windows). Once any root is configured, only those directories load, and a trace_access_denied error names the rule that rejected the path plus the configured roots. --allow-any-trace-path (or WPAMCP_ALLOW_ANY_TRACE_PATH=true) forces confinement off even when roots are configured. Arguments the server does not recognize fail at startup instead of being ignored.
Update
A bundle installation can update itself to the latest stable GitHub Release:
wpa-mcp.exe updateIf the executable is not on PATH, invoke it by absolute path. The updater accepts only a published, non-draft, non-prerelease release. It verifies GitHub's asset digest, immutable release evidence, the ZIP SHA-256, and the staged executable version before replacing the installed bundle.
Updating does not change MCP client registration. By default, the command exits without downloading or changing files when another process is running the exact installed executable; it reports the blocking PIDs so you can close the associated MCP clients and retry. To explicitly terminate only those exact-path server instances after the new bundle has been verified, use:
wpa-mcp.exe update --stop-runningThis option does not terminate MCP client processes or similarly named executables from other paths, and it never bypasses release verification. Terminated server sessions lose in-memory trace and symbol state. The apply phase runs inside the verified staged wpa-mcp.exe itself and does not depend on PowerShell, execution policy, or shell language mode. The asynchronous replacement result is recorded in .wpa-mcp-update.log under the installation root. Installations created before the executable apply helper must install the latest ZIP bundle once.
Analysis workflow
Open the ETL and inspect duration, processes, and capability evidence.
Select one process, thread, or time interval that matches the observed symptom.
Compare intervals before requesting a large stack expansion.
Resolve symbols only for the selected scope.
Follow
hasMoreand continuation metadata until the required evidence is complete.
Useful prompts:
Compare TID 4120 during 3-8 seconds and 8-13 seconds. Report sampled CPU, wait duration, top stacks, and any evidence the trace cannot provide.For PID 9000, find the hottest CPU functions, excluding ETW self-overhead. Resolve symbols only for the top modules.Explain why this thread is runnable but not running. Separate CPU execution, ready time, and blocked time.Analyze these PIDs in bounded pages. Continue from the returned snapshot instead of restarting the batch.
A wait duration does not by itself identify the blocking method. Reliable attribution depends on scheduler events, stack capture, symbols, and a sufficiently narrow time scope.
thread_compare_windows therefore reports sampled counts, scheduler running time, ready latency, and blocked duration separately; ready latency and blocked duration are not additive.
Capture a useful trace
wpa-mcp can only analyze events that were recorded. Sampled CPU needs profile events and stacks; scheduler delay analysis needs context-switch and ready-thread events; method attribution usually needs resolvable symbols.
See WPR profile guidance for provider choices and capture tradeoffs. The repository includes the focused JitOnlyCapture.wprp profile and the Capture-JitOnly.ps1 helper under tests\WpaMcp.Tests\fixtures.
Do not enable every provider by default. Capture the smallest event set that can answer the performance question, and record markers around the scenario when possible.
Understand results
traceRefidentifies the opened trace used by later calls.scoperecords the process, thread, and time boundaries applied to a result.capabilityEvidencedistinguishes available, absent, and unmeasured trace data.warningsandfailedSectionsexpose partial analysis instead of hiding it.hasMoreand continuation metadata indicate that more bounded pages are available.
Treat unavailable capability evidence as unknown, not as a measured zero. Preserve the trace reference, scope, and symbol context when comparing results.
Troubleshooting
Symptom | Action |
| Reduce PID count, |
Functions remain unresolved | Configure a symbol path and retry only the selected process or modules. See Symbol recipes. |
A slow thread shows little CPU | Inspect ready time and blocked time. CPU samples alone cannot explain scheduler delay. |
A tool reports unavailable data | Read |
| The trace is outside the configured trace roots; the error message lists them. Add roots by repeating |
Update cannot replace the executable | Close MCP clients and any terminal currently running wpa-mcp, then retry the update. |
Results are noisy | Narrow the process, thread, and interval before resolving symbols or expanding stacks. |
ETL files remain on the machine running the MCP server, but tool results are returned to the connected client. Symbol resolution may contact the symbol servers configured on that machine.
Documentation
The README documents the stable user journey. Detailed protocol design, rollout history, measurement baselines, and implementation tasks belong under docs/.
Build from source
Use the SDK selected by global.json:
git clone https://github.com/tooluse-labs/wpa-mcp.git
cd wpa-mcp
dotnet restore --locked-mode
dotnet build WpaMcp.sln -c Release --no-restore
dotnet test WpaMcp.sln -c Release --no-buildSource builds require the configured .NET SDK. Release bundles remain self-contained. See CONTRIBUTING.md before changing contracts or reviewed baselines.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA lightweight Windows-native MCP server providing a consolidated suite of 14 tools for shell execution, file operations, and interactive process management. It optimizes efficiency through batch file operations and smart process handling to minimize context window overhead.164MIT
- Alicense-qualityBmaintenanceAn MCP server that converts Windows WPR .etl performance traces into structured JSON summaries and flamegraph-ready data for LLM analysis. It bridges Windows Performance Analyzer automation with LLM reasoning capabilities for performance troubleshooting.1MIT
- Alicense-qualityCmaintenanceMCP server for remote Windows Crash Dump analysis. Enables AI agents to analyze crash dumps via CDB commands through standard MCP interfaces.2MIT
- AlicenseBqualityDmaintenanceAn MCP server that provides AI assistants with real-time access to Windows internals including processes, kernel traces, event logs, services, drivers, and PE analysis.1878MIT
Related MCP Connectors
Conformance checker for MCP servers. Free, no key, verdicts recomputable and re-measured daily.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Read-only MCP server for wafergraph.com's semiconductor & AI supply-chain data: 30 tools, no auth.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tooluse-labs/wpa-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server