
mallikarjun-roddannavar/ai-testcase-generator-mcp
Developer toolsAn Model Context Protocol(MCP) server that generates comprehensive API test cases (positive, negative, edge cases) from endpoint metadata, powered by AI/LLMs
Overview
An that generates comprehensive (positive, negative, and boundary/edge cases) directly from endpoint metadata—powered by . This is a TypeScript-based Model Context Protocol(MCP) server for QA engineers. It demonstrates core Model Context Protocol concepts by providing: - AI-powered tool for generating exhaustive test case plans from API endpoints and payloads - Prompt-driven LLM integration for quality and coverage - Extensible structure for future automation tooling - 🔌 (stdio transport). - 📝 Tool: generate_tests_excel - Input: endpoint, HTTP method, payload, extra context. - : - : endpoint, HTTP method, payload - Use extraContext to provide any additional testing notes or constraints - : 📊 with columns: Sl no, Test Name, Pre-Condition, Steps, Expected Result. - 🧠 with configurable LLM (Groq, OpenAI, Anthropic). - 📜 Detailed logging with . - : Handles all Excel (.xlsx) file creation and test plan export (modularized).
README
🤖 AI Testcase Generator MCP
An Model Context Protocol(MCP) server that generates comprehensive API test plans (positive, negative, and boundary/edge cases) directly from endpoint metadata—powered by LLMs.
This is a TypeScript-based Model Context Protocol(MCP) server for QA engineers. It demonstrates core Model Context Protocol concepts by providing:
- AI-powered tool for generating exhaustive test case plans from API endpoints and payloads
- Prompt-driven LLM integration for quality and coverage
- Extensible structure for future automation tooling
✨ Features
- 🔌 MCP-compliant server (
stdiotransport). - 📝 Tool:
generate_tests_excel- Input: endpoint, HTTP method, payload, extra context.
- Input options:
- Direct endpoint details: endpoint, HTTP method, payload
- Use extraContext to provide any additional testing notes or constraints
- OutputPut: 📊 Excel test plan with columns: Sl no, Test Name, Pre-Condition, Steps, Expected Result.
- 🧠 Prompt-driven test generation with configurable LLM (Groq, OpenAI, Anthropic).
- 📜 Detailed logging with Winston.
🏗️ Architecture
flowchart TD
A[Claude / MCP Client] -->|Run Tool| B[MCP Server]
B -->|Prompt| C[LLM API]
C -->|Test Cases JSON| B
B -->|Excel Export| D[(Test Plan .xlsx)]
B -->|Logs| E[Server Log File]
📂 Project Structure
🎥 Demo
Here’s the MCP generating test cases and exporting to Excel:
🔍 Excel Preview
Below is a quick preview of the generated test cases:
Development
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
⚙️ Installation
Follow these steps to set up the AI Testcase Designer MCP server locally:
-
Clone the repository
git clone https://github.com/yourusername/ai-testcase-designer-mcp.git cd ai-testcase-designer-mcp -
Install dependencies
npm install -
Build the server
npm run build -
Configure the server in your MCP client
a. Claude Desktop or any MCP-compatible client
b. Cline (VS Code Extension)
c. Hermes Agent
🔑 API Key & Work Directory Setup
To use the AI Testcase Designer MCP.
- Get your Groq API key from here for free: https://console.groq.com/keys
- A working directory (WORK_DIR) where generated Excel test plans and server logs will be saved.
Update your config.json file like this:
{
"MODEL_API_KEY": "gsk_7Ma3Fabcd ",
"WORK_DIR": "C:/Auto_WS/ai-testcase-designer-mcp"
}
How to Use
- 🖥️ Open Claude Desktop (or any MCP-compatible client).
- 📂 Download Sample Chat Message: sample_chat_message.txt and copy its content.
- ✉️ Paste the content into the chat and send the message: the AI will generate detailed test cases in Excel format.
- 💾 Generated Excel files and server logs are saved in your
WORK_DIRfolder.
▶️ Example Request
{
"name": "generate_tests_excel",
"arguments": {
"endpoint": "https://api.example.com/v1/users",
"method": "POST",
"payload": {
"name": "John Doe",
"email": "[email protected]"
},
"extraContext": "Focus on invalid email and empty payload scenarios."
}
}
📊 Example Excel Output
📂 Files Output
Files are written to: ./workdir/generated/
Sample Log Output
Debugging
License
This project is licensed under the MIT License.
See the LICENSE file for details.
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →Configuration
{
"mcpServers": {
"ai-testcase-designer-mcp": {
"disabled": false,
"timeout": 60,
"command": "node",
"args": [
"c:/Auto_WS/ai-testcase-designer-mcp/build/index.js"
],
"transportType": "stdio"
}
}
}