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.
rating : 2.5 points
downloads : 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 notificationsMain 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.

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

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

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

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

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

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

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

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
