A Model Context Protocol (MCP) server that wraps the CodeQL query server
Project description
CodeQL MCP Server
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.
Features
- ✅ Register CodeQL databases
- ✅ Run full queries or quick-evaluate a symbol
- ✅ Decode
.bqrsfiles into JSON - ✅ Locate predicate/class symbol positions
File Structure
| File | Purpose |
|---|---|
server.py |
Main FastMCP server exposing CodeQL tools |
codeqlclient.py |
CodeQLQueryServer implementation (JSON-RPC handler) |
Requirements
Install with uv:
uv pip install -r requirements.txt
or with pip:
pip install fastmcp httpx
Running the MCP Server
uv run mcp run server.py -t sse
- Starts the server at http://localhost:8000/sse
- Required for Cursor or AI agent use
Cursor Config
Make sure your .cusor/config.json contains:
{
"mcpServers": {
"CodeQL": {
"url": "http://localhost:8000/sse"
}
}
}
Notes
- Tools like Cursor will invoke these commands directly via natural language.
- You must have a codeql binary in your $PATH, or hardcode its path in codeqlclient.py.
- You should probably specify query locations, query write locations and database paths in your prompts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_jordyzomer_codeql_mcp-1.0.0.tar.gz.
File metadata
- Download URL: iflow_mcp_jordyzomer_codeql_mcp-1.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a1a65d627cf0b9c4f1b8ac41a493d97628e2924565db528738cb1d9b3b4ec89
|
|
| MD5 |
747b04e27ded8df6ef0e011c96e90fd2
|
|
| BLAKE2b-256 |
f48b0cd6fea97d225247b1892a64083b6017c056c033660c5c07de06909524ec
|
File details
Details for the file iflow_mcp_jordyzomer_codeql_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_jordyzomer_codeql_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c346e46d4c4ce9a64c0b712b9c47d211944d25f1561cd47c9d7b6fbb8ae832bb
|
|
| MD5 |
61eeb06e78eed15cc06921500253e1ca
|
|
| BLAKE2b-256 |
e2c776631c315a6d2ba019feafaee96b0fb004a30675ae6e1e7a2058b0986382
|