Get the FREE Ultimate OpenClaw Setup Guide →

codeql-development

LLM <-- MCP --> CodeQL( AST | CFG | CLI | LSP )

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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)

  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 or your hosting environment
  2. 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

Sponsor this space

Reach thousands of developers