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.
This project runs a Model Context Protocol (MCP) server that wraps the CodeQL query server. It enables tools like Cursor or AI agents to interact with CodeQL through structured commands and doc search.
.bqrs files into JSON| File | Purpose |
|---|---|
server.py | Main FastMCP server exposing CodeQL tools |
codeqlclient.py | CodeQLQueryServer implementation (JSON-RPC handler) |
Install with uv:
uv pip install -r requirements.txt
or with pip:
pip install fastmcp httpx
uv run mcp run server.py -t sse
Make sure your .cusor/config.json contains:
{
"mcpServers": {
"CodeQL": {
"url": "http://localhost:8000/sse"
}
}
}
{
"mcpServers": {
"codeql-mcp": {
"command": "uv",
"args": [
"run",
"mcp",
"run",
"server.py",
"-t",
"sse"
]
}
}
}Related projects feature coming soon
Will recommend related projects based on sub-categories