codeql-development
LLM <-- MCP --> CodeQL( AST | CFG | CLI | LSP )
claude mcp add --transport stdio advanced-security-codeql-development-mcp-server npx -y codeql-development-mcp-server
How to use
The CodeQL Development MCP Server exposes a toolset that wraps CodeQL CLI commands to assist AI agents in writing, validating, and optimizing CodeQL queries across multiple languages. It provides prompts, resources, and test-driven workflows designed for secure code analysis and quality improvements. You can interact with the server via standard IO or HTTP transport modes, depending on your integration scenario, enabling seamless embedding into your development pipelines, IDE workflows, or AI agents.
To use it, install the MCP server package and run it through the MCP protocol (for example within an editor integration or an automation harness). The server exposes a suite of CodeQL-related utilities such as query compilation, execution, testing, and various database operations. This enables your AI tools to construct, evaluate, and refine queries across supported languages (e.g., Python, JavaScript, Java, C/C++, and more) in a consistent, model-context-aware manner.
How to install
Prerequisites
- Node.js v24.13.0 or later
- npm (comes with Node.js)
- CodeQL CLI installed and available in your PATH
Install from npm (recommended)
# Install globally
npm install -g codeql-development-mcp-server
Run on-demand without installing globally
npx -y codeql-development-mcp-server
Install from GitHub Release archive (optional)
- 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 or your hosting environment
- Use the MCP integration to list servers and verify codeql-development-mcp-server appears
Additional notes
Tips and common issues:
- Ensure CodeQL CLI is installed and accessible in PATH before starting the MCP server.
- Transport mode: choose stdio for in-editor integrations or HTTP for service-based deployments.
- If you update the server, re-build or re-install to pick up changes in MCP tools and prompts.
- Some advanced CodeQL features may not be exposed via the MCP tools yet; consult the Tools Reference in the docs for current capabilities.
- For VS Code configuration, you can reference the mvn-like example in the README to wire up mcp.json to your editor environment.
Related MCP Servers
cclsp
Claude Code LSP: enhance your Claude Code experience with non-IDE dependent LSP integration.
axon
Graph-powered code intelligence engine — indexes codebases into a knowledge graph, exposed via MCP tools for AI agents and a CLI for developers.
Security-Detections
MCP to help Defenders Detection Engineer Harder and Smarter
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
carrot-ai-pm
Carrot auto-writes specs and catches AI code drift. MCP server for Cursor that AST-validates every commit.