CodeQL LSP MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEQL_PATH | No | Absolute path to the CodeQL CLI. If not set, assumes 'codeql' is on PATH. | codeql |
| WORKSPACE_PATH | Yes | Absolute path to the QL workspace containing the files to inspect. | |
| CODEQL_LSP_TRACE | No | Set to '1' to enable verbose LSP protocol tracing. | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tasks | {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
} |
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codeql_completeA | Provides code completions at a specific position in a CodeQL file. Args: file_uri: URI of the CodeQL file line: 0-based line number character: 0-based character position trigger_character: Character that triggered completion (optional) limit: Maximum number of completions to return (default: 50) offset: Offset for pagination (default: 0) Returns: Dictionary with completion items and metadata |
| codeql_hoverA | Retrieves hover information (documentation, type information) at a specific position. Args: file_uri: URI of the CodeQL file line: 0-based line number character: 0-based character position Returns: Dictionary with hover information and metadata |
| codeql_definitionA | Navigates to the definition of a symbol. Args: file_uri: URI of the CodeQL file line: 0-based line number character: 0-based character position Returns: Dictionary with definition locations and metadata |
| codeql_referencesA | Finds all references to a symbol at a specific position. Args: file_uri: URI of the CodeQL file line: 0-based line number character: 0-based character position Returns: Dictionary with reference locations and metadata |
| codeql_diagnosticsA | Retrieves diagnostics (syntax/semantic warnings, errors) for a file. Args: file_uri: URI of the CodeQL file Returns: Dictionary with diagnostics and metadata |
| codeql_formatA | Formats a CodeQL file according to standard conventions. Args: file_uri: URI of the CodeQL file start_line: Start line for range formatting (optional) start_character: Start character for range formatting (optional) end_line: End line for range formatting (optional) end_character: End character for range formatting (optional) Returns: Dictionary with text edits and metadata |
| codeql_update_fileA | Updates the content of an open CodeQL file in the language server. Allows dynamic modification and analysis of unsaved changes. Args: file_uri: URI of the CodeQL file content: New complete content of the file Returns: Dictionary with success message and metadata |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool serves a distinct LSP feature: completion, hover, definition, references, diagnostics, formatting, and file updates. There is no overlap or ambiguity between the tools.
All tools follow a consistent codeql_ prefix followed by a clear, lower_snake_case feature name. This uniform namespace makes the toolset predictable and easy to navigate.
Seven tools is a well-scoped number for a language server adapter. Each tool covers a common editor interaction, and there is no bloat or unnecessary overlap.
The toolset covers core LSP features (completion, hover, definitions, references, diagnostics, formatting, and content updates) but omits some common capabilities like rename or document symbols. These gaps are minor and agents can work around them.