Autotest AI MCP Server
The Autotest AI MCP Server enables AI assistants to manage and execute automated testing workflows with the following capabilities:
Project & Structure Management
List all projects, screens, and test cases (optionally filtered by screen)
Create new projects (with name, base URL, description), screens, and test cases (with priority and description)
Test Case Details & Steps
Get detailed information and steps for a specific test case
Add test steps to a test case, supporting types:
ASSERT,ACTION,INPUT,INFO, orGET_OTP, with options for selectors, values, URLs, and expected results
Test Execution & Reporting
Trigger execution of specific test cases (
run_test_case)Retrieve recent test run results and statuses
Generate Puppeteer test files from test case steps (
generate_test_file)
Project Data Configuration
View, update, add, and delete key-value configuration variables for a project (
get_project_data_config,update_project_data_config,set_project_data_config_key,delete_project_data_config_key)
Click 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., "@Autotest AI MCP Server list all projects"
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.
Hướng Dẫn Sử Dụng Model Context Protocol (MCP) Server — Autotest AI
Tài liệu này hướng dẫn cách cài đặt, cấu hình và tích hợp Autotest AI MCP Server vào các công cụ AI Editor/Client (như Claude Desktop, Cursor) để AI có thể tự động đọc, tạo, và chạy các kịch bản kiểm thử trên hệ thống Autotest AI của bạn.
📌 Các Thông Tin Cần Chuẩn Bị (Yêu cầu hệ thống)
Để MCP Server hoạt động được, bạn cần có 2 thông tin quan trọng sau:
AUTOTEST_AI_URL(URL Server Backend):Địa chỉ đường dẫn đến server Autotest AI đang chạy.
AUTOTEST_AI_API_KEY(Mã API Key/Token):Đây là mã token xác thực quyền truy cập.
Cách lấy:
Đăng nhập vào trang giao diện web Autotest AI.
Truy cập trang Profile & Settings (bằng cách click vào góc dưới bên trái menu hoặc truy cập trực tiếp đường dẫn
/profile.html).Nhấn nút Generate Key để tạo mã khóa API Key của riêng bạn.
Copy mã này để cấu hình.
Related MCP server: Testmo MCP Server
🛠️ Cách Tích Hợp Vào Các Trình AI Client
Do repository này đã được chuyển sang chế độ Public, bạn không cần tải mã nguồn về máy mà có thể khởi chạy trực tiếp thông qua lệnh npx của Node.js.
1. Tích hợp vào Cursor IDE
Mở Cursor.
Truy cập vào Settings (biểu tượng bánh răng góc trên bên phải) -> Chọn tab Features -> Cuộn xuống mục MCP.
Nhấn nút + Add New MCP Server.
Điền các thông số cấu hình như sau:
Name:
autotest-ai-mcpType: Chọn
stdioCommand:
npx -y github:dongtrieuit/autotest-ai-mcp
Nhấn nút + Add Environment Variable để thêm 2 biến môi trường sau:
Biến 1: Tên
AUTOTEST_AI_URL, Giá trị:https://autotest.bbtech.io.vn.Biến 2: Tên
AUTOTEST_AI_API_KEY, Giá trị:<Mã API Key đã copy ở https://autotest.bbtech.io.vn/profile.html>.
Nhấn Save. Cursor sẽ tự động khởi chạy và hiển thị chấm xanh lá cây báo trạng thái
Connected.
2. Tích hợp vào Claude Desktop
Tìm file cấu hình
claude_desktop_config.jsontrên máy tính của bạn:macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Mở file bằng một công cụ soạn thảo text bất kỳ và thêm cấu hình dưới đây vào (nếu file trống thì bọc ngoài bằng dấu
{}):
{
"mcpServers": {
"autotest-ai-mcp": {
"command": "npx",
"args": ["-y", "github:dongtrieuit/autotest-ai-mcp"],
"env": {
"AUTOTEST_AI_URL": "https://autotest.bbtech.io.vn",
"AUTOTEST_AI_API_KEY": "mã_api_key_của_bạn_ở_đây"
}
}
}
}Khởi động lại ứng dụng Claude Desktop. Bạn sẽ nhìn thấy biểu tượng phích cắm (plug) xuất hiện ở khung chat hiển thị danh sách các tools khả dụng.
🔌 Danh Sách Các Công Cụ (Tools) Mà AI Có Thể Dùng
Sau khi kết nối thành công, bạn có thể yêu cầu AI tự động gọi các tool sau bằng ngôn ngữ tự nhiên:
Nhóm 1: Đọc và Truy Vấn Dữ Liệu
list_projects: Lấy danh sách toàn bộ các dự án trên hệ thống.list_screens: Lấy danh sách các màn hình (screens) của một dự án (Yêu cầu nhập:projectId).list_test_cases: Lấy danh sách kịch bản test (Có thể lọc theo màn hình quascreenId).get_test_case_details: Lấy thông tin chi tiết và toàn bộ các bước kiểm thử của một kịch bản test (Yêu cầu nhập:testCaseId).get_latest_test_runs: Lấy danh sách kết quả lịch sử chạy test gần đây.
Nhóm 2: Khởi Chạy & Biên Dịch Kiểm Thử
run_test_case: Kích hoạt hệ thống thực thi chạy tự động một kịch bản test (Yêu cầu nhập:testCaseId).generate_test_file: Biên dịch danh sách các bước kiểm thử của một test case thành mã nguồn Puppeteer hoàn chỉnh và lưu lên hệ thống lưu trữ S3 (Yêu cầu nhập:testCaseId,testName,steps).
Nhóm 3: Tạo Mới Dữ Liệu
create_project: Tạo dự án mới (Yêu cầu nhập:name,baseUrl(tùy chọn),description(tùy chọn)).create_screen: Tạo màn hình mới (Yêu cầu nhập:projectId,name,description(tùy chọn)).create_test_case: Tạo kịch bản test mới (Yêu cầu nhập:screenId,name,priority(tùy chọn),description(tùy chọn)).create_test_step: Thêm một bước kiểm thử vào kịch bản test (Yêu cầu nhập:testCaseId,stepOrder,stepType(ASSERT/ACTION/INPUT/INFO/GET_OTP) và các chi tiết hành động nhưaction,selector,value,expected,url).
Nhóm 4: Quản Lý Biến Dữ Liệu (Variables / Config)
get_project_data_config: Xem toàn bộ danh sách các biến dữ liệu được thiết lập cho dự án (Yêu cầu nhập:projectId).update_project_data_config: Cập nhật/ghi đè toàn bộ đối tượng JSON chứa các biến dữ liệu của dự án (Yêu cầu nhập:projectId,dataConfig).set_project_data_config_key: Thêm mới hoặc cập nhật một cặp biến key-value cụ thể của dự án (Yêu cầu nhập:projectId,key,value).delete_project_data_config_key: Xóa một khóa biến khỏi cấu hình của dự án (Yêu cầu nhập:projectId,key).
🚀 Một Số Câu Lệnh Gợi Ý Để Hỏi AI
Bạn có thể mở khung chat với Cursor hoặc Claude và thử các câu lệnh sau:
"Liệt kê danh sách các dự án đang có trên hệ thống"
"Lấy thông tin chi tiết các bước chạy của test case ID 12"
"Hãy tạo một dự án mới tên là 'Dự án Thanh toán' có Base URL là https://pay.site.vn"
"Thêm bước kiểm thử nhập giá trị 'admin' vào ô input
#usernamecho test case ID 5""Chạy thử test case ID 5 đi"
"Xem tất cả các biến môi trường/biến test của dự án ID 2"
"Thiết lập biến 'OTP_SECRET' với giá trị '123456' cho dự án ID 2"
"Xóa biến 'PASSWORD' khỏi cấu hình của dự án ID 2"
"Kiểm tra kết quả chạy test gần đây nhất xem có lỗi nào không"
Available Tools
10 toolscreate_projectB
Create a new project.
Inputs: name (required), baseUrl, description.
create_screenB
Create a new screen under a specific project.
Inputs: name (required), projectId (required), description.
create_test_caseB
Create a new test case under a screen.
Inputs: name (required), screenId (required), priority, description.
create_test_stepB
Add a step to a test case.
Inputs: stepType (required), stepOrder (required), testCaseId (required), url, +7 more.
get_latest_test_runsA
Get recent test execution runs and their status.
Inputs: limit.
get_test_case_detailsA
Get all steps and detailed definitions of a specific test case.
Inputs: testCaseId (required).
list_projectsA
List all projects configured in the test automation system.
Inputs: no named parameters.
list_screensB
List all screens under a specific project by project ID.
Inputs: projectId (required).
list_test_casesB
List test cases. Can filter by screen ID.
Inputs: screenId.
run_test_caseB
Trigger the execution queue for a specific test case ID.
Inputs: testCaseId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct entity (project, screen, test case, test step, test runs) with clear actions (create, list, get, run). No ambiguity among tool purposes.
All tools consistently use verb_noun pattern in snake_case (e.g., create_project, list_screens), with verbs like create, list, get, run and nouns matching domain entities.
10 tools is well-scoped for a test automation system, covering project setup, test case management, and execution without excess or deficiency.
Missing update and delete operations for all entities (project, screen, test case, test step) and no tool for individual test run details or cancellation, creating significant gaps for agent workflows.
Related MCP Connectors
Create and manage test cases, test runs and results in Testiny from your AI assistant.
Test management for AI agents: cases, runs, results, cycles and traceability.
Write, run and check natural-language browser tests of your web app from your AI assistant.
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with TestRail test management systems through comprehensive API integration. Supports retrieving and updating test cases, projects, suites, runs, and results, plus adding attachments and managing test data through natural language commands.1831 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Testmo test management platform for creating, reading, updating, and deleting test cases, managing folders, and organizing test runs through natural language.4MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact directly with TestRail instances for managing test projects, suites, cases, runs, results, plans, milestones, and attachments through the TestRail API with secure authentication.7755 npm1MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with TestRail test management system, supporting full CRUD operations on projects, suites, sections, test cases, runs, results, plans, and milestones.35327 npm1MIT