codeql-development-mcp-server

codeql-development-mcp-server

Enables AI-assisted development of CodeQL queries for security analysis through the Model Context Protocol. Provides tools for compiling, testing, and executing CodeQL queries across multiple programming languages.

Category
Visit Server

README

CodeQL 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:

  1. Agnostic of development environment
  2. Agnostic of calling Large Language Model (LLM)
  3. 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

Quick Start

Install via npm (recommended)

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

  1. Download the latest release from GitHub Releases
  2. 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

Verification

  1. Restart VS Code
  2. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  3. Run "GitHub Copilot: List MCP Servers"
  4. Confirm ql-mcp appears

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

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured