5.10. MCPs

Note

This code is “Pre-Release Functionality” or “Pre-Release Code” and is not yet ready for production. It is made available on a complimentary basis, in order to provide experimental support, showcase samples, or for other similar experimental reasons in connection with the services you get from The Qt Company Oy. This Pre-Release Functionality/Code is governed by your licensing agreement with The Qt Company (including specifically its Pre-Release Code provisions) or, if you don’t have one, the terms and conditions available at https://www.qt.io/terms-conditions-2024-02 (including the Qt Appendix for Axivion available at https://www.qt.io/terms-conditions/axivion-2025-03, Appendix for Qt AI Services available at https://www.qt.io/terms-conditions/ai-services-2025-06 and other addenda). Access to and use of this Pre-Release Code requires a valid commercial Axivion license and is available to active license holders.

The Axivion Suite can be accessed and controlled by various coding agents and LLMs via MCP servers. There are different MCP servers available, each serving a different purpose.

5.10.1. Available MCPs

5.10.1.1. Configuration MCP

The configuration MCP (ax_config) provides access to the aspects, rules, and options of the Axivion configuration system and their default values. It also reports the configuration layers loaded for a given BAUHAUS_CONFIG setting and the specific layer in which an option is set. It enables LLMs and agents to identify suitable rules and write configuration files in the correct format.

5.10.1.2. Dashboard / Results MCP

The dashboard MCP (ax_dashboard) provides access to the results stored in a given dashboard or database. It is intended for analyzing and resolving findings.

The ax_dashboard MCP server can also access local build results if a local build has been performed, allowing it to work with the most recent analysis results alongside results from the dashboard.

5.10.1.3. Documentation MCP

The documentation MCP (ax_documentation) provides improved access to the Axivion documentation via hybrid search, combining keyword search (BM25) with an optional semantic search index and merging both rankings. It enables LLMs and agents to query the documentation efficiently; it can be used as a standalone tool or to provide additional context when working with other MCP servers.

5.10.2. How to Obtain the MCPs

The MCP servers are available as Axivion-MCPs-<version>.zip and are distributed alongside the main Axivion Suite installer.

5.10.3. Setup and Configuration

5.10.3.1. Prerequisites

The servers run on the Axivion Suite rfgscript, which includes its own Python environment and all required packages, meaning no additional installation is necessary.

The optional semantic component of the documentation search is the exception. It requires the ML packages listed in ax_documentation/requirements.txt to be installed in a virtual environment, ideally managed by uv:

uv venv
uv pip install --requirements <path_to_axivion_mcps>/ax_documentation/requirements.txt

The Python executable from this environment is then passed to rfgscript via the BAUHAUS_PYTHON environment variable. rfgscript keeps the suite’s own packages ahead of it, so the server can use both.

5.10.3.2. Configuration

Configuration MCP (ax_config)

ax_config provides answers from the rule catalog of the Axivion Suite it runs on; therefore, use the rfgscript version that matches the version used to analyze your project. It needs no further environment variables. The tools list_config_layers() and locate_config_option() take the value of BAUHAUS_CONFIG as an argument, so a single server can inspect the configurations of several projects.

Dashboard MCP (ax_dashboard)

For certain tools, such as get_suppression_guidance(), which returns the project’s suppression comment formats, ax_dashboard requires access to the current project configuration via BAUHAUS_CONFIG (set as usual).

ax_dashboard also integrates with Axivion Suite IDE plugins when available, using local build results alongside dashboard results.

Connecting to a dashboard. When AXIVION_DASHBOARD_URL is set, the server connects to that dashboard (typically the central one fed by your CI), just as axivion_ci operates. Without this variable, the server operates offline by starting a private local dashboard based on the results of the last local build.

Credentials are retrieved from the standard suite variables AXIVION_USERNAME, AXIVION_PASSWORD, and AXIVION_PASSFILE. Alternatively, an API token created on the dashboard can be provided via AXIVION_TOKEN. When none of these are set, the server connects anonymously.

If a configured dashboard cannot be reached or refuses credentials, an error is reported; the server does not silently fall back to local results, as those describe a different state of the code. To enable this fallback, set AXIVION_DASHBOARD_ALLOW_LOCAL_FALLBACK to 1; responses are then labeled as originating from the local analysis.

Naming the project. A configured dashboard serves many projects, so the server never guesses which one is intended. The project name is resolved in this order: the database selected with select_database(), the AXIVION_CI_PROJECT_NAME override, the project configuration (BAUHAUS_CONFIG), AXIVION_PROJECT_NAME, and – for a private local dashboard only – its single project. Setting AXIVION_PROJECT_NAME enables a purely remote session without any local checkout; AXIVION_CI_PROJECT_NAME is only required when the dashboard serves the project under a different name than the local configuration carries.

