1. Conduid
  2. Security
  3. Codeql Development MCP Server
MCP server · Security

Codeql Development MCP Server

LLM <-- MCP --> CodeQL( AST | CFG | CLI | LSP )

53Fair

Scored 7 hours ago · breakdown

About Codeql Development MCP Server

Codeql Development MCP Server is an MCP server published by advanced-security in the Security category: lLM <-- MCP --> CodeQL( AST | CFG | CLI | LSP ). Conduid read 76 tools from its source: annotation_create, annotation_delete, annotation_get, annotation_list, annotation_search, annotation_update and 70 more. No package is published for it, so it installs from a source checkout.

The repository has 39 stars and 5 forks, and its last commit was on 1 Dec 2026. The latest release is v2.27.2 (8 Oct 2026). It follows v2.27.1 (24 Sep 2026), and the 5 most recent releases go back to v2.26.3 (18 Aug 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include ast, cfg, code-quality, code-security, codeql and copilot-enabled.

Install

From source
git clone https://github.com/advanced-security/codeql-development-mcp-server

Tools (76)

annotation_createCreate a new annotation (note, bookmark, finding) on any entity.
ParameterTypeDescription
category *stringAnnotation category (e.g. "bookmark", "note", "finding", "audit-source").
contentstringFree-text content of the annotation.
entityKey *stringEntity key — a stable identifier for the annotated object (e.g. "repo:owner/name", "file:/path:L10", "query-result:id").
labelstringShort human-readable label.
metadatastringJSON-encoded structured metadata.
annotation_deleteDelete annotations by ID, category, or entity key prefix.
ParameterTypeDescription
categorystringDelete all annotations in a category.
entityKeyPrefixstringDelete annotations matching an entity key prefix.
idnumberDelete a specific annotation by ID.
annotation_getRetrieve a single annotation by its numeric ID.
ParameterTypeDescription
id *numberThe annotation ID (positive integer primary key).
annotation_listList annotations with optional filtering by category, entity key, or entity key prefix.
ParameterTypeDescription
categorystringFilter by annotation category.
entityKeystringFilter by exact entity key.
entityKeyPrefixstringFilter by entity key prefix (e.g. "repo:owner/name").
limitnumberMaximum number of results (default: 100).
offsetnumberNumber of results to skip.
annotation_searchFull-text search across annotation content, metadata, and labels using SQLite FTS (token-based MATCH; use * suffix for prefix matching, e.g. "vulnerab*").
ParameterTypeDescription
categorystringRestrict search to a specific category.
limitnumberMaximum number of results (default: 50).
search *stringFull-text search query matched against annotation content, metadata, and label (SQLite FTS MATCH syntax; use * for prefix matching).
annotation_updateUpdate the content, label, or metadata of an existing annotation.
ParameterTypeDescription
contentstringNew content (replaces existing).
id *numberThe annotation ID to update (positive integer primary key).
labelstringNew label (replaces existing).
metadatastringNew JSON-encoded metadata (replaces existing).
audit_add_notesAppend notes to an existing audit finding. Identify the finding by findingId (preferred) or by owner+repo+sourceLocation+line.
ParameterTypeDescription
findingIdnumberAnnotation ID of the finding (returned by audit_store_findings and audit_list_findings). Preferred lookup method.
linenumberLine number of the finding (required when findingId is not provided).
notes *stringNotes to append.
ownerstringRepository owner (required when findingId is not provided).
repostringRepository name (required when findingId is not provided).
sourceLocationstringFile path of the finding (required when findingId is not provided).
audit_clear_repoDelete all audit findings for a repository.
ParameterTypeDescription
owner *stringRepository owner.
repo *stringRepository name.
audit_list_findingsList all audit findings for a repository, including any analyst notes.
ParameterTypeDescription
limitnumberMaximum number of results (1–1000).
owner *stringRepository owner.
repo *stringRepository name.
audit_store_findingsStore CodeQL analysis findings for a repository. Each finding is persisted as an annotation with category "audit-finding".
ParameterTypeDescription
findingsarrayFile path of the finding.
owner *stringRepository owner.
repo *stringRepository name.
codeql_bqrs_decodeDecode BQRS result files to human-readable formats (text, csv, json). Typical workflow: (1) use list_query_run_results to find BQRS paths from previous codeql_query_run or codeql_database_analyze runs, (2) use codeql_bqrs_info to discover result sets and column schemas, (3) decode specific result sets with this tool. For large result sets, use --rows to paginate.
ParameterTypeDescription
entitiesstringControl entity column display: comma-separated list of url, string, id, all
files *arrayArray of BQRS file paths to decode. Pass an array even for a single file, e.g. ["/path/to/results.bqrs"]
formatstringOutput format: text (human-readable table, default), csv, json (streaming JSON), or bqrs (binary, requires --output)
no-titlesbooleanOmit column titles for text and csv formats
result-setstringDecode a specific result set by name (use codeql_bqrs_info to list available sets). If omitted, all result sets are decoded.
rowsnumberMaximum number of rows to output (for pagination). Use with --start-at for paging.
sort-directionstringSort direction(s): comma-separated "asc" or "desc" per column
sort-keystringSort by column(s): comma-separated column indices (0-based)
start-atnumberByte offset to start decoding from (get from codeql_bqrs_info or previous JSON output "next" pointer). Must be used with --rows.
codeql_bqrs_infoGet metadata about BQRS result files: lists result sets, column names/types, and row counts. Use before codeql_bqrs_decode to discover available result sets (e.g., "#select", "edges", "nodes"). BQRS files are found at <runDir>/results.bqrs — use list_query_run_results to discover them. Use --format=json with --paginate-rows to get byte offsets for paginated decoding with codeql_bqrs_decode --start-at.
ParameterTypeDescription
file *stringBQRS file to examine
formatstringOutput format: text (default) or json. Use json for machine-readable output and pagination offset computation.
paginate-result-setstringCompute pagination offsets only for this result set name
paginate-rowsnumberCompute byte offsets for pagination at intervals of this many rows. Use with --format=json. Offsets can be passed to codeql_bqrs_decode --start-at.
codeql_bqrs_interpretInterpret BQRS result files according to query metadata and generate output in specified formats (CSV, SARIF, graph formats)
ParameterTypeDescription
column-kindstring[SARIF only] Column kind for interpreting location columns
csv-location-formatstring[CSV only] Format for locations in CSV output (default: line-column)
databasestringPath to the CodeQL database. When provided, auto-resolves --source-archive (for file contents/snippets) and --source-location-prefix (from codeql-database.yml metadata) so SARIF results include full source context
dot-location-url-formatstring[DOT only] Format string for file location URLs (placeholders: {path}, {start:line}, {start:column}, {end:line}, {end:column}, {offset}, {length})
file *stringThe BQRS file to interpret
format *stringOutput format: csv (comma-separated), sarif-latest/sarifv2.1.0 (SARIF), graphtext/dgml/dot (graph formats, only for @kind graph queries)
max-pathsnumberMaximum number of paths to produce for each alert with paths (default: 4)
sarif-add-file-contentsboolean[SARIF only] Include full file contents for all files referenced in results
sarif-add-snippetsboolean[SARIF only] Include code snippets for each location with context
sarif-categorystring[SARIF only] Category for this analysis (distinguishes multiple analyses on same code)
sarif-group-rules-by-packboolean[SARIF only] Place rule objects under their QL pack in tool.extensions property
sarif-multicause-markdownboolean[SARIF only] Include multi-cause alerts as Markdown-formatted lists
t *arrayQuery metadata key=value pairs in KEY=VALUE format. At least "kind" and "id" must be specified. Example: ["kind=problem", "id=js/sql-injection"]. Common keys: kind (problem|path-problem|graph|metric|diagnostic), id (query identifier like js/xss)
threadsnumberNumber of threads for computing paths (0 = one per core, -N = leave N cores unused)
unicode-new-linesboolean[SARIF only] Whether unicode newlines (U+2028, U+2029) are considered as newlines
codeql_database_analyzeRun queries or query suites against CodeQL databases. Produces evaluator logs, BQRS results, and optionally SARIF output. Use list_codeql_databases to discover available databases, and register_database to register new ones. After analysis completes, use list_query_run_results to find result artifacts, then codeql_bqrs_info and codeql_bqrs_decode to inspect results.
ParameterTypeDescription
additionalArgsarrayAdditional command-line arguments
cache-at-frontierboolean[Advanced/experimental] Force evaluation and caching of intermediate results useful for future overlay evaluation. Enabled by default when evaluating against an overlay-prepared base that has no overlay yet, so it rarely needs to be set explicitly.
database *stringPath to the CodeQL database
download-locationstringLocation to download missing dependencies
evaluate-as-overlayboolean[Advanced/experimental] Override automatic detection and force queries to be evaluated in overlay mode against an overlay database (one built with --overlay-changes on top of an --overlay-base). Used for diff-informed (incremental) analysis of changed files.
evaluator-logstringPath to save evaluator log. If not provided and logDir is set, defaults to <logDir>/evaluator-log.jsonl
evaluator-log-levelnumberEvaluator log verbosity level (1-5, default 5)
formatstringOutput format for results
logDirstringCustom directory for analysis execution logs (overrides CODEQL_QUERY_LOG_DIR environment variable). If not provided, uses CODEQL_QUERY_LOG_DIR or defaults to .tmp/query-logs/<unique-id>
outputstringOutput file path
queries *stringQueries or query suite to run
ramnumberAmount of RAM to use (MB)
rerunbooleanForce re-evaluation of queries even if BQRS results already exist in the database. Without this, cached results are reused.
threadsnumberNumber of threads to use
timeoutnumberTimeout in seconds
tuple-countingbooleanDisplay tuple counts for each evaluation step in evaluator logs
verbosebooleanEnable verbose output
codeql_database_createCreate a CodeQL database from source code
ParameterTypeDescription
additionalArgsarrayAdditional command-line arguments
build-modestringBuild mode: none (interpreted langs), autobuild, or manual
cache-cleanupstringHow aggressively to trim the evaluation cache: clear, trim (default), fit, or overlay. Use "overlay" when building an overlay base so only data useful for overlay evaluation is retained.
commandstringBuild command for compiled languages
database *stringDatabase path/name to create
extractorEnvarrayExtractor environment variables as "KEY=VALUE" strings injected into the extraction process. Only keys beginning with LGTM_ or CODEQL_EXTRACTOR_ are permitted. Required for some framework databases — e.g. SAP UI5 needs "LGTM_INDEX_XML_MODE=ALL" (and often "LGTM_INDEX_FILTERS=include:**/*.json") to extract XML views. Example: ["LGTM_INDEX_XML_MODE=ALL"].
languagestringProgramming language(s) to extract
no-cleanupbooleanSkip database cleanup after finalization
overlay-baseboolean[Advanced/experimental] Create the database so that it is usable as an overlay base for diff-informed (incremental) analysis. Combine with --cache-cleanup=overlay to retain only the data useful for later overlay evaluation. Pairs with overlay-changes on a subsequent overlay build.
overlay-changesstring[Advanced/experimental] Create the database as an overlay on top of an existing overlay base. Path to a JSON file whose top-level object has a "changes" entry: a list of relative paths of files changed since the overlay base was created (e.g. {"changes":["src/app.js"]}). Only those files are extracted into the overlay.
overwritebooleanOverwrite existing database if it exists
ramnumberAmount of RAM to use (MB)
source-rootstringRoot directory of source code
threadsnumberNumber of threads to use
verbosebooleanEnable verbose output
codeql_generate_log-summaryCreate a summary of a structured JSON evaluator event log file
ParameterTypeDescription
deduplicate-stage-summariesbooleanDeduplicate stage summaries
formatstringOutput format: text (human-readable), predicates (JSON), or overall (stats)
inputLog *stringPath to the evaluator log file to summarize
minify-outputbooleanMinify JSON output
outputFilestringPath to write the summary (optional, defaults to stdout)
utcbooleanForce UTC timestamps
codeql_generate_query-helpGenerate query help documentation from QLDoc comments
ParameterTypeDescription
formatstringOutput format for the help documentation
outputFilestringPath to write the help documentation
query *stringPath to the query file to generate help for
codeql_lsp_completionGet code completions at a cursor position in a CodeQL file. Returns completion items with labels, documentation, and insert text. The file must be a .ql or .qll file. IMPORTANT: Set workspace_uri to the pack or workspace root directory for dependency resolution; without it, completions for imported libraries will be empty.
codeql_lsp_definitionGo to the definition of a CodeQL symbol at a given position. Returns one or more file locations where the symbol is defined. Set workspace_uri to the pack root for dependency resolution.
codeql_lsp_diagnosticsAuthoritative syntax and semantic validation of CodeQL (QL) code via the CodeQL Language Server. Compiles the query and provides real-time diagnostics with precise error locations. Use this for accurate validation; for quick heuristic checks without compilation, use validate_codeql_query instead. Note: inline ql_code is evaluated as a virtual document and cannot resolve pack imports (e.g. `import javascript`). For validating queries with imports, use codeql_query_compile on the actual file instead.
ParameterTypeDescription
log_levelstringLanguage server log level
ql_code *stringThe CodeQL (QL) code to evaluate for syntax and semantic errors
search_pathstringOptional search path for CodeQL libraries
workspace_uristringOptional workspace URI for context (defaults to ./ql directory)
codeql_lsp_document_symbolsList all top-level definitions (classes, predicates, modules) in a CodeQL file. Response contains location and type information unless names_only is set to true.
ParameterTypeDescription
names_onlybooleanIf true, returns only symbol names as a compact string array instead of full symbol objects. Use this when you only need to know what names a file defines.
codeql_lsp_referencesFind all references to a CodeQL symbol at a given position. Returns file locations of all usages, including the declaration. Set workspace_uri to the pack root for dependency resolution.
codeql_pack_installInstall CodeQL pack dependencies
ParameterTypeDescription
forcebooleanForce reinstall of dependencies
no-strict-modebooleanAllow non-strict dependency resolution
packDirstringDirectory containing qlpack.yml (default: current)
codeql_pack_lsList CodeQL packs under some local directory path
ParameterTypeDescription
dirstringThe root directory of the package or workspace, defaults to the current working directory
formatstringOutput format: text (default) or json
groupsstringList of CodeQL pack groups to include or exclude
codeql_query_compileCompile and validate CodeQL queries. By default, produces a .dil file containing the optimized DIL intermediate representation alongside the compilation output.
ParameterTypeDescription
additionalArgsarrayAdditional command-line arguments
databasestringPath to the CodeQL database
dump-dilbooleanPrint the optimized DIL intermediate representation to standard output while compiling. Enabled by default; pass false or --no-dump-dil to disable.
librarystringPath to query library
logDirstringCustom directory for compilation DIL output (overrides CODEQL_QUERY_LOG_DIR environment variable). If not provided, uses CODEQL_QUERY_LOG_DIR or defaults to .tmp/query-logs/<unique-id>
outputstringOutput file path
query *stringPath to the CodeQL query file (.ql)
verbosebooleanEnable verbose output
warningsstringHow to handle compilation warnings
codeql_query_formatAutomatically format CodeQL source code files
ParameterTypeDescription
backupstringBackup extension when overwriting existing files
check-onlybooleanCheck formatting without writing output
files *arrayOne or more .ql or .qll source files to format
in-placebooleanOverwrite each input file with formatted version
no-syntax-errorsbooleanIgnore syntax errors and pretend file is formatted
outputstringWrite formatted code to this file instead of stdout
codeql_query_runExecute a CodeQL query against a database. Use either "query" parameter for direct file path OR "queryName" + "queryLanguage" for pre-defined tool queries. Produces evaluator logs and BQRS results in a log directory. Use list_codeql_databases to discover databases, list_query_run_results to find previous results, and codeql_bqrs_decode to inspect BQRS output.
ParameterTypeDescription
cache-at-frontierboolean[Advanced/experimental] Force evaluation and caching of intermediate results useful for future overlay evaluation against an overlay-prepared base database.
evaluate-as-overlayboolean[Advanced/experimental] Override automatic detection and force the query to be evaluated in overlay mode against an overlay database (one built with --overlay-changes on top of an --overlay-base). Used for diff-informed (incremental) analysis of changed files.
evaluationFunctionstring[DEPRECATED - use format parameter instead] Built-in function for query results evaluation (e.g., "mermaid-graph", "json-decode", "csv-decode") or path to custom evaluation script
evaluationOutputstring[DEPRECATED - use interpretedOutput parameter instead] Output file for evaluation results
evaluator-logstringPath to save evaluator log (deprecated: use logDir instead)
evaluator-log-levelnumberEvaluator log verbosity level (1-5, default 5)
evaluator-log-minifybooleanMinimize evaluator log for smaller size
externalarrayExternal predicate data: predicate=file.csv
formatstringOutput format for query results via codeql bqrs interpret. Defaults to sarif-latest for @kind problem/path-problem queries, graphtext for @kind graph queries. Graph formats (graphtext, dgml, dot) only work with @kind graph queries.
interpretedOutputstringOutput file for interpreted results (e.g., results.sarif, results.txt). If not provided, defaults based on format: .sarif for SARIF, .txt for graphtext/csv, .dgml for dgml, .dot for dot
logDirstringCustom directory for query execution logs (overrides CODEQL_QUERY_LOG_DIR environment variable). If not provided, uses CODEQL_QUERY_LOG_DIR or defaults to .tmp/query-logs/<unique-id>
querystringPath to the CodeQL query file (.ql) - cannot be used with queryName
queryLanguagestringProgramming language for tools queries (e.g., "javascript", "java", "python") - required when using queryName
queryNamestringName of pre-defined query to run (e.g., "PrintAST", "CallGraphFrom", "CallGraphTo") - requires queryLanguage
queryPackstringQuery pack path (defaults to server/ql/<language>/tools/src/ for tool queries)
sourceFilesstringComma-separated list of source file paths for PrintAST queries (e.g., "src/main.js,src/utils.js" or just "main.js")
sourceFunctionstringComma-separated list of source function names for CallGraphFrom queries (e.g., "main,processData")
targetFunctionstringComma-separated list of target function names for CallGraphTo queries (e.g., "helper,validateInput")
tuple-countingbooleanDisplay tuple counts for each evaluation step in evaluator logs
codeql_resolve_databaseResolve database path and validate database structure
ParameterTypeDescription
database *stringDatabase path to resolve
formatstringOutput format for database information
codeql_resolve_filesFind files in a directory tree, filtered by extension and glob patterns. Useful for discovering QL library files, query files, and other CodeQL-related files within packs or workspaces.
ParameterTypeDescription
also-matcharrayAdditional glob filter all results must match
dir *stringThe directory to search for files
excludearrayGlob patterns to exclude
follow-symlinksbooleanFollow symlinks when searching
formatstringOutput format (default: text)
includearrayGlob patterns to include (e.g., ['**/RemoteFlowSource*'])
include-extensionarrayInclude files with given extensions (e.g., ['.qll', '.ql'])
prunearrayGlob patterns for directories to prune from search
codeql_resolve_languagesList installed CodeQL extractor packs
ParameterTypeDescription
additionalArgsarrayAdditional command-line arguments
formatstringOutput format for language information
verbosebooleanEnable verbose output
codeql_resolve_library-pathResolve paths to source code for all libraries used by, or available to, the given CodeQL query or qll file.
ParameterTypeDescription
additionalArgsarrayAdditional command-line arguments
formatstringOutput format for library path information
query *stringPath to a .ql or .qll file for the context to perform resolution for.
verbosebooleanEnable verbose output
codeql_resolve_metadataResolve and return the key-value metadata pairs from a CodeQL query source file.
ParameterTypeDescription
additionalArgsarrayAdditional command-line arguments
formatstringOutput format for metadata information (always JSON, optional for future compatibility)
query *stringQuery file to resolve metadata for
verbosebooleanEnable verbose output
codeql_resolve_packsResolve packs available within a project directory, provided as a search path, and the source roots of those available packs.
ParameterTypeDescription
formatstringOutput format for qlref resolution
search-path *stringThe project root, to search packs available in the project. Typically the ".", or the current working directory.
codeql_resolve_qlrefResolve qlref files to their corresponding query files
ParameterTypeDescription
formatstringOutput format for qlref resolution
qlref *stringPath to the .qlref file to resolve
codeql_resolve_queriesList available CodeQL queries found on the local filesystem
ParameterTypeDescription
additional-packsanyAdditional pack directories to search for CodeQL packs
directorystringDirectory to search for queries
formatstringOutput format for query list
languagestringFilter queries by programming language
codeql_resolve_testsResolve the local filesystem paths of unit tests and/or queries under some base directory
ParameterTypeDescription
formatstringOutput format for test list
testsarrayOne or more tests (.ql, .qlref files, or test directories)
codeql_test_acceptAccept new test results as the expected baseline
ParameterTypeDescription
tests *arrayOne or more tests (.ql, .qlref files, or test directories)
codeql_test_extractExtract test databases for CodeQL query tests
ParameterTypeDescription
languagestringProgramming language for extraction
tests *arrayOne or more test directories or files
codeql_test_runRun CodeQL query tests
ParameterTypeDescription
check-diff-informedboolean[Advanced/experimental] Check the correct filtering of diff-informed queries. Validates that a query opting into diff-informed analysis (via observeDiffInformedIncrementalMode() in its dataflow configuration) reports the locations it claims through getASelectedSourceLocation/getASelectedSinkLocation. Use this to develop and verify diff-informed queries locally.
evaluate-as-overlayboolean[Advanced/experimental] Override automatic detection and force test queries to be evaluated in overlay mode against an overlay-prepared test database. Used when developing overlay/diff-informed analysis.
keep-databasesbooleanKeep test databases after running tests
learnbooleanAccept current output as expected for failing tests
logDirstringCustom directory for test execution logs (overrides CODEQL_QUERY_LOG_DIR environment variable). If not provided, uses CODEQL_QUERY_LOG_DIR or defaults to .tmp/query-logs/<unique-id>
show-extractor-outputbooleanShow output from extractors during test execution
tests *arrayOne or more tests (.ql, .qlref files, or test directories)
create_codeql_queryCreate directory structure and files for a new CodeQL query with tests
ParameterTypeDescription
basePath *stringBase path where src/ and test/ directories will be created
descriptionstringDescription of what the query does
language *stringTarget programming language (e.g., javascript, python, java)
queryIdstringCustom query ID (defaults to language/example/queryname)
queryName *stringName of the query (e.g., MySecurityQuery)
find_class_positionFinds startline, startcol, endline endcol of a class for quickeval
ParameterTypeDescription
file *stringPath to the .ql file to search
name *stringName of the class to find
find_codeql_query_filesFind and track all files and directories related to a CodeQL query, including resolved metadata
ParameterTypeDescription
languagestringProgramming language (optional, will be inferred if not provided)
queryPath *stringPath to the CodeQL query file (.ql)
resolveMetadatabooleanWhether to resolve query metadata (default: true)
find_predicate_positionFinds startline, startcol, endline endcol of a predicate for quickeval
ParameterTypeDescription
file *stringPath to the .ql file to search
name *stringName of the predicate to find
list_codeql_databasesList CodeQL databases discovered in configured base directories (set via CODEQL_DATABASES_BASE_DIRS env var). Returns path, language, CLI version, and creation time for each database. Use the returned database paths with codeql_query_run or codeql_database_analyze to run queries against them.
ParameterTypeDescription
languagestringFilter databases by language (e.g., "javascript", "python")
list_mrva_run_resultsList discovered MRVA (Multi-Repository Variant Analysis) run results (set via CODEQL_MRVA_RUN_RESULTS_DIRS env var). Returns run ID, timestamp, repositories scanned, analysis status, and available artifacts for each run.
ParameterTypeDescription
runIdstringFilter results by run ID (e.g., "20442")
list_query_run_resultsList discovered query run result directories (set via CODEQL_QUERY_RUN_RESULTS_DIRS env var). Returns path, query name, timestamp, language, query file path, and available artifacts (evaluator-log, bqrs, sarif, query.log, summary) for each run. Filter by queryName, language, or queryPath to narrow results. Use the returned BQRS paths with codeql_bqrs_decode or codeql_bqrs_info to inspect query results.
ParameterTypeDescription
languagestringFilter by CodeQL language (e.g., "javascript", "python", "java"). Extracted from the database path in query.log. Runs without a query.log are excluded when this filter is set.
queryNamestringFilter results by query name (e.g., "UI5Xss.ql")
queryPathstringFilter by query file path. Absolute paths match exactly; relative paths/substrings match case-insensitively. Requires query.log to be present.
profile_codeql_queryProfile the performance of a CodeQL query run against a specific database by analyzing the evaluator log JSON file
ParameterTypeDescription
database *stringPath to the CodeQL database directory
evaluatorLogstringPath to an existing structured JSON log (e.g., evaluator-log.jsonl) file. If not provided, the tool will run the query to generate one.
outputDirstringDirectory to write profiling data files (defaults to same directory as evaluator log)
query *stringPath to the .ql query file
profile_codeql_query_from_logsParse CodeQL evaluator logs into a structured performance profile. Returns compact JSON with per-query summaries and top-N slowest predicates (name, duration, result size, eval order, dependency count). Full RA operations, pipeline-stage tuple progressions, and dependency lists are written to a line-indexed detail file — each predicate includes detailLines: {start, end} for targeted read_file access to its full analysis. Works with logs from codeql query run, codeql database analyze, or vscode-codeql.
ParameterTypeDescription
evaluatorLog *stringPath to evaluator-log.jsonl or evaluator-log.summary.jsonl
outputDirstringDirectory to write profile output files (defaults to same directory as log)
topNnumberNumber of slowest predicates to include per query (default: 20)
query_results_cache_clearClear cached query results by cache key, query name, database path, or clear all.
ParameterTypeDescription
allbooleanClear the entire query results cache.
cacheKeystringClear a specific cache entry.
databasePathstringClear all entries for this database.
queryNamestringClear all entries for this query name.
ruleIdstringClear all entries for this CodeQL query @id.
query_results_cache_compareCompare cached query results across multiple databases for the same query. Useful for MRVA-style cross-repository analysis.
ParameterTypeDescription
languagestringFilter by language.
queryNamestringThe query name to compare across databases.
ruleIdstringThe CodeQL query @id to compare across databases (preferred over queryName).
query_results_cache_lookupCheck whether cached query results exist for given parameters. Returns metadata about the cached entry without the full content.
ParameterTypeDescription
cacheKeystringLook up by exact cache key (if known).
databasePathstringDatabase path to search for.
languagestringFilter by language (e.g. "cpp", "javascript").
limitnumberMaximum number of cache entries to return when listing by filter (default: 50, max: 500).
queryNamestringQuery name to search for (e.g. "PrintAST", "CallGraphFrom").
ruleIdstringFilter by CodeQL query @id (e.g. "js/sql-injection"). The @id is the most reliable identifier.
query_results_cache_retrieveRetrieve cached query results with optional subset selection. Supports line ranges (for graphtext/CSV) and SARIF result indices and file filtering to return only the relevant portion.
ParameterTypeDescription
cacheKey *stringThe cache key of the result to retrieve.
fileFilterstringFor SARIF: only include results whose file path contains this string.
lineRangeobjectFirst line to include (1-indexed, inclusive).
maxLinesnumberMaximum number of lines to return for line-based formats (default: 500).
maxResultsnumberMaximum number of SARIF results to return (default: 100).
resultIndicesobjectFirst SARIF result index to include (0-indexed, inclusive).
quick_evaluateResolve a class or predicate symbol in a CodeQL query file for quick evaluation. Locates the symbol position and returns an output path for results. Note: this tool validates the symbol exists but does not yet execute the evaluation — use codeql_query_run for full evaluation.
ParameterTypeDescription
db *stringPath to the CodeQL database
file *stringPath to the .ql file containing the symbol
output_pathstringOutput path for results (defaults to project-local .tmp/quickeval/)
symbol *stringName of the class or predicate to evaluate
read_database_sourceRead source file contents from a CodeQL database source archive (src.zip) or source directory (src/). Use this to explore code at alert locations discovered via codeql_bqrs_interpret SARIF output. Omit filePath to list all files in the archive. Accepts raw file paths, file:// URIs (as found in SARIF physicalLocation.artifactLocation.uri), or paths relative to the archive root. Use startLine/endLine to return only the relevant portion of large files.
ParameterTypeDescription
databasePath *stringPath to the CodeQL database directory
endLinenumberLast line to return (1-based, inclusive). Defaults to end of file.
filePathstringPath of the source file to read. Accepts a raw path, a file:// URI from SARIF, or a path relative to the archive root. Omit to list all files in the archive.
maxEntriesnumberMaximum number of entries to return in listing mode (when filePath is omitted). Defaults to 1000. When the total exceeds this limit the response includes truncated: true. Use prefix to narrow results for large databases.
prefixstringFilter listing results to entries starting with this prefix (listing mode only).
startLinenumberFirst line to return (1-based, inclusive). Defaults to 1.
register_databaseRegister a CodeQL database for use by other MCP tools. Validates that the database directory exists, contains codeql-database.yml, and has source files (src.zip or src/). Does not persist any session state — acts as a preflight check before using other database tools.
ParameterTypeDescription
db_path *stringPath to the CodeQL database directory
sarif_compare_alertsCompare code locations of two SARIF alerts to detect overlap. Supports sink, source, any-location, full-path, and fingerprint comparison modes.
ParameterTypeDescription
overlapModestringComparison mode: "sink" (primary locations), "source" (first dataflow step), "any-location" (all locations), "full-path" (structural path similarity), "fingerprint" (partialFingerprints match, falls back to full-path).
sarif_deduplicate_rulesIdentify duplicate alerts across two SARIF files by comparing rules pairwise. Uses fingerprint matching first, then full-path location overlap as fallback. Useful for cleanup after query changes or pack upgrades.
ParameterTypeDescription
cacheKeyAstringCache key for the first SARIF.
cacheKeyBstringCache key for the second SARIF.
overlapThresholdnumberMinimum overlap score (0-1) to consider a rule pair as duplicates. Default: 0.8.
sarifPathAstringPath to the first SARIF file.
sarifPathBstringPath to the second SARIF file.
sarif_diff_by_commitsCorrelate SARIF results with a git diff to classify findings as "new" (introduced in the diff) or "pre-existing". Accepts a SARIF file and a git ref range (e.g. "main..HEAD"). Supports file-level or line-level granularity.
ParameterTypeDescription
cacheKeystringCache key to read SARIF from (alternative to sarifPath).
granularitystringMatching granularity: "file" classifies any result in a changed file as new; "line" additionally checks that the result line falls within a changed hunk. Default: "file".
refRange *stringGit ref range for the diff (e.g. "main..HEAD", "abc123..def456"). Passed directly to `git diff`.
repoPathstringPath to the git repository. Defaults to the current working directory.
sarifPathstringPath to the SARIF file.
sarif_diff_runsDiff two SARIF files or cached results to find added, removed, and changed rules/results. Useful for comparing analysis across CodeQL versions, database updates, or query pack releases.
ParameterTypeDescription
cacheKeyAstringCache key for the first (baseline) SARIF.
cacheKeyBstringCache key for the second (comparison) SARIF.
labelAstringLabel for the first run (e.g. "v2.20.3", "main-branch", "database-A").
labelBstringLabel for the second run (e.g. "v2.20.4", "feature-branch", "database-B").
sarifPathAstringPath to the first (baseline) SARIF file.
sarifPathBstringPath to the second (comparison) SARIF file.
sarif_extract_ruleExtract all data for a specific rule/query from multi-rule SARIF. Returns a valid SARIF JSON subset with only the matching rule definition and results.
ParameterTypeDescription
cacheKeystringCache key to read SARIF from (alternative to sarifPath).
ruleId *stringThe SARIF rule ID to extract (e.g. "js/sql-injection"). Corresponds to the CodeQL query @id.
sarifPathstringPath to the SARIF file.
sarif_list_rulesList all rules in a SARIF file with result counts, severity, precision, and tags. Essential for discovering available rules before extraction or comparison.
ParameterTypeDescription
cacheKeystringCache key to read SARIF from (alternative to sarifPath).
sarifPathstringPath to the SARIF file.
sarif_rule_to_markdownConvert per-rule SARIF data to a structured markdown report with Mermaid dataflow diagrams. Renders dataflow paths as visual flowcharts.
ParameterTypeDescription
cacheKeystringCache key to read SARIF from (alternative to sarifPath).
ruleId *stringThe rule ID to render (e.g. "js/sql-injection").
sarifPathstringPath to the SARIF file.
sarif_storeStore SARIF content in the session cache for use by other sarif_* tools. Returns a cache key that can be passed to sarifPath/cacheKey parameters of other tools.
ParameterTypeDescription
labelstringHuman-readable label for this SARIF (e.g. "dubbo-java-2025-03").
sarifContentstringSARIF JSON content as a string (alternative to sarifPath).
sarifPathstringPath to a SARIF file on disk.
search_ql_codeSearch QL source files (.ql/.qll) for text or regex patterns. Returns structured results with file paths, line numbers, and optional context lines. Use this instead of grep for searching CodeQL source code.
ParameterTypeDescription
caseSensitivebooleanWhether search is case sensitive (default: true)
contextLinesnumberLines of context before and after each match (default: 0, max: 50)
includeExtensionsarrayFile extensions to search (default: ['.ql', '.qll'])
maxResultsnumberMaximum number of matching lines to return (default: 100, max: 10000)
paths *arrayDirectories or files to search in
pattern *stringText or regex pattern to search for (JavaScript regex syntax)
session_calculate_current_scoreCalculate current quality score for a session based on its state
ParameterTypeDescription
sessionId *stringID of the session
session_endEnd a query development session with final status
ParameterTypeDescription
sessionId *stringID of the session to end
status *stringFinal status of the session
session_getGet complete details of a specific query development session
ParameterTypeDescription
sessionId *stringID of the session to retrieve
session_get_call_historyGet MCP call history for a specific session
ParameterTypeDescription
limitnumberMaximum number of calls to return (most recent first)
sessionId *stringID of the session
session_get_score_historyGet quality score history for a specific session
ParameterTypeDescription
limitnumberMaximum number of scores to return (most recent first)
sessionId *stringID of the session
session_get_test_historyGet test execution history for a specific session
ParameterTypeDescription
limitnumberMaximum number of test executions to return (most recent first)
sessionId *stringID of the session
session_listList query development sessions with optional filtering
ParameterTypeDescription
dateRangearrayFilter by date range [start, end] (ISO timestamps)
languagestringFilter by programming language
queryPathstringFilter by query path (partial match)
queryTypestringFilter by query type
statusstringFilter by session status
session_update_stateUpdate the current state of a query development session
ParameterTypeDescription
compilationStatusstringCurrent compilation status
documentationStatusstringDocumentation status
filesPresentarrayList of files present in the query development
sessionId *stringID of the session to update
testStatusstringCurrent test status
sessions_aggregateGenerate aggregate insights from multiple sessions based on filters
ParameterTypeDescription
dateRangearrayFilter by date range [start, end] (ISO timestamps)
languagestringFilter by programming language
queryPathstringFilter by query path (partial match)
queryTypestringFilter by query type
statusstringFilter by session status
sessions_compareCompare multiple query development sessions across specified dimensions
ParameterTypeDescription
dimensionsarraySpecific dimensions to compare (default: all)
sessionIds *arrayArray of session IDs to compare
sessions_exportExport session data in specified format for external analysis
ParameterTypeDescription
formatstringExport format
sessionIds *arrayArray of session IDs to export
validate_codeql_queryQuick heuristic validation for CodeQL query structure - checks for common patterns like from/where/select clauses and metadata presence. Does NOT compile the query. For authoritative validation with actual compilation, use codeql_lsp_diagnostics instead.
ParameterTypeDescription
languagestringTarget programming language
query *stringThe CodeQL query to validate

Security checks

  • ✓README presentThe repository's README runs to about 870 words.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionScanned 131 source files and found 3 calls to eval or shell execution, in extensions/vscode/src/server/pack-installer.ts and server/src/lib/cli-executor.ts among others. Review how tool inputs reach them before granting credentials.

1 check has not been run yet.

Releases

v2.27.2v2.27.2 · 8 Oct 2026What's Changed Build(deps-dev): bump markdown-it from 14.3.0 to 14.3.2 by @dependabot[bot] in https://github.com/advanced-security/codeql-development-mcp-server/pull/375 Build(deps): bump ip-address from 10.5.0 to 10.7.3 by…
v2.27.1v2.27.1 · 24 Sep 2026What's Changed [WIP] Fix failing GitHub Actions job Create GitHub Release by @data-douser with @Copilot in https://github.com/advanced-security/codeql-development-mcp-server/pull/368 Upgrade CodeQL dependencies and prep for `v2.27.1`…
v2.27.0v2.27.0 · 14 Sep 2026What's Changed Upgrade CodeQL CLI dependency to v2.27.0 by @github-actions[bot] in https://github.com/advanced-security/codeql-development-mcp-server/pull/353 [UPDATE PRIMITIVE] Regenerate ruby PrintCFG.expected for CodeQL 2.27.0 CFG…
v2.26.4v2.26.4 · 28 Aug 2026What's Changed Build(deps): bump actions/checkout from 7.0.0 to 7.0.1 in the all-github-actions group across 1 directory by @dependabot[bot] in https://github.com/advanced-security/codeql-development-mcp-server/pull/332 Build(deps): bump…
v2.26.3v2.26.3 · 18 Aug 2026What's Changed Build(deps): bump ip-address from 10.2.0 to 10.5.0 by @dependabot[bot] in https://github.com/advanced-security/codeql-development-mcp-server/pull/339 Upgrade CodeQL CLI dependency to v2.26.3 by @github-actions[bot] in…

README

The repository's README runs to about 870 words, fetched a month ago. The original in the repository is authoritative.

Read full README
Questions

About Codeql Development MCP Server

How do I install Codeql Development MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Codeql Development MCP Server safe to use with an AI agent?

Its trust score is 53 out of 100 (fair). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Codeql Development MCP Server still maintained?

Yes — the latest release is v2.27.2 (8 Oct 2026), and the last commit was yesterday. The repository has 39 stars and 5 open issues.

What tools does Codeql Development MCP Server provide?

Conduid read 76 tools from the source: annotation_create, annotation_delete, annotation_get, annotation_list, annotation_search, annotation_update, audit_add_notes, audit_clear_repo and 68 more. 73 of them publish their parameters, listed under Tools above.