codeql-mcp
The CodeQL MCP Server enables interaction with the CodeQL query server through structured commands, facilitating integration with tools like Cursor or AI agents. It offers features such as database registration, query execution, and symbol location.
What is the purpose of the CodeQL MCP Server?
The CodeQL MCP Server allows tools like Cursor or AI agents to interact with CodeQL through structured commands, enabling the registration of databases, execution of queries, and decoding of results.
How do I install the necessary requirements for the server?
You can install the requirements using uv pip install -r requirements.txt
or pip install fastmcp httpx
.
How do I start the MCP server?
You can start the server by running uv run mcp run server.py -t sse
, which will start the server at http://localhost:8000/sse.
What configuration is needed for Cursor to use the MCP server?
Ensure your .cusor/config.json
contains the MCP server URL configuration for CodeQL, pointing to http://localhost:8000/sse
.
Do I need to have CodeQL installed on my system?
Yes, you must have a CodeQL binary in your $PATH, or you can hardcode its path in codeqlclient.py
.