Enables AI assistants to write, validate, and optimize CodeQL queries for security analysis and code quality using the CodeQL CLI.
Also known as advanced-security/codeql-development-mcp-server
- Stars
- 39
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 13, 2026
- License
- —
What is CodeQL Development MCP?
CodeQL Development enables AI assistants to write, validate, and optimize CodeQL queries for security analysis and code quality using the CodeQL CLI.
Summary generated from the project's README
About CodeQL Development MCP server
Writing and optimizing security queries for various programming languages is what this server enables for developers using AI assistants. It provides a specialized bridge between large language models and the CodeQL CLI, allowing agents to handle query compilation, execution, and database operations. The server supports ten different languages, including Python, JavaScript, Java, C/C++, Rust, and Swift, making it a versatile tool for security analysis and code quality tasks.
To use this server, you must have the CodeQL CLI installed and available in your system path. It can be integrated into IDEs like VS Code or Cursor via a VSIX extension, or used with other agentic tools through stdio or HTTP transport modes. While it codifies advanced development practices through built-in prompts and resources, performance is tied to the size of the CodeQL databases being analyzed. The setup requires Node.js v25.6.0 or later and your choice of a calling LLM.
What you can do with it
- 1Automated query developmentAn AI assistant can write and compile new CodeQL queries to identify specific security vulnerabilities.
- 2Validating query accuracyDevelopers can use integrated testing tools to ensure their security queries produce the expected results.
- 3Multi-language security analysisThe server allows an AI agent to perform security analysis across a wide range of programming languages.
- 4Managing CodeQL databasesAn AI agent can perform necessary database operations required for running security scans.
Written from the project's README. Every use case is checked against a quote from it.
How to install CodeQL Development MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall CodeQL Development MCP in Claude Code
$ claude mcp add codeql-development-mcp-server -- npx -y codeql-development-mcp-serverInstall CodeQL Development MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"codeql-development-mcp-server": {
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}Install CodeQL Development MCP in VS Code
.vscode/mcp.json
{
"servers": {
"codeql-development-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}Install CodeQL Development MCP in VS Code CLI
$ code --add-mcp '{"name":"codeql-development-mcp-server","type":"stdio","command":"npx","args":["-y","codeql-development-mcp-server"]}'Install CodeQL Development MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"codeql-development-mcp-server": {
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}Install CodeQL Development MCP in Codex
$ codex mcp add codeql-development-mcp-server -- npx -y codeql-development-mcp-serverInstall CodeQL Development MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.codeql-development-mcp-server] command = "npx" args = ["-y", "codeql-development-mcp-server"]
Install CodeQL Development MCP in Gemini CLI
$ gemini mcp add -s user codeql-development-mcp-server npx -- -y codeql-development-mcp-serverInstall CodeQL Development MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"codeql-development-mcp-server": {
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachableadvanced-security/codeql-development-mcp-server is public and reachablegithub.com/advanced-security/codeql-development-mcp-server ↗Pass
- Package names this repository as its sourcecodeql-development-mcp-server names advanced-security/codeql-development-mcp-server as sourcenpmjs.com/package/codeql-development-mcp-server ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for codeql-development-mcp-servernpmjs.com/package/codeql-development-mcp-server/v/2.27.4#pro ↗Pass
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-11-06github.com/advanced-security/codeql-development-mcp-server ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from codeql-development-mcp-serverPass
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubCodeQL Development MCP Server
Enabling AI-assisted CodeQL query development through the Model Context Protocol
A comprehensive Model Context Protocol (MCP) server designed specifically for agentic AI development of CodeQL (QL) code. This server provides tools, prompts, and resources to help AI assistants write, validate, and optimize CodeQL queries for security analysis and code quality.
Features
- Comprehensive Tool Suite - Wraps CodeQL CLI commands for query compilation, execution, testing, and database operations
- Multi-Language Support - Supports CodeQL query development for 10 languages including Python, JavaScript, Java, C/C++, Rust, Swift, and more
- AI-Optimized Prompts - Built-in prompts and resources that guide AI assistants through CodeQL development workflows
- Test-Driven Development - Integrated testing tools for validating query accuracy with expected results
- Flexible Transport - Supports both stdio and HTTP transport modes for different integration scenarios
Limitations
- Requires CodeQL CLI to be installed separately
- Performance depends on the size of CodeQL databases being analyzed
- Some advanced CodeQL CLI features may not yet be exposed as tools
Project Status
Active Development - This project is actively maintained and used in production environments for AI-assisted CodeQL development.
Background
The codeql-development-mcp-server project is maintained by GitHub's CodeQL Expert Services team and builds (and hopefully improves) on the concepts from the advanced-security/codeql-development-template repository template.
The main advantages of using the codeql-development-mcp-server are:
- Agnostic of development environment
- Agnostic of calling Large Language Model (LLM)
- MCP server tools codify advanced CodeQL development practices
Roadmap
Development priorities and open issues are tracked in GitHub Issues.
Contributing
We welcome contributions! Whether it's bug fixes, new features, documentation improvements, or additional language support, please see CONTRIBUTING.md for guidelines.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Requirements
Environment
- Node.js v25.6.0 or later (nodejs.org)
- Some calling LLM Bring your own LLM, but some LLMs are (much) better than others.
External Dependencies
- CodeQL CLI - Must be installed and available in PATH (github.com/github/codeql-cli-binaries)
Quick Start
VS Code extension via VSIX (recommended for IDEs)
If you run ql-mcp inside VS Code or a compatible fork such as Cursor, install the vscode-codeql-development-mcp-server extension from a VSIX archive — it bundles the server, auto-registers ql-mcp, and discovers the CodeQL CLI. Download the .vsix from GitHub Releases and install it via Extensions: Install from VSIX… in the Command Palette, or build it from source with npm run package:vsix. See the VS Code Extension guide for details.
For Copilot CLI or other non-IDE agentic tools, use one of the methods below.
Install via npm
No repository clone needed — install from npmjs.org:
# Install globally
npm install -g codeql-development-mcp-server
Or run on-demand without installing globally:
npx -y codeql-development-mcp-server
VS Code Configuration
Add to your mcp.json file:
| OS | Location |
|---|---|
| Linux | ~/.config/Code/User/mcp.json |
| macOS | ~/Library/Application Support/Code/User/mcp.json |
| Windows | %APPDATA%\Code\User\mcp.json |
{
"servers": {
"ql-mcp": {
"command": "npx",
"args": ["-y", "codeql-development-mcp-server"],
"type": "stdio"
}
}
}
Install from GitHub Release archive
- Download the latest release from GitHub Releases
- Extract the archive:
tar -xzf codeql-development-mcp-server-vX.X.X.tar.gz -C /path/to/destination
Installing from Source
git clone https://github.com/advanced-security/codeql-development-mcp-server.git
cd codeql-development-mcp-server
npm install && npm run build
Server + extension only (no Go client):
npm run buildalso builds the Goclient/CLI (requires a Go toolchain). To build or package only the server and VS Code extension, usenpm run build:server-and-extensionornpm run package:vsix— neither touchesclient/.
Verification
- Restart VS Code
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Run "GitHub Copilot: List MCP Servers"
- Confirm
ql-mcpappears
Supported Languages
| Language | CodeQL Identifier |
|---|---|
| GitHub Actions | actions |
| C/C++ | cpp |
| C# | csharp |
| Go | go |
| Java/Kotlin | java |
| JavaScript/TypeScript | javascript |
| Python | python |
| Ruby | ruby |
| Swift | swift |
Documentation
- Public Installation Guide - Install and run without cloning the repository
- Getting Started Guide - Detailed installation and setup instructions
- Tools Reference - Complete list of available MCP tools
- Prompts Reference - MCP prompts for CodeQL development workflows
- Resources Reference - MCP resources for CodeQL learning and reference
- Testing Strategy - Multi-layer testing approach
License
This project is licensed under the terms of the GitHub CodeQL Terms and Conditions. Please refer to LICENSE for the full terms.
Maintainers
This repository is maintained by the team specified in CODEOWNERS.
Support
This project uses GitHub issues to track bugs and feature requests. Please search existing issues before filing new ones to avoid duplicates.
This project comes with no expectation or guarantee of support, with more details in the SUPPORT.md document.
Acknowledgement
This project builds upon the CodeQL CLI and the broader CodeQL ecosystem developed by GitHub. Special thanks to the GitHub Advanced Security team and the open-source community for their contributions.
CodeQL Development MCP questions
How do I add CodeQL Development MCP to Claude Code?
Run claude mcp add codeql-development-mcp-server -- npx -y codeql-development-mcp-server in your terminal. Add --scope user to make it available in every project.
How do I add CodeQL Development MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does this server require CodeQL CLI?
Yes, the CodeQL CLI must be installed separately and available in your PATH.
What programming languages are supported for CodeQL development?
It supports 10 languages including Python, JavaScript, Java, C/C++, Rust, Swift, Go, C#, Ruby, and GitHub Actions.
How can I install this server via npm?
You can install it globally using 'npm install -g codeql-development-mcp-server' or run it on-demand with 'npx -y codeql-development-mcp-server'.