Home / Servers / GitHub API / code_scanning_create_variant_analysis

Create a CodeQL variant analysis

An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.

Create a CodeQL variant analysis Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories. Get started by learning more about running CodeQL queries at scale with Multi-Repository… [POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses]

Name on the gateway: github_api__code_scanning_create_variant_analysis · may change things.

Parameters

NameTypeDescription
owner requiredstringThe account owner of the repository. The name is not case…
repo requiredstringThe name of the repository without the .git extension. The…
language requiredactions | cpp | csharp | go | java | javascript | python | ruby | rust | swiftThe language targeted by the CodeQL query
query_pack requiredstringA Base64-encoded tarball containing a CodeQL query and all its dependencies
repositoriesarrayList of repository names (in the form owner/repo-name) to run the query…
repository_listsarrayList of repository lists to run the query against. Precisely one property from…
repository_ownersarrayList of organization or user names whose repositories the query should be run…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "github_api__code_scanning_create_variant_analysis",
  "arguments": {
    "owner": "…",
    "repo": "…",
    "language": "…",
    "query_pack": "…"
  }
}

Or connect the GitHub API server directly, which lists 1,221 tools including this one:

Run in your terminal
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create a codeql variant analysis tool with owner set to ….

More from GitHub API