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.
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:
- 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
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
- 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
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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。