Api Test MCP
A

Api Test MCP

A YAML declarative API testing framework, optimized for AI programming assistants. It seamlessly integrates with editors such as Claude/Cursor through the MCP server, enabling efficient API test generation and execution.
2.5 points
6.0K

What is the API Auto Test Framework?

This is an innovative API testing framework designed specifically to address the inefficiency issue when AI assistants generate test code. In the traditional approach, AI has to generate a large amount of repetitive test code, consuming a large number of tokens and being difficult to debug. This framework separates the test logic from the execution code, allowing AI to only generate a concise YAML configuration file, which is then automatically executed by the framework. This improves the test generation efficiency by 54% and reduces token consumption by 59%.

How to use the API Auto Test Framework?

After integrating with the AI editor through the MCP server, you can directly tell the AI to create an API test. The AI will call the framework tool to generate YAML test cases, and the framework will automatically convert them into executable pytest scripts and run them. The entire process does not require manual code writing, and you only need to focus on the test logic.

Applicable scenarios

1. Development teams that need to frequently create API tests 2. Engineers who use AI assistants for test development 3. Projects that want to reduce the writing of repetitive test code 4. Scenarios that require multi-step API workflow testing 5. Teams that need to automatically generate test reports and notifications

Main features

YAML declarative testing
The test logic is completely described in YAML. AI only needs to generate structured data without writing repetitive test code. An API test is reduced from 200 lines of code to 20 lines of YAML.
MCP server integration
Seamlessly integrates with AI editors such as Claude Desktop and Cursor. Tests can be directly generated and executed through tool calls without copying and pasting code.
API workflow orchestration
Supports multi-step API calls, with automatic data transfer and assertions between steps, making it easy to test complex business scenarios.
Variable parsing engine
Supports cross-step data referencing, global variables, and dynamic function calls, such as {{ login.data.token }} to reference the token returned by the login.
Automatic authentication management
The framework automatically handles token acquisition and refresh, eliminating the need to repeatedly write authentication logic in test cases.
Multi-format test reports
Supports Allure (online/offline) and pytest-html reports, providing a beautiful display of test results.
Multi-channel notifications
After the test is completed, notifications are automatically sent to platforms such as DingTalk, Feishu, and WeCom.
Unit test support
Supports unit testing of Python code, automatically generating mock dependency injections to simplify the writing of unit tests.
Advantages
54% efficiency improvement: Compared with the traditional way of AI code generation, it significantly reduces token consumption and generation time.
Easy debugging: When a test fails, you only need to modify 1 - 2 lines of YAML without regenerating a large amount of code.
Zero repetitive code: Share configurations and setups. No need to repeatedly write the same basic code for 10 API tests.
AI-friendly: Structured YAML is easier for AI to understand and generate than natural language.
Low learning cost: Non-technical personnel can also write test cases through YAML.
Limitations
Installation and configuration required: You need to install the MCP server and configure the editor.
YAML syntax learning: You need to learn the writing specifications of YAML test cases.
Python environment dependency: Requires Python 3.10+ and a pytest environment.
Complex logic limitation: Extremely complex test logic may still require writing a small amount of Python code.
Editor limitation: You need an AI editor that supports MCP (such as Claude Desktop, Cursor, etc.).

How to use

Install the framework
Install the MCP server tool using the uv package manager.
Configure the editor
Add the server configuration in the MCP settings of the AI editor.
Create a configuration file
Create a config.yaml in the project root directory and configure the API host and authentication information.
Generate tests through AI
Tell the AI in the editor to create an API test. The AI will automatically call the tool to generate YAML and pytest scripts.
Run the tests
After the framework automatically generates the pytest scripts, run the tests and view the reports.

Usage examples

User login test
Test the user login interface, verifying successful login and the return of a valid token.
User registration to deletion workflow
Test the complete user lifecycle: register a user -> get user information -> update the user -> delete the user.
Product list pagination test
Test the pagination function of the product list interface, verifying that the correct data is returned for different pages.
Unit test generation
Generate unit tests for a Python service class, automatically mocking dependencies.

Frequently Asked Questions

What is the difference between this framework and traditional pytest testing?
Do I need to learn YAML syntax?
Which AI editors are supported?
How to debug when a test fails?
Can I test APIs that require authentication?
Does it support database operation verification?
How to integrate with CI/CD?
What should I do if the uvx install command reports an error?

Related resources

GitHub repository
Project source code, latest version, and issue feedback.
Model Context Protocol documentation
Official documentation of the MCP protocol to understand how MCP works.
pytest official documentation
Official documentation of the pytest testing framework.
Allure test report documentation
User guide for the Allure test report system.
YAML syntax tutorial
Official specification and tutorial for the YAML format.

Installation

Copy the following command to your Client for configuration
{
  "mcpServers": {
    "api-auto-test": {
      "command": "api-auto-test-mcp"
    }
  }
}
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

R
Rsdoctor
Rsdoctor is a build analysis tool specifically designed for the Rspack ecosystem, fully compatible with webpack. It provides visual build analysis, multi - dimensional performance diagnosis, and intelligent optimization suggestions to help developers improve build efficiency and engineering quality.
TypeScript
9.9K
5 points
N
Next Devtools MCP
The Next.js development tools MCP server provides Next.js development tools and utilities for AI programming assistants such as Claude and Cursor, including runtime diagnostics, development automation, and document access functions.
TypeScript
10.2K
5 points
T
Testkube
Testkube is a test orchestration and execution framework for cloud-native applications, providing a unified platform to define, run, and analyze tests. It supports existing testing tools and Kubernetes infrastructure.
Go
7.2K
5 points
M
MCP Windbg
An MCP server that integrates AI models with WinDbg/CDB for analyzing Windows crash dump files and remote debugging, supporting natural language interaction to execute debugging commands.
Python
11.0K
5 points
R
Runno
Runno is a collection of JavaScript toolkits for securely running code in multiple programming languages in environments such as browsers and Node.js. It achieves sandboxed execution through WebAssembly and WASI, supports languages such as Python, Ruby, JavaScript, SQLite, C/C++, and provides integration methods such as web components and MCP servers.
TypeScript
9.1K
5 points
P
Praisonai
PraisonAI is a production-ready multi-AI agent framework with self-reflection capabilities, designed to create AI agents to automate the solution of various problems from simple tasks to complex challenges. It simplifies the construction and management of multi-agent LLM systems by integrating PraisonAI agents, AG2, and CrewAI into a low-code solution, emphasizing simplicity, customization, and effective human-machine collaboration.
Python
8.9K
5 points
N
Netdata
Netdata is an open-source real-time infrastructure monitoring platform that provides second-level metric collection, visualization, machine learning-driven anomaly detection, and automated alerts. It can achieve full-stack monitoring without complex configuration.
Go
9.0K
5 points
M
MCP Server
The Mapbox MCP Server is a model context protocol server implemented in Node.js, providing AI applications with access to Mapbox geospatial APIs, including functions such as geocoding, point - of - interest search, route planning, isochrone analysis, and static map generation.
TypeScript
9.9K
4 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
68.8K
4.3 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
21.6K
4.5 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
34.8K
5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
24.1K
4.3 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
63.0K
4.5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
30.0K
5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
22.3K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
47.4K
4.8 points
AIBase
Zhiqi Future, Your AI Solution Think Tank
© 2026AIBase