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
- π 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.
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]
ai-testcase-designer-mcp/
βββ build/ # Compiled JavaScript output
βββ assets/ # Demo gifs, images, and sample files
β βββ demo.gif
β βββ excel_preview.png
β βββ sample_chat_message.txt
βββ configs/
β βββ config.json # Server/tool config
βββ src/
β βββ index.ts # Main server entry point (MCP interface & routing)
β βββ excel.ts # Excel file creation & writing logic (modular)
β βββ logger.ts # Winston logger configuration & log writing (modular)
β βββ prompts/
β βββ testcase_prompt.txt # Prompt template for LLM-based test generation
βββ package.json
βββ tsconfig.json
βββ README.md
βββ .gitignore
- src/excel.ts: Handles all Excel (.xlsx) file creation and test plan export (modularized).
- src/logger.ts: Provides modular logging functionality across the MCP server using Winston.
- src/prompts/: Contains prompt templates for LLM-driven test generation.
- assets/: Demo GIFs, Excel sample preview, and chat prompt examples.
Hereβs the MCP generating test cases and exporting to Excel:
Below is a quick preview of the generated test cases:
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchFollow 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
-
Add the following server configuration:
-
On MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json -
On Windows:
%APPDATA%/Claude/claude_desktop_config.json
-
{ "mcpServers": { "ai-testcase-designer-mcp": { "disabled": false, "timeout": 60, "command": "node", "args": [ "c:/Auto_WS/ai-testcase-designer-mcp/build/index.js" ], "transportType": "stdio" } } }You can also use the AI Testcase Designer MCP server with [Cline](https://cline.bot), the Model Context Protocol VS Code extension.Quick Start:
- Install Cline from the VS Code Marketplace.
- Open the Cline sidebar (from the VS Code activity bar).
- Go to the "MCP Servers" section and click "Add New MCP Server".
- Fill in the server details:
{ "mcpServers": { "ai-testcase-designer-mcp": { "disabled": false, "timeout": 60, "command": "node", "args": [ "c:/Auto_WS/ai-testcase-designer-mcp/build/index.js" ], "transportType": "stdio" } } } - Test the connection and save.
For a visual step-by-step guide, see below:
For detailed Cline guidance, see the official docs:
cline.bot/getting-started/installing-cline#vs-code-marketplace%3A-step-by-step-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 <your-api-key-here>",
"WORK_DIR": "C:/Auto_WS/ai-testcase-designer-mcp"
}- π₯οΈ 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.
{
"name": "generate_tests_excel",
"arguments": {
"endpoint": "https://api.example.com/v1/users",
"method": "POST",
"payload": {
"name": "John Doe",
"email": "john@example.com"
},
"extraContext": "Focus on invalid email and empty payload scenarios."
}
}| Sl no | Test Name | Pre-Condition | Steps | Expected Result |
|---|---|---|---|---|
| 1 | Valid User Create | DB is empty | Send POST with valid payload | User created successfully |
| 2 | Missing Email | DB is empty | Send POST with name only | 400 validation error |
| 3 | Invalid Email | DB is empty | Send POST with invalid email format | 422 error message |
Files are written to: ./workdir/generated/
2025-09-13T10:22:11 [info]: [Step1] Incoming request: endpoint=/v1/users, method=POST
2025-09-13T10:22:11 [info]: [Step2] Building LLM prompt...
2025-09-13T10:22:13 [info]: [Step5] Converting LLM JSON to Excel rows (15 test cases)
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
This project is licensed under the MIT License.
See the LICENSE file for details.



