CodeQL MCP Server
@JordyZomer
About CodeQL MCP Server
This project runs a Model Context Protocol (MCP) server that wraps the CodeQL query server. It enables tools like [Cursor](https://cursor.sh/) or AI agents to interact with CodeQL through structured commands.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"codeql-mcp": {
"command": "uv",
"args": [
"pip",
"install",
"-r",
"requirements.txt"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is CodeQL MCP Server?
It wraps the CodeQL query server and exposes its capabilities via the Model Context Protocol (MCP), enabling tools like Cursor or AI agents to interact with CodeQL through structured commands and doc search.
How to use CodeQL MCP Server?
Install the Python dependencies with uv pip install -r requirements.txt or pip install fastmcp httpx. Start the MCP server using uv run mcp run server.py -t sse, which listens at http://localhost:8000/sse. Configure a client like Cursor by adding the server URL to its .cursor/config.json.
Key features of CodeQL MCP Server
- Register a CodeQL database for querying
- Run full CodeQL queries and retrieve results
- Quick-evaluate a symbol (e.g., a function or class)
- Decode
.bqrsresult files into JSON - Locate predicate or class symbol positions in source code
Use cases of CodeQL MCP Server
- Querying a codebase using CodeQL from a Cursor IDE session
- Decoding
.bqrsquery results into JSON for downstream analysis - Locating definitions of predicates and classes in code via natural language
- Running CodeQL queries programmatically from an AI agent
FAQ from CodeQL MCP Server
What are the requirements to run the CodeQL MCP Server?
Python packages fastmcp and httpx are required, and a codeql binary must be available in your $PATH (or its path can be hardcoded in codeqlclient.py).
How do I start the CodeQL MCP Server?
Run uv run mcp run server.py -t sse from the project directory. The server will listen on http://localhost:8000/sse by default.
How do I configure Cursor to use the CodeQL MCP Server?
Add a "CodeQL" entry under "mcpServers" in your .cursor/config.json, pointing the "url" to "http://localhost:8000/sse".
What transport does the CodeQL MCP Server use?
The server uses Server-Sent Events (SS
Frequently asked questions
What are the requirements to run the CodeQL MCP Server?
Python packages `fastmcp` and `httpx` are required, and a `codeql` binary must be available in your `$PATH` (or its path can be hardcoded in `codeqlclient.py`).
How do I start the CodeQL MCP Server?
Run `uv run mcp run server.py -t sse` from the project directory. The server will listen on `http://localhost:8000/sse` by default.
How do I configure Cursor to use the CodeQL MCP Server?
Add a `"CodeQL"` entry under `"mcpServers"` in your `.cursor/config.json`, pointing the `"url"` to `"http://localhost:8000/sse"`.
What transport does the CodeQL MCP Server use?
The server uses Server-Sent Events (SS
Basic information
More Other MCP servers
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Comments