PureAutoCodeQL uses a reproducible Python environment plus pinned MCP dependencies. The supported setup paths are:
- local development:
./scripts/bootstrap.sh - service deployment:
docker compose up --build
Install these host prerequisites first:
- Python 3.13 and
uv - Node.js 18 or newer
- Go (used once to build the pinned MCP-to-LSP bridge)
The bootstrap downloads the repository-pinned complete CodeQL bundle when it
is not already available. The standalone CLI archive is not sufficient because
it omits the Java, Python, and C/C++ QL packs. The download is checked against
the SHA-256 published with the GitHub release. Pass --no-codeql-download only
in managed environments that provide the complete bundle separately.
Then run:
# macOS / Linux
chmod +x scripts/bootstrap.sh
./scripts/bootstrap.sh
# Windows PowerShell
./scripts/bootstrap.ps1The script performs the following idempotent operations:
- installs the locked Python environment;
- installs the pinned filesystem MCP dependency;
- builds and tests the repository's ripgrep MCP server;
- installs
mcp-language-serverat the repository-pinned release; - creates
config/keys.tomlfrom the template when absent; - runs the environment doctor;
- starts all three source language servers and performs a real
diagnosticscall; - starts the packaged CodeQL query LSP and verifies the CLI fallback.
The script never overwrites an existing config/keys.toml.
| Language | Server | Installation |
|---|---|---|
| Python | pyright-langserver |
installed by uv sync |
| Java | Eclipse JDT LS (jdtls) |
brew install jdtls, or use the distribution package for your OS |
| C/C++ | clangd |
Xcode Command Line Tools, LLVM, or the system package manager |
The common mcp-language-server process receives the workspace and exact
language-server executable from PureAutoCodeQL. Set
PURE_AUTO_CODEQL_LSP_MCP to an absolute bridge path only when it is installed
outside PATH.
CodeQL is resolved from PATH by default. For package-manager, CI, or managed
installations where CodeQL is stored elsewhere, set
PURE_AUTO_CODEQL_CODEQL to the absolute codeql/codeql.exe path. The same
resolved executable is used by query LSP diagnostics, CLI validation fallback,
and environment checks.
uv run pure-auto-codeql doctor
uv run python scripts/smoke_source_lsp.py
uv run python -m pure_auto_codeql.tools.smoke_codeql
npm --prefix tools/mcp_ripgrep test
npm --prefix tools/mcp_runtime audit --audit-level=moderatedoctor reports the resolved executable path for CodeQL, the MCP bridge, and
all three language servers. A missing language server produces an explicit
capability downgrade instead of a silent success.
The filesystem MCP package is pinned in
tools/mcp_runtime/package.json and locked by
tools/mcp_runtime/package-lock.json. The bridge release is pinned in
scripts/bootstrap.py. Update either dependency in a dedicated change and run:
npm --prefix tools/mcp_runtime ci
npm --prefix tools/mcp_runtime audit --audit-level=moderate
uv run pytest -qDo not use npm audit fix --force; review and pin compatible transitive fixes.
Before the first Compose start, create the bind-mounted directories as the current user:
mkdir -p projects output config
docker compose up --buildThe services run as a non-root UID/GID. Linux users with a nonstandard account
ID can set PUID and PGID; the defaults are 1000:1000:
PUID="$(id -u)" PGID="$(id -g)" docker compose up --buildTemporary CodeQL packs use an in-container tmpfs, while final run artifacts are
persisted under the host output/ directory.