VS Code Extension
April 1, 2026 · View on GitHub
The CodeQL Development MCP Server VS Code extension automates the setup and configuration that the manual installation requires you to do by hand.
Why use the extension?
Manual setup (mcp.json) | VS Code extension |
|---|---|
Edit mcp.json with the correct paths | Registers the MCP server automatically |
Run codeql-development-mcp-server-setup-packs yourself | Installs tool query packs on activation |
Set CODEQL_PATH if CodeQL is not on PATH | Discovers the CodeQL CLI from the CodeQL extension |
| No awareness of CodeQL databases or query history | Discovers databases and query run results from the CodeQL extension |
Installation
From .vsix (GitHub Releases)
Download codeql-development-mcp-server-vX.Y.Z.vsix from the latest
GitHub Release,
then install:
code --install-extension codeql-development-mcp-server-vX.Y.Z.vsix
Or in VS Code: Extensions sidebar → ⋯ menu → Install from VSIX… → select the file.
From VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Search "CodeQL Development MCP Server"
- Click Install
From Source
From the repository root:
npm run package:vsix
code --install-extension extensions/vscode/codeql-development-mcp-server-vX.Y.Z.vsix
The extension requires the CodeQL extension (GitHub.vscode-codeql) and will prompt you to install it if missing.
What it does
On activation the extension:
- Finds the CodeQL CLI — checks
CODEQL_PATH,PATH, and known install locations (including the CodeQL extension's managed CLI). - Installs the MCP server — downloads and caches the
codeql-development-mcp-servernpm package in the extension's global storage. - Installs CodeQL tool query packs — runs
codeql pack installfor each supported language so tools like PrintAST and CallGraph work immediately. - Registers the MCP server — provides a
McpServerDefinitionProviderso VS Code discovers the server without anymcp.jsonedits. - Bridges the CodeQL extension — watches for databases and query results
created by the CodeQL extension and passes their locations to the MCP server
via environment variables:
CODEQL_ADDITIONAL_PACKS— workspace folders and vscode-codeql database storageCODEQL_DATABASES_BASE_DIRS— vscode-codeql database storage directory (enableslist_codeql_databases)CODEQL_QUERY_RUN_RESULTS_DIRS— vscode-codeql query result directories (enableslist_query_run_resultsandprofile_codeql_query_from_logs)CODEQL_MRVA_RUN_RESULTS_DIRS— vscode-codeql variant analysis result directories (enableslist_mrva_run_results)
Settings
| Setting | Default | Description |
|---|---|---|
codeql-mcp.additionalEnv | {} | Extra environment variables for the MCP server process |
codeql-mcp.autoDownloadPacks | true | Download pre-compiled tool query packs matching the detected CodeQL CLI version from GHCR |
codeql-mcp.autoInstall | true | Automatically install/update the MCP server on activation |
codeql-mcp.enableAnnotationTools | true | Enable annotation, audit, query results cache, and SARIF analysis tools. Set to false to disable these opt-in tools |
codeql-mcp.serverCommand | "node" | Command to launch the MCP server (override for local dev) |
codeql-mcp.serverVersion | "latest" | npm version to install ("latest" or a specific version) |
codeql-mcp.watchCodeqlExtension | true | Discover databases and query results from the CodeQL extension |
Commands
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type CodeQL MCP:
- Reinstall MCP Server — re-download the MCP server package
- Reinstall CodeQL Tool Query Packs — re-run
codeql pack installfor all languages - Show Status — display current server and CLI status
How it connects to GitHub Copilot
Once the extension is active, the MCP server appears in Copilot's server list (Command Palette → "GitHub Copilot: List MCP Servers"). All MCP tools, prompts, and resources are available to Copilot automatically — no further configuration needed.