11.0+26.5 MCP Server
The Model Context Protocol (MCP) is an open standard for structured communication between AI clients and external tools or services. QF-Test implements this protocol as an MCP server, making its test automation engine available to any MCP-compatible AI client. Through this integration, AI clients can control browsers and desktop applications, interact with UI elements, and execute QF-Test test procedures using natural language. It is also possible to define additional MCP tools, making QF-Test a universal MCP server for any controllable application.
26.5.1 Set up QF-Test MCP Server
The QF-Test MCP server can be enabled in both interactive and batch mode.
In interactive mode, use the options dialog: navigate to
»Artificial Intelligence« - »MCP & Agent Skills«,
check »Enable MCP Server«,
set the desired port (default: 5543, see "MCP Server Port"), and click »OK«.
If QF-Test runs on the same machine as the QF-Test license server,
an alternative port to 5543 must be used to avoid a conflict.
In batch mode start QF-Test from the command line with qftest -batch
to run it headlessly with the MCP server active.
-mcp or -mcp=port
The default MCP endpoint is then available at http://127.0.0.1:5543/mcp; the
connection type is streamable HTTP.
To connect Claude Desktop, add the following entry to
claude_desktop_config.json. The file can be found via »Edit config«
in the section »Developer« in the Claude settings.
{
"mcpServers": {
"qftest": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:5543/mcp"]
}
}
} To connect Claude Code CLI, run the following command and restart Claude Code:
claude mcp add --transport http qftest http://localhost:5543/mcp
To connect Cursor, add the following entry to
mcp.json. The file can be found via "New MCP Server"
in the section "Tools & MCPs" in the Cursor settings.
{
"mcpServers": {
"qftest": {
"url": "http://localhost:5543/mcp"
}
}
}
To connect AnythingLLM, navigate to
»Settings«-»Agent Skills«, click on "Edit" icon next to "MCP Servers"
and add the following entry to the mcpServers object:
{
"mcpServers": {
"qftest": {
"type": "streamable",
"url": "http://localhost:5543/mcp"
}
}
}
To connect OpenCode, add the following entry to
opencode.json. The file is located at
~/.config/opencode/opencode.json for a global configuration,
or place it in the project root directory for a project-specific configuration.
{
"mcp": {
"qftest": {
"type": "remote",
"url": "http://localhost:5543/mcp"
}
}
} 26.5.2 Built-in MCP Tools
The following tools are provided by the QF-Test MCP server out of the box.
| Title | Tool Name | Description |
|---|---|---|
| Get Version | get_version |
Returns the QF-Test version number. |
| Execute Procedure | call_procedure |
Executes a procedure from a test suite. |
| Run Test | run_test |
Runs a TestCase or TestSet from a test suite file. |
| Start Test | start_test |
Starts a TestCase or TestSet from a test suite file without waiting for completion. |
| Stop Test | stop_test |
Stops the currently running test, if any. |
| Get Execution State | get_execution_state |
Returns the run state of the current test (idle, scheduled, running, paused, finished). |
| Save Run Log | save_run_log |
Saves the run log of the last finished run to a file. |
| Open Run Log | open_run_log |
Opens a QF-Test run log file in QF-Test. |
| Log Message | log_message |
Logs a message to the run log with a configurable type: message, warning, error, check-ok or check-failed. |
| Open Browser | browser-open |
Opens a browser and navigates to a URL. |
| Test Browser Connection | browser-test_connection |
Returns true if the browser is currently open and controllable. |
| Open the given URL in the opened Browser | browser-navigate_to |
Navigates the open browser to a URL. |
| Get Browser URL | browser-get_url |
Returns the current URL of the open browser. |
| Execute Javascript | browser-exec_js |
Executes Javascript code in the browser window. |
| Upload File | browser-upload_file |
Interacts with a file upload element in the browser. |
| Close Browser | browser-close |
Closes the running browser. |
| Start Application | application-start |
Starts an application and connects QF-Test to it. |
| Stop Application | application-stop |
Stops the controlled application. |
| Test Application Connection | application-test_connection |
Returns true if the application is running and controllable. |
| Open Android Device | mobile-android-open_device |
Connects to a running Android device or starts an Android emulator. |
| List Android Devices | mobile-android-list_devices |
Lists Android devices (simulated or real) currently available for testing. |
| Open iOS Device | mobile-ios-open_device |
Starts a simulated iOS device or connects to a real iOS device. |
| List iOS Devices | mobile-ios-list_devices |
Lists iOS devices (iPhones, iPads, simulated or real) available for testing. |
| Start mobile Application | mobile-start_application |
Starts an application on an open mobile device (Android or iOS). |
| List mobile Applications | mobile-list_applications |
Lists all applications on the Android or iOS device. |
| Open PDF | pdf-open |
Opens the QF-Test PDF viewer and displays a specified PDF file. |
| Current Page | pdf-current_page |
Returns the name or number of the page currently shown in the PDF viewer. |
| Get Pages | pdf-get_pages |
Gets a list of all available pages of the document shown in the PDF viewer. |
| Select Page | pdf-select_page |
Selects a specific page of the PDF file in the viewer. |
| Get UI Elements of the connected Application | ui-get_snapshot |
Returns a JSON tree of the current UI elements. |
| Get detailed Information of the Element | ui-get_element_details |
Returns a JSON object with detailed information about a single UI element and its children, including dimensions and attributes. The element is identified by its element ID and the depth of the child hierarchy can be controlled. |
| Click on the Element | ui-click_on_element |
Clicks on a UI element identified by its element ID. |
| Start a drag-and-drop operation on the Element | ui-drag_from_element |
Starts a drag-and-drop operation from a UI element. |
| End a drag-and-drop operation on the Element | ui-drop_on_element |
Ends a drag-and-drop operation on a UI element. |
| Click on the given Position | ui-click_on_coordinates |
Clicks at x,y coordinates within a window. |
| Start a drag-and-drop on the given Position | ui-drag_from_coordinates |
Starts a drag-and-drop operation from x,y coordinates. |
| End a drag-and-drop on the given Position | ui-drop_on_coordinates |
Ends a drag-and-drop operation at x,y coordinates. |
| Enter Text in an Element | ui-enter_text |
Enters text into a UI element. |
| Get Client Screenshot | get_client_screenshot |
Returns a screenshot of the whole client window or of a specified element in a client. |
| Get Display Screenshot | get_display_screenshot |
Returns a screenshot of the whole screen. |
26.5.3 Create Custom MCP Tools and Prompts
Any QF-Test procedure can be exposed as an MCP tool by adding doctags to its comment. The test suite file containing the procedure must be listed in the »MCP Suites« option found in the options dialog: navigate to »Artificial Intelligence« - »Agent Skills«.
The file qfs-ai.qft is included by default to provide the built-in MCP tools.
To create custom MCP tools suites, add @mcp/tool to the procedure comment
to mark it as an MCP tool. MCP prompts can also be created
by adding @mcp/prompt to the procedure comment.
The tool or prompt name is derived automatically from the procedure name
by lowercasing it and replacing spaces and special characters with underscores.
Use @mcp/name followed by the desired name to override the automatically generated name.
The tool or prompt description is derived from procedure description created by available doctags.
Use @param paramName description to document each parameter. Start the description
with the keyword (Required) to mark a parameter as required.
Use @return description to describe the return value.
Even for purely action-based procedures, it is recommended to return a value describing the execution performed.
Use @mcp/timeout millis to set a custom execution timeout in milliseconds.
Add @mcp/exposedByDefault false to define a tool or prompt that is not active
unless explicitly enabled via the AI security options.
Packages annotated with @mcp/name are prefixed to the tool or prompt name.
To expose all procedures in a package as tools or prompts at once, annotate the package comment
with @mcp/tools or @mcp/prompts accordingly. Nested packages are prefixed
automatically to its tools and prompts.
Annotate nested package with @mcp/name to override its prefix in tool or prompt name.
Example procedure comment:
My custom search tool @param query Required. The search term to look up. @param maxResults Maximum number of results to return. @return A list of matching product names. @mcp/tool @mcp/name search_product
| Doctag | Effect |
|---|---|
@mcp/tool |
Exposes the procedure as an MCP tool. |
@mcp/prompt |
Exposes the procedure as an MCP prompt. |
@mcp/tools (on a package) |
Exposes all procedures in the package as MCP tools. |
@mcp/prompts (on a package) |
Exposes all procedures in the package as MCP prompts. |
@mcp/name name |
Overrides the automatically generated tool or prompt name. |
@mcp/timeout millis |
Sets a custom execution timeout in milliseconds for tool execution on server side. |
@mcp/exposedByDefault true/false/mcp/internal |
The tool or prompt is not exposed to the MCP server or internally by default, if the value is not truecode>.
It still can be enabled explicitly via the AI security options. |
@param name description |
Describes a parameter. |
@return description |
Describes the return value of the tool or prompt. |
26.5.4 Security considerations
26.5.4.1 Disclaimer
NoteProcedures called via MCP run with your system user's full permissions. They could modify, delete, or access any files your user account can access. Review and test all procedures before marking them as MCP prompt or tool.
26.5.4.2 Security best practices
Keep these practices in mind when writing procedures called via MCP:
- Validate and sanitize parameter input: never trust input data without checking
- Block path traversal: check for
..in file paths, and use absolute paths where possible