Local and CI analysis results. A local build and the configured dashboard hold analyses of two different states of the code, so their results legitimately differ. Each project therefore has an active analysis source (local, ci, or both), and every response for findings, statistics, and rules specifies which analysis it came from and the version of that analysis. The source is resolved when a project is first accessed (preferring a local analysis that ran during the session, otherwise the most recent analysis) and is then maintained for the duration of the session; it never changes without an explicit user action.

  • AXIVION_ANALYSIS_SOURCE preselects local, ci, or both. The default value, newest, expresses no preference.

  • The get_analysis_source() tool reports the active source, the reason it is active, and the age of each analysis; select_analysis_source() switches the source for the remainder of the session; refresh_analysis_sources() re-checks both sources and picks up any analysis that appeared since the last check (e.g., after a local build).

  • If the working copy has changed since the local analysis ran, responses from the local analysis include a code_changed_since_local_analysis warning.

  • A database selected via select_database() becomes the project’s local analysis, while a configured dashboard remains available as the CI source.

Documentation MCP (ax_documentation)

The search_axivion_documentation tool searches the documentation using two complementary indexes and merges their rankings:

  • A keyword index (BM25 on SQLite FTS5). This is shipped pre-built inside Axivion-MCPs-<version>.zip, enabling keyword search immediately upon server startup. Use the archive corresponding to the Axivion Suite version that the server is targeting. Otherwise, responses and their links describe a different release, which the server will report as a warning in its log.

  • An optional semantic search index, which converts each documentation chunk into a vector embedding, allowing queries to match documentation by meaning rather than exact keywords. It requires the ML packages (see the prerequisites section) and is generated once after installation:

    BAUHAUS_PYTHON=<path_to_venv>/bin/python <path_to_bauhaus_suite>/bin/rfgscript \
        <path_to_axivion_mcps>/ax_documentation/parse_docs.py \
        --suite-path <path_to_bauhaus_suite>
    

    This creates the <path_to_axivion_mcps>/ax_documentation/doc_index/ directory from the HTML documentation and code examples provided with the suite. Note that generation may take several hours.

    The --model option selects the embedding model: mini, base, code, multilingual, large, or e5-large (default). If this option is not used, the environment variable AXIVION_EMBED_MODEL selects the model, either by one of these names or by the name of a Sentence Transformers model. The server performs searches using the model that was used to generate the index.

When the semantic search index or the ML packages are missing, search automatically runs on the keyword index alone. Adding --lexical-only to the command above rebuilds only the keyword index, which is sufficient for an in-place documentation update.

If you run into issues, check the FAQ or contact axivion.support@qt.io

5.10.3.3. Integration into IDEs

VS Code (Windows, Linux, macOS)

VS Code 1.109.2 or later is required for MCP server support. Add the servers to .vscode/mcp.json, adapting the paths to your Axivion installation and project:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "axivion_token",
      "description": "Axivion Dashboard API token",
      "password": true
    }
  ],
  "servers": {
    "ax_config": {
      "type": "stdio",
      "command": "<path_to_bauhaus_suite>/bin/rfgscript",
      "args": [
        "<path_to_axivion_mcps>/ax_config/ax_config.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>"
      }
    },
    "ax_dashboard": {
      "type": "stdio",
      "command": "<path_to_bauhaus_suite>/bin/rfgscript",
      "args": [
        "<path_to_axivion_mcps>/ax_dashboard/ax_dashboard.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>",
        "BAUHAUS_CONFIG": "${workspaceFolder}/axivion",
        "AXIVION_DASHBOARD_URL": "<dashboard_url>",
        "AXIVION_TOKEN": "${input:axivion_token}"
      }
    },
    "ax_documentation": {
      "type": "stdio",
      "command": "<path_to_bauhaus_suite>/bin/rfgscript",
      "args": [
        "<path_to_axivion_mcps>/ax_documentation/ax_documentation.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>"
      }
    }
  }
}

ax_dashboard reads results through the dashboard’s REST API, so no access to the dashboard’s database files is needed. VS Code asks for the API token when it starts the server. Without a checkout, set AXIVION_PROJECT_NAME instead of BAUHAUS_CONFIG (see Dashboard MCP (ax_dashboard)).

Analysis databases (.db files) available in the local file system can be made accessible by setting AXIVION_DATABASES_DIR to their directory. The tool list_available_databases() lists these databases, and select_database() accepts their file names.

ax_documentation can also be hosted centrally over HTTP:

MCP_HTTP_HOST=<hostname> MCP_TRANSPORT=http DOC_HTTP_BIND=0.0.0.0 rfgscript <path_to_axivion_mcps>/ax_documentation/ax_documentation.py

The MCP server listens on the address in MCP_HTTP_HOST (default 127.0.0.1) and the port in MCP_HTTP_PORT (default 12345). The documentation pages linked from the search results are served on the port in DOC_HTTP_PORT (default 9095; a free port is used if it is taken). With DOC_HTTP_BIND set to a value other than localhost or 127.0.0.1, the documentation is served on all network interfaces and the links use the host name of the machine.

In this case, add it as an HTTP server in .vscode/mcp.json instead:

{
  "servers": {
    "ax_documentation_http": {
      "type": "http",
      "url": "http://<hostname>:<port>/mcp"
    }
  }
}

Claude Desktop (Windows)

Add the following to %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "ax_config": {
      "command": "<path_to_bauhaus_suite>\\bin\\rfgscript.exe",
      "args": [
        "<path_to_axivion_mcps>\\ax_config\\ax_config.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>"
      }
    },
    "ax_dashboard": {
      "command": "<path_to_bauhaus_suite>\\bin\\rfgscript.exe",
      "args": [
        "<path_to_axivion_mcps>\\ax_dashboard\\ax_dashboard.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>",
        "BAUHAUS_CONFIG": "<path_to_project_config>",
        "AXIVION_DASHBOARD_URL": "<dashboard_url>",
        "AXIVION_TOKEN": "<api_token>"
      }
    },
    "ax_documentation": {
      "command": "<path_to_bauhaus_suite>\\bin\\rfgscript.exe",
      "args": [
        "<path_to_axivion_mcps>\\ax_documentation\\ax_documentation.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>"
      }
    }
  }
}

Claude Code (Windows, Linux, macOS)

Adapt the configuration below and add it to C:\Users\<username>\.claude.json on Windows or /home/<username>/.claude.json on Linux or /Users/<username>/.claude.json on macOS:

{
  "mcpServers": {
    "ax_config": {
      "command": "<path_to_bauhaus_suite>\\bin\\rfgscript.exe",
      "args": [
        "<path_to_axivion_mcps>\\ax_config\\ax_config.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>"
      }
    },
    "ax_dashboard": {
      "command": "<path_to_bauhaus_suite>\\bin\\rfgscript.exe",
      "args": [
        "<path_to_axivion_mcps>\\ax_dashboard\\ax_dashboard.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>",
        "BAUHAUS_CONFIG": "<path_to_project_config>",
        "AXIVION_DASHBOARD_URL": "<dashboard_url>",
        "AXIVION_TOKEN": "<api_token>"
      }
    },
    "ax_documentation": {
      "command": "<path_to_bauhaus_suite>\\bin\\rfgscript.exe",
      "args": [
        "<path_to_axivion_mcps>\\ax_documentation\\ax_documentation.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>"
      }
    }
  }
}

The example uses Windows paths. On Linux and macOS, use <path_to_bauhaus_suite>/bin/rfgscript as command and / as the path separator.

Combined server

ax_axivion offers the tools of ax_config, ax_dashboard and ax_documentation in a single server and replaces their three entries in the client configuration. It reads the environment variables of all three servers and supports only the stdio transport. For VS Code:

{
  "servers": {
    "ax_axivion": {
      "type": "stdio",
      "command": "<path_to_bauhaus_suite>/bin/rfgscript",
      "args": [
        "<path_to_axivion_mcps>/ax_axivion/ax_axivion.py"
      ],
      "env": {
        "BAUHAUS_INSTDIR": "<path_to_bauhaus_suite>",
        "BAUHAUS_CONFIG": "${workspaceFolder}/axivion",
        "AXIVION_DASHBOARD_URL": "<dashboard_url>",
        "AXIVION_TOKEN": "${input:axivion_token}"
      }
    }
  }
}

5.10.4. FAQ

Q: When running parse_docs.py or after submitting a prompt, I get a huggingface.co connection issue.

A: For semantic search, the MCP downloads a text embedding model from huggingface.co and uses it to turn each chunk of documentation into a vector embedding. Together, these embeddings form a semantic search index, which lets queries match documentation by meaning rather than exact keywords.

If you run into connection issues, it is likely that a company policy blocks the internet connection to huggingface.co. In this case, you can ask axivion.support@qt.io to transfer the model to you. Documentation search continues to work without the model: the keyword (BM25) index does not require one.