MCP Interface Documentation

March 8, 2026 ยท View on GitHub

OpenTester exposes core project/case/template/execution operations through MCP.

Connection Information

OpenTester currently runs the MCP server with streamable-http transport.

Streamable HTTP (Current Runtime)

  • Endpoint: http://localhost:8001/mcp
  • Transport: Streamable HTTP
  • Behavior: request/response over HTTP; may use streaming patterns depending on client/server support

STDIO (Not Currently Enabled)

STDIO transport is not enabled in the current implementation. The MCP server only supports Streamable HTTP transport at this time.

Future versions may add STDIO support for local process-based clients.

STDIO (Client Configuration Pattern)

For local clients that launch a process (for example Claude Desktop), use stdio server config:

{
  "mcpServers": {
    "opentester": {
      "command": "opentester",
      "args": ["mcp"]
    }
  }
}

Claude Code HTTP Configuration

Add MCP configuration in .claude/settings.json:

{
  "mcpServers": {
    "opentester": {
      "url": "http://localhost:8001/mcp"
    }
  }
}

Tool Names and Parameters

Tool names below follow the current FastMCP function names from backend/opentester/mcp/server.py.

Project Management

ToolParametersDescription
list_projects-List all projects
get_projectproject_idGet a project with cases
create_projectname, target_typeCreate a new project
delete_projectproject_idDelete a project

DSL and Case Management

ToolParametersDescription
validate_dsldsl_yamlValidate DSL YAML and schema
save_caseproject_id, name, dsl_yaml, case_id (optional)Create or update a case
delete_caseproject_id, case_idDelete a case

Execution

ToolParametersDescription
run_caseproject_id, case_idStart single-case execution via FastAPI bridge
run_projectproject_id, case_ids (optional)Start executions for project cases
stop_executionexecution_idStop a running execution
get_execution_statusexecution_idFetch execution status
get_execution_logexecution_idFetch detailed results

AI DOM Analysis (Web Testing)

ToolParametersDescription
request_dom_analysisexecution_idFetch DOM snapshot and context when execution is paused for AI
submit_ai_selectorexecution_id, selector, selector_type (optional), reasoning (optional)Submit selector and resume paused execution
list_paused_executions-List all executions waiting for AI selector input

Template Management

ToolParametersDescription
list_templatescategory (optional), target_type (optional), tag (optional)List templates
get_templatetemplate_idGet template details
create_templatename, dsl_template, description (optional), target_type (optional), category (optional), tags (optional)Create template
update_templatetemplate_id, mutable fieldsUpdate template
delete_templatetemplate_idDelete template
instantiate_templatetemplate_id, project_id, case_name, variables (optional)Create case from template
create_template_from_caseproject_id, case_id, template_name, description (optional), category (optional), variable_mappings (optional)Convert case to template

Notes

  • run_case, run_project, stop_execution, get_execution_status, and get_execution_log call FastAPI endpoints (for example /api/execution/run) so execution state is tracked in the shared execution manager.
  • request_dom_analysis, submit_ai_selector, and list_paused_executions operate directly through the execution manager/shared execution state, not via FastAPI HTTP bridge.
  • If FastAPI is not reachable, the FastAPI-bridged execution tools fail even if the MCP server itself is running.
  • Web executor supports ai_locator flow: execution may enter paused_waiting_for_ai, then resume after submit_ai_selector.