CodeQL CLIを使用して、セキュリティ分析やコード品質向上のためのCodeQLクエリの作成、検証、最適化をAIアシスタント経由で行えます。
別名 advanced-security/codeql-development-mcp-server
- スター
- 39
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- —
- 最終コミット
- 2026年11月13日
- ライセンス
- —
CodeQL Development MCPとは
CodeQL DevelopmentはMCPサーバーです。 CodeQL CLIを使用して、セキュリティ分析やコード品質向上のためのCodeQLクエリの作成、検証、最適化をAIアシスタント経由で行えます。.
プロジェクトのREADMEから生成された概要
CodeQL Development MCP server について
このserverは、AIアシスタントを利用する開発者が、さまざまなプログラミング言語向けのセキュリティクエリを作成・最適化することを可能にします。大規模言語モデルとCodeQL CLIの間の専門的なブリッジとして機能し、エージェントによるクエリのコンパイル、実行、およびデータベース操作を実現します。Python、JavaScript、Java、C/C++、Rust、Swiftを含む10種類の言語をサポートしており、セキュリティ分析やコード品質管理タスクにおいて汎用性の高いツールとなります。
このserverを使用するには、CodeQL CLIがインストールされ、システムのパスで利用可能である必要があります。VS CodeやCursorなどのIDEにはVSIX拡張機能を通じて統合できるほか、stdioまたはHTTPトランスポートモードを使用して他のエージェントツールと連携することも可能です。組み込みのプロンプトやリソースを通じて高度な開発プラクティスをコード化していますが、パフォーマンスは分析対象となるCodeQLデータベースのサイズに依存します。セットアップにはNode.js v25.6.0以降と、任意のLLMが必要です。
できること
- 1クエリ開発の自動化AIアシスタントが新しいCodeQLクエリを記述・コンパイルし、特定のセキュリティ脆弱性を特定できます。
- 2クエリ精度の検証統合されたテストツールを使用して、セキュリティクエリが期待通りの結果を生成することを確認できます。
- 3マルチ言語セキュリティ分析AIエージェントが幅広いプログラミング言語にわたってセキュリティ分析を実行できます。
- 4CodeQLデータベースの管理AIエージェントが、セキュリティスキャンを実行するために必要なデータベース操作を行えます。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
CodeQL Development MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude CodeにCodeQL Development MCPをインストール
$ claude mcp add codeql-development-mcp-server -- npx -y codeql-development-mcp-serverCursorにCodeQL Development MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"codeql-development-mcp-server": {
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}VS CodeにCodeQL Development MCPをインストール
.vscode/mcp.json
{
"servers": {
"codeql-development-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}VS Code CLIにCodeQL Development MCPをインストール
$ code --add-mcp '{"name":"codeql-development-mcp-server","type":"stdio","command":"npx","args":["-y","codeql-development-mcp-server"]}'Claude DesktopにCodeQL Development MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"codeql-development-mcp-server": {
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}CodexにCodeQL Development MCPをインストール
$ codex mcp add codeql-development-mcp-server -- npx -y codeql-development-mcp-serverCodex config.tomlにCodeQL Development MCPをインストール
~/.codex/config.toml
[mcp_servers.codeql-development-mcp-server] command = "npx" args = ["-y", "codeql-development-mcp-server"]
Gemini CLIにCodeQL Development MCPをインストール
$ gemini mcp add -s user codeql-development-mcp-server npx -- -y codeql-development-mcp-serverGemini settings.jsonにCodeQL Development MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"codeql-development-mcp-server": {
"command": "npx",
"args": [
"-y",
"codeql-development-mcp-server"
]
}
}
}自動チェック
実行日 2026年11月14日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能advanced-security/codeql-development-mcp-server is public and reachablegithub.com/advanced-security/codeql-development-mcp-server ↗合格
- パッケージがこのリポジトリをソースとして指定codeql-development-mcp-server names advanced-security/codeql-development-mcp-server as sourcenpmjs.com/package/codeql-development-mcp-server ↗合格
- ビルドの来歴 (Sigstore 証明)Sigstore attestation for codeql-development-mcp-servernpmjs.com/package/codeql-development-mcp-server/v/2.27.4#pro ↗合格
- オープンソースライセンス (OSI)No license検出事項
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-06github.com/advanced-security/codeql-development-mcp-server ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from codeql-development-mcp-server合格
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見る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
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のよくある質問
CodeQL Development MCPをClaude Codeに追加するには
ターミナルでclaude mcp add codeql-development-mcp-server -- npx -y codeql-development-mcp-serverを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
CodeQL Development MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
このMCP serverにはCodeQL CLIが必要ですか?
はい、CodeQL CLIを別途インストールし、PATHが通っている必要があります。
CodeQL開発でサポートされているプログラミング言語は何ですか?
Python、JavaScript、Java、C/C++、Rust、Swift、Go、C#、Ruby、GitHub Actionsを含む10言語をサポートしています。
npm経由でこのserverをインストールするにはどうすればよいですか?
npm install -g codeql-development-mcp-serverを使用してグローバルにインストールするか、npx -y codeql-development-mcp-serverを使用してオンデマンドで実行できます。