squish-mcp
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@squish-mcp Run all Squish tests for the addressbook"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Squish MCP Server
This repository is outdated and no longer maintained. Anew version of Squish MCP is available in the Qt Customer Portal.
The new version equips AI agents with the capability of directly interacting with your application under test (AUT), which enables them to generate sensible test cases for complex applications such as Qt Creator, and reduces the amount of tokens required for generating tests. See the release announcement for more details.
Squish MCP v0.1.0 (outdated)
Squish Model Context Protocol (MCP) server enables AI agents to run and create Squish (documentation) test scripts and test suites and analyze the results.
Demo video of Squish MCP in action
Requirements
uv — Python package manager (also takes care of the correct Python version)
Squish (version 9.0 or later)
GitHub Copilot (VS Code Extension) (version 0.40 or later)
Tested on Windows 11, macOS, and Ubuntu 22.04.
Known Limitations
Supported AUTs. Only Qt Widgets and QML-based applications are currently tested.
Real names should be enabled. Without enabling real names, the performance gains provided by Squish MCP are severely reduced. To enable real name generation, modify the snapshot filter file at
<path-to-squish>/etc/qt_snapshot_filter.xmland change<realname exclude="yes"/>to<realname exclude="no"/>.Avoid spaces in paths. VS Code has issues with spaces in file paths, which can cause otherwise correct configurations to fail. See vscode#214931.
Related MCP server: Autotest AI MCP Server
Installation
Clone the repository:
git clone <repository-url> cd squish-mcpInstall Python dependencies:
uv syncConfigure the MCP server in VS Code. The exact configuration entry will vary depending on your agent. For GitHub Copilot in VS Code, it may look like this (
.vscode/mcp.jsonin your working directory):{ "servers": { "SquishMCP": { "command": "uv", "args": ["run", "--directory", "<path-to-squish-mcp>", "squish_mcp"], "env": { "SQUISH_PREFIX": "<path-to-squish>", } } } }MCP configuration documentation for VS Code (GitHub Copilot)
While this project is primarily tested with GitHub Copilot in VS Code, MCP is an open standard and other agents should work as well. Some alternatives:
Claude Code — See the Claude Code MCP documentation for configuration details.
GitHub Copilot CLI — The Copilot CLI gives you more control over the agent from a terminal.
By default the server is started as a subprocess by the VS Code extension (stdio transport). Alternatively, you can start the server manually over HTTP for more control over the underlying process.
Start the server in a terminal:
SQUISH_PREFIX=<path-to-squish> uv run --directory <path-to-squish-mcp> squish_mcp --transport http --host localhost --port 8000Then configure the MCP client to connect to it:
{
"servers": {
"Squish-MCP": {
"url": "http://localhost:8000/mcp",
"type": "http"
}
}
}Usage
Once your MCP server is configured and recognized by your agent, you are ready to start prompting. Most of the MCP tools operate in the context of a single test suite and accept the test_suite_path argument (a concrete suite_* directory path).
Example Usage
The examples below use the addressbook application bundled with Squish, found at <path-to-squish>/examples/qt/addressbook/addressbook.
Execute a Test Case / Test Suite
You can ask the agent to run either a full test suite or an individual test case. The agent will automatically determine paths and execute the appropriate Squish commands.
[!tip] Example prompt Run all Squish tests for the addressbook
The agent will locate the relevant tests and execute all it can relate to the addressbook. It may ask for clarifications if needed.
Generate Test Cases
You can ask the agent to generate Squish test cases for your application under test (AUT).
[!tip] Example prompt Create a new test suite for the addressbook application
<path-to-squish>/examples/qt/addressbook/addressbook. Add a test to the suite that adds a contact in the addressbook and verifies its presence in the table.
The agent will create a test case and determine how to address individual objects (e.g. the add-button) in the application. It may reach out to the user, run intermediate test cases to programmatically scan the application's objects, or use existing test cases as reference.
If you already have Squish test cases available, you can reference them in the prompt to match the style and improve the quality of the generated test case.
Generate a BDD Test Case
Squish has its own implementation and structure for running BDD tests. Squish MCP is aware of this structure and can produce both feature files and step function implementations.
[!tip] Example prompt (assumes a generated test case from the prior steps) Convert the test case tst_add_contact into a BDD test
Squish MCP will create both test.py and test.feature files with proper BDD structure, including step definitions and feature file format.
The MCP server offers a tool to generate an object map from a given object snapshot, which needs to be prepared beforehand. It serves as a helper for the agent when generating test cases to produce correct object references, but can also be used directly.
Configuration
SQUISH-RULES.yaml
For adding general "rules of thumb" for the LLM to follow, you can customize project-specific patterns and conventions:
memories:
requested_patterns:
- pattern: "user asks for a screenshot verification"
context: "Use the verify_image() function from global scripts"
- pattern: "BDD step function with variable input"
context: "Use |any| notation for variable parameters"
- pattern: "Any time you, the LLM/ the AI agent, aren't sure of what to do in a test script"
context: "Add a 'TODO: *' comment where you explain what needs to be done in a missing area."You can use SQUISH-RULES.yaml.example for reference and create your own SQUISH-RULES.yaml in the src/squish_mcp/server/tools/analysis directory.
Environment variables
SQUISH_GLOBAL_SCRIPTS: Directory storing scripts available for all Squish test cases, see Squish documentation for more information.
High-Level Architecture Overview
License
See the LICENSE file for details.
Available Tools
19 toolsanalyze_bdd_contextB
Analyze how BDD is used in a specific test suite.
Args:
test_suite_path: Path to a suite_* directory.
Inputs: test_suite_path (required). Returns: Analyzed BDD context in a test suite.
analyze_bdd_documentationA
Parse the local BDD-specific Squish documentation to find relevant information.
Inputs: no named parameters. Returns: Squish BDD documentation analysis.
analyze_existing_patternsC
Analyze test suite to find common patterns that should be used for generating new test cases.
Args:
test_suite_path: Path to a suite_* directory.
Inputs: test_suite_path (required). Returns: Analyzed test patterns from the existing codebase.
analyze_global_scriptsC
Analyze global scripts usage patterns that should be used for generating new test cases.
Inputs: no named parameters. Returns: Global-script analysis.
analyze_object_map_structureB
Analyze the current object map structure to understand existing patterns.
Args:
test_suite_path: Path to a suite_* directory.
Inputs: test_suite_path (required). Returns: Analysis of the current object map structure and organization patterns.
analyze_object_referencesB
Analyze object-reference patterns that should be used for generating new test cases. This includes where and how object maps are stored and how the objects are then accessed.
Args:
test_suite_path: Path to a suite_* directory.
Inputs: test_suite_path (required). Returns: Object-reference analysis.
analyze_squish_api_documentationB
Parse the local Squish documentation to find relevant information like the available functions and code snippets.
Inputs: no named parameters. Returns: Squish API documentation analysis.
analyze_squish_rulesB
Analyze project-specific Squish rules (explicitly defined patterns).
Inputs: no named parameters. Returns: Parsed SQUISH-RULES.yaml data.
create_test_caseA
Create a new Squish test case within an existing test suite.
Args: suite_path: Absolute path to the test suite directory (must start with 'suite_') test_case_name: Name of the test case (will be prefixed with 'tst_' if not already) test_content: Python code content for the test.py file (optional) is_bdd: Whether to create a BDD test with proper QtCare Squish BDD structure (default: False) test_description: Description for BDD feature file (optional, recommended for BDD tests)
Inputs: suite_path (required), test_case_name (required), is_bdd, test_content, +1 more. Returns: Result of creating a new Squish test case.
create_test_suiteA
Create a new Squish test suite with the standard directory structure.
Creates suite.conf and shared/names.py inside the given directory. The suite directory must not already exist.
Args: suite_path: Absolute path to the test suite directory to create (must start with 'suite_') wrapper: Name of the wrapper to use (default 'Qt'). Written as WRAPPERS in suite.conf.
Inputs: suite_path (required), wrapper. Returns: Result of creating a new Squish test suite.
extract_object_referencesC
Extract object references from test content to understand what objects are being used.
Args: test_content: The test code to analyze
Inputs: test_content (required). Returns: Object references extracted from test code, classified by type.
generate_bdd_templateB
Generate a BDD test template that can be used as a starting point for creating new BDD-style test cases.
Args: test_case_name: Name of the test case test_description: Description for the BDD feature (recommended)
Inputs: test_case_name (required), test_description. Returns: Generated BDD test template with all required files.
generate_page_objects_from_snapshotA
Generate page object references from an XML object snapshot file.
This tool:
Calls parse_object_snapshot.py to filter XML elements and generate basic definitions
Analyzes object reference patterns to understand existing style and locations
Determines output format (simple dicts vs classes/functions) based on existing patterns
Writes the generated Python code to a local temporary file and returns its path
Args:
xml_file_path: Absolute path to the XML object snapshot file
page_name: Name of the page/component these objects belong to
test_suite_path: Path to a suite_* directory.
output_directory: Existing directory where the temporary output file should be created
Note:
To generate the XML snapshot file, a testcase script has to call
saveObjectSnapshot(some_object, "snapshot_name.xml"),
where some_object is the root object of the component to capture.
In case of an empty testcase, a variation of the following can be used:
import object all_top_level_objects = object.topLevelObjects() top_level_object = all_top_level_objects[0] # change to a suitable index in case of multi-window apps. saveObjectSnapshot(top_level_object, "snapshot_name.xml")
The snapshot will be placed next to the test script that is being executed,
so the xml_file_path should be constructed accordingly.
Inputs: page_name (required), xml_file_path (required), test_suite_path (required), output_directory (required). Returns: Result of generating page object references from an XML snapshot.
generate_test_templateA
Generate a test template based on existing patterns and project conventions.
Args:
test_suite_path: Path to a suite_* directory.
test_case_name: Name of the test case
test_description: Optional description of what the test should do
Inputs: test_case_name (required), test_suite_path (required), test_description. Returns: Generated test template based on existing project patterns.
get_global_script_dirsA
Get the global script directories configured in the active Squish test suite. This uses the squishrunner --config getGlobalScriptDirs command.
Returns: List of global script directory paths.
Inputs: no named parameters. Returns: result
get_suite_configurationB
Read the suite configuration from a suite.conf file.
Args: suite_path: Absolute path to the test suite directory
Inputs: suite_path (required). Returns: Configuration parsed from a suite.conf file.
run_testA
Run a Squish test suite or test case.
You need to figure out the test suite and test case absolute paths on your own. You may be asked to either run a full test suite or a single test case within a test suite.
This is a wrapper around the squishrunner command line tool.
IMPORTANT PATH HANDLING AND SQUISH TEST NAMING CONVENTIONS:
All paths are absolute paths, but you should infer missing ones from context.
Test suites are named like
suite_<test_suite_name>- these are folders under the root pathTest cases are named like
tst_<test_name>- these are folders under the test suite pathTest files are under the test case folders and are named like
test.py
Args: test_suite_path: Absolute path to the test suite which you should figure out on your own Example: "/Users/yourname/projects/addressbook/suite_py" context: Dictionary variables of options to pass to Squish Format: {"VAR_NAME": "value"} test_case_name: Name of the test case to run. Example: "tst_general"
Returns: Test run results with squishrunner output.
Inputs: context (required), test_suite_path (required), test_case_name. Returns: Result of a Squish test execution.
set_global_script_dirsA
Set the global script directories for Squish test execution.
Args: directories: List of directory paths to set as global script directories
Inputs: directories (required).
suggest_code_improvementsB
Analyze test content and suggest improvements based on project patterns.
Args:
test_content: The test code to analyze
test_suite_path: Path to a suite_* directory.
Inputs: test_content (required), test_suite_path (required). Returns: Code improvement suggestions based on project patterns.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have distinct purposes, but there is some overlap among analysis tools (e.g., analyze_bdd_context vs analyze_bdd_documentation, analyze_existing_patterns vs analyze_global_scripts). Descriptions are detailed enough to differentiate, but an agent might occasionally misinterpret which analysis tool to use.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., analyze_bdd_context, create_test_case, generate_bdd_template). There are no deviations or mixed conventions, making the naming predictable.
With 19 tools covering analysis, creation, running, and configuration, the set is well-scoped for a Squish testing server. Each tool serves a clear role without being excessive or insufficient.
The tool surface covers core workflows: creating suites/test cases, analyzing patterns, generating templates, running tests, and managing global scripts. Minor gaps exist, such as missing update/delete operations for test cases or suites, but agents can work around them.
Maintenance
Related MCP Connectors
Create and manage test cases, test runs and results in Testiny from your AI assistant.
Generate and run tests, manage test cases, and inspect results from your AI assistant.
1Test management for AI agents: cases, runs, results, cycles and traceability.
Create, run and debug Leapwork Play tests and runlists, build knowledge bases, and use AI workflows.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to interact with HP ALM / Quality Center for QA workflows including test case management, test execution, defect tracking, and requirements management.342MIT
- AlicenseAqualityDmaintenanceEnables AI agents to manage Autotest AI projects, screens, test cases, and test runs through natural language commands.10MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with seamless access to SmartBear's suite of testing and monitoring tools, enabling querying testing data, analyzing performance metrics, and managing test automation through natural language.MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with the QA Touch test management API, including browsing projects, managing test cases, running tests, recording results, and filing defects.32MIT