The extension (build from source)
extensions/vscode-aspex/ in the aspex repository is a small extension that runs aspex scan --json and shows findings in the Problems panel. It works in VS Code, Cursor, Windsurf, and other VS Code-based editors.
What it does:
- Scan on save: when you save an MCP config file, it runs
aspex scanand refreshes diagnostics. - Problems panel: each finding becomes a diagnostic with its severity and rule ID.
- Two commands in the palette (
Cmd+Shift+P):Aspex: Scan MCP ConfigurationandAspex: Scan All MCP Configurations.
Build and install:
cursor --install-extension with the same file.
The extension is deliberately thin: it does not add quick fixes or a report view.
aspex scan --explain and aspex scan --html in the terminal remain the richest way to read a finding.SARIF in the editor
aspex scan writes SARIF 2.1.0, and the SARIF Viewer extension renders it with inline annotations:
aspex.sarif in VS Code. This route needs no Aspex-specific extension and is the same file the CI integration uploads to GitHub code scanning.
Pre-commit hook
aspex-scan --no-exec --fail-on high before each commit and blocks the commit on a HIGH or CRITICAL finding. The hook reads your .aspex.yaml, so accepted risks and severity overrides apply. aspex scan uninstall-hook removes it; git commit --no-verify bypasses it once.