qontinui-mcp

qontinui/qontinui-mcp

3.2

If you are the rightful owner of qontinui-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

MCP server for Qontinui workflow automation - enables AI-powered workflow generation

Tools
9
Resources
0
Prompts
0

qontinui-mcp

Lightweight MCP server for Qontinui Runner - enables AI-driven visual automation.

Installation

pip install qontinui-mcp

Quick Start

  1. Start the Qontinui Runner (desktop application)

  2. Configure your AI client (Claude Desktop, Claude Code, Cursor, etc.)

Add to your MCP configuration:

{
  "mcpServers": {
    "qontinui": {
      "command": "qontinui-mcp",
      "args": []
    }
  }
}
  1. Run workflows via AI

The AI can now:

  • Load workflow configuration files
  • Run visual automation workflows
  • Monitor execution status
  • Control which monitor to use

Configuration

Environment variables:

VariableDescriptionDefault
QONTINUI_RUNNER_HOSTRunner host addressAuto-detected (WSL-aware)
QONTINUI_RUNNER_PORTRunner HTTP port9876
QONTINUI_RESULTS_DIRDirectory for automation results.automation-results
QONTINUI_DEV_LOGS_DIRDirectory for dev logs.dev-logs

Features

Area A: SSE Event Streaming

Real-time event streaming via Server-Sent Events (SSE) for monitoring workflow execution.

Endpoint: /sse/events

Client Usage:

from qontinui_mcp.client import QontinuiClient

client = QontinuiClient()

def handle_event(event: dict):
    print(f"Event: {event['event_type']} - {event}")

await client.subscribe_events(callback=handle_event, timeout=60)

Event Types:

  • qontinui/execution_started - Workflow begins
  • qontinui/execution_progress - Step completion
  • qontinui/execution_completed - Workflow ends
  • qontinui/test_started - Test begins
  • qontinui/test_completed - Test ends
  • qontinui/image_recognition - Match found/failed
  • qontinui/error - Error occurs
  • qontinui/warning - Non-fatal issue

Area B: MCP Prompts

Parameterized prompt templates for common automation tasks. Prompts aggregate context from the runner to provide structured debugging, analysis, and verification workflows.

PromptDescriptionArguments
debug_test_failureAnalyze a test failure with structured debugging approachtest_id (required), include_screenshots
analyze_screenshotVisual analysis of a screenshot for UI verificationscreenshot_id (required), focus_area
fix_playwright_failureStructured workflow to fix a failing Playwright testspec_name (required), error_message
verify_workflow_stateVerify current GUI state matches expected workflow statestate_name (required), workflow_name
create_verification_testGenerate a verification test for a UI behaviorbehavior_description (required), test_type
analyze_automation_runReview automation run results and identify issuesrun_id, focus_on_failures
debug_image_recognitionDebug template matching and image recognition issuestemplate_name, last_n_attempts
summarize_task_progressTask status summary with execution progresstask_run_id
analyze_verification_failureAnalyze why a verification criterion failedtask_id (required), criterion_id
create_verification_planGenerate a verification plan for a featurefeature_description (required), strategy

Area C: Tool Caching

Version-based tool caching to optimize MCP tool list requests.

Endpoint: /tool-version

Response:

{
  "version": "abc123...",
  "tool_count": 35,
  "test_count": 12
}

The MCP server caches tools and invalidates the cache when:

  • The runner's tool version changes (config loaded, tests added/removed)
  • Cache is older than 5 minutes (fallback)

Area E: Permission System

Fine-grained permission control for tool calls inspired by OpenCode's permission system.

Permission Levels:

LevelDescriptionExample Tools
READ_ONLYSafe operations that only read dataget_executor_status, list_monitors, read_runner_logs
EXECUTEOperations that run workflows or testsrun_workflow, execute_test, execute_python
MODIFYOperations that change datacreate_test, update_test, load_config
DANGEROUSOperations that can disrupt executionstop_execution, restart_runner

Configuration:

from qontinui_mcp.permissions import get_permission_service, PermissionLevel

service = get_permission_service()

# Auto-approve only read operations (default)
service.configure(auto_approve_levels={PermissionLevel.READ_ONLY})

# Auto-approve all operations (trusted context)
service.auto_approve_all()

# Custom permission handler
service.on_request = lambda req: input(f"Allow {req.tool_name}? (y/n)") == "y"

Area F: MCP Resources

Read-only data access via URI scheme for accessing runner data.

URI Scheme: qontinui://{type}/{id}

Resource Types:

URI PatternDescriptionMIME Type
qontinui://config/currentCurrently loaded workflow configurationapplication/json
qontinui://logs/{type}JSONL log files (general, actions, image-recognition, playwright)application/jsonl
qontinui://screenshots/{id}Screenshot metadata and file pathsimage/png
qontinui://tests/{id}Verification test definitionsapplication/json
qontinui://dom/{id}DOM capture HTML contenttext/html
qontinui://task-runs/{id}Task run detailsapplication/json

Area G: Inline Python Execution

Execute arbitrary Python code with optional dependency isolation via uvx.

Tool: execute_python

Parameters:

  • code (required): Python code to execute
  • dependencies: List of pip packages to install
  • timeout_seconds: Execution timeout (default: 30)
  • working_directory: Working directory for execution

Example:

# Simple calculation
result = await client.execute_python(
    code="return {'sum': 1 + 2, 'product': 3 * 4}"
)
# result.data["return_value"] == {"sum": 3, "product": 12}

# With dependencies
result = await client.execute_python(
    code="""
    import requests
    resp = requests.get('https://api.example.com/data')
    return resp.json()
    """,
    dependencies=["requests"],
)

Area H: Agent Spawning

Hierarchical task decomposition by spawning sub-agents with focused tasks.

Tool: spawn_sub_agent

Parameters:

  • task (required): Task description for the sub-agent
  • tools: List of tool names to restrict the sub-agent to
  • max_iterations: Maximum turns/iterations (default: 10)
  • context: Additional context to provide

Example:

result = await client.spawn_sub_agent(
    task="Verify that the login form works correctly",
    tools=["run_workflow", "capture_screenshot", "execute_test"],
    max_iterations=5,
    context="The login page is at /login with username and password fields."
)

Available Tools

Core Tools

ToolPermissionDescription
get_executor_statusREAD_ONLYGet runner status
list_monitorsREAD_ONLYList available monitors
load_configMODIFYLoad a workflow configuration file
ensure_config_loadedMODIFYLoad config if not already loaded
get_loaded_configREAD_ONLYGet loaded configuration info
run_workflowEXECUTERun a workflow by name
stop_executionDANGEROUSStop current execution

Task Management Tools

ToolPermissionDescription
get_task_runsREAD_ONLYGet all task runs
get_task_runREAD_ONLYGet specific task run details
get_task_run_eventsREAD_ONLYGet events for a task run
get_task_run_screenshotsREAD_ONLYGet screenshots for a task run
get_task_run_playwright_resultsREAD_ONLYGet Playwright results for a task run
migrate_task_run_logsEXECUTEMigrate JSONL logs to SQLite

Automation Run Tools

ToolPermissionDescription
get_automation_runsREAD_ONLYGet recent automation runs
get_automation_runREAD_ONLYGet specific automation run details

Test Management Tools

ToolPermissionDescription
list_testsREAD_ONLYList all verification tests
get_testREAD_ONLYGet test by ID
execute_testEXECUTEExecute a verification test
list_test_resultsREAD_ONLYList test results
get_test_historyREAD_ONLYGet test history summary
create_testMODIFYCreate a new verification test
update_testMODIFYUpdate an existing test
delete_testMODIFYDelete a verification test

Test Types:

  • playwright_cdp - Browser DOM assertions using Playwright
  • qontinui_vision - Visual verification using image recognition
  • python_script - Custom Python verification logic
  • repository_test - Run pytest, Jest, or other test frameworks

Log Tools

ToolPermissionDescription
list_screenshotsREAD_ONLYList available screenshots
read_runner_logsREAD_ONLYRead runner JSONL log files

Log Types:

  • general - General executor events
  • actions - Workflow action/tree events
  • image-recognition - Image recognition results with match details
  • playwright - Playwright test execution results

DOM Capture Tools

ToolPermissionDescription
list_dom_capturesREAD_ONLYList DOM captures
get_dom_captureREAD_ONLYGet DOM capture metadata
get_dom_capture_htmlREAD_ONLYGet DOM capture HTML content

AWAS (AI Web Action Standard) Tools

Tools for interacting with websites that support the AWAS standard.

ToolPermissionDescription
awas_discoverEXECUTEDiscover AWAS manifest for a website
awas_check_supportREAD_ONLYCheck if a website supports AWAS
awas_list_actionsREAD_ONLYList available AWAS actions
awas_executeEXECUTEExecute an AWAS action

Advanced Tools

ToolPermissionDescription
execute_pythonEXECUTEExecute inline Python code
spawn_sub_agentEXECUTESpawn a sub-agent with a specific task

Example Usage

Basic Workflow Execution

# In an AI conversation:
"Load the config at /path/to/workflow.json and run the 'login_test' workflow on the left monitor"

Test-Driven Verification

# Create a verification test
"Create a Playwright test that verifies the login button is visible and enabled"

# Execute the test
"Run the login_button_visible test and show me the results"

# Debug failures
"Use the debug_test_failure prompt for test abc123 with screenshots"

Automation Analysis

# Analyze a failed automation run
"Analyze the most recent automation run and identify why it failed"

# Debug image recognition
"Debug the template matching for the 'submit_button' template"

Development

# Clone
git clone https://github.com/qontinui/qontinui-mcp
cd qontinui-mcp

# Install dependencies
poetry install

# Run server locally
poetry run qontinui-mcp

# Run type checking
poetry run mypy src/

# Run linting
poetry run ruff check src/

Architecture

qontinui-mcp (MCP Server)
    |
    v
QontinuiClient (HTTP Client)
    |
    v
qontinui-runner (Desktop App, port 9876)
    |
    v
Python Subprocess (Qontinui Execution)

The MCP server is a thin wrapper that:

  1. Exposes runner capabilities via MCP protocol
  2. Provides permission control for tool calls
  3. Caches tool definitions for performance
  4. Aggregates context for structured prompts
  5. Streams events via SSE for real-time monitoring

License

MIT