codeql-development-mcp-server
An MCP server supporting LLM requests for CodeQL development tools and resources.
Versions
2.26.2latest2.26.12.26.02.25.6-next.12.25.6+ show 21 moreshow less
2.25.52.25.42.25.32.25.2-next.12.25.22.25.2-rc12.25.1-next.32.25.1-next.22.25.1-next.12.25.12.25.02.25.0-rc12.24.32.24.3-rc22.24.3-rc12.24.22.24.2-rc32.24.2-rc22.24.2-rc12.24.12.24.1-rc1Tools 53
audit_store_findings Store findings
annotation_create Create annotation
test-client audit_list_findings List all audit findings for a repository, including any analyst notes.
audit_add_notes Append notes to an existing audit finding. Identify the finding by findingId (preferred) or by owner+repo+sourceLocation+line.
audit_clear_repo Delete all audit findings for a repository.
annotation_get Retrieve a single annotation by its numeric ID.
annotation_list List annotations with optional filtering by category, entity key, or entity key prefix.
annotation_update Update the content, label, or metadata of an existing annotation.
annotation_delete Delete annotations by ID, category, or entity key prefix.
annotation_search Full-text search across annotation content, metadata, and labels using SQLite FTS (token-based MATCH; use * suffix for prefix matching, e.g.
sarif_extract_rule Extract 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.
sarif_list_rules List all rules in a SARIF file with result counts, severity, precision, and tags. Essential for discovering available rules before extraction or comparison.
sarif_rule_to_markdown Convert per-rule SARIF data to a structured markdown report with Mermaid dataflow diagrams. Renders dataflow paths as visual flowcharts.
sarif_compare_alerts Compare code locations of two SARIF alerts to detect overlap. Supports sink, source, any-location, full-path, and fingerprint comparison modes.
sarif_diff_by_commits Correlate SARIF results with a git diff to classify findings as
sarif_diff_runs Diff 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.
sarif_store Store 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.
sarif_deduplicate_rules Identify 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.
query_results_cache_lookup Check whether cached query results exist for given parameters. Returns metadata about the cached entry without the full content.
query_results_cache_retrieve Retrieve 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.
query_results_cache_clear Clear cached query results by cache key, query name, database path, or clear all.
query_results_cache_compare Compare cached query results across multiple databases for the same query. Useful for MRVA-style cross-repository analysis.
session_end End a query development session with final status
session_get Get complete details of a specific query development session
session_list List query development sessions with optional filtering
session_update_state Update the current state of a query development session
session_get_call_history Get MCP call history for a specific session
session_get_test_history Get test execution history for a specific session
session_get_score_history Get quality score history for a specific session
session_calculate_current_score Calculate current quality score for a session based on its state
sessions_compare Compare multiple query development sessions across specified dimensions
sessions_aggregate Generate aggregate insights from multiple sessions based on filters
sessions_export Export session data in specified format for external analysis
validate_codeql_query Quick 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.
create_codeql_query Create directory structure and files for a new CodeQL query with tests
find_codeql_query_files Find and track all files and directories related to a CodeQL query, including resolved metadata
list_codeql_databases List 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.
find_class_position Finds startline, startcol, endline endcol of a class for quickeval
profile_codeql_query Profile the performance of a CodeQL query run against a specific database by analyzing the evaluator log JSON file
find_predicate_position Finds startline, startcol, endline endcol of a predicate for quickeval
read_database_source Read source file contents from a CodeQL database source archive (src.zip) or source directory (src/).
search_ql_code Search 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.
register_database Register a CodeQL database for use by other MCP tools.
list_query_run_results List 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.
list_mrva_run_results List 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.
quick_evaluate Resolve a class or predicate symbol in a CodeQL query file for quick evaluation.
profile_codeql_query_from_logs Parse 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.
codeql_lsp_completion Get 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_definition Go 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_references Find 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_lsp_document_symbols List all top-level definitions (classes, predicates, modules) in a CodeQL file. Response contains location and type information unless names_only is set to true.
codeql_lsp_diagnostics Authoritative 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.
Permissions 3
filesystem low shell high env_vars low