Get the FREE Ultimate OpenClaw Setup Guide →

ai-testcase-generator

An Model Context Protocol(MCP) server that generates comprehensive API test cases (positive, negative, edge cases) from endpoint metadata, powered by AI/LLMs

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mallikarjun-roddannavar-ai-testcase-generator-mcp node build/index.js

How to use

This MCP server is a TypeScript-based AI Testcase Generator that creates comprehensive API test plans (positive, negative, and boundary cases) from endpoint metadata. It exposes a tool named generate_tests_excel which takes endpoint details (URL, HTTP method, and payload) along with optional extraContext to tailor test coverage. The server uses an LLM to craft test scenarios and outputs an Excel file with columns for Sl no, Test Name, Pre-Condition, Steps, and Expected Result, enabling QA engineers to quickly review and execute tests.

To use it, run the server via the MCP client (StdIO transport). Once connected, you can invoke the generate_tests_excel tool by sending a request that includes endpoint, method, payload, and any extraContext notes. The server will prompt the LLM, generate a structured set of test cases, convert them into an Excel file, and save it to your configured work directory along with server logs for auditing.

How to install

Prerequisites:

  • Node.js (v14+ recommended) and npm installed on your machine.
  • A working directory to store generated Excel files and logs (as configured in your MOCP config and config.json).

Installation steps:

  1. Clone the repository: git clone https://github.com/yourusername/ai-testcase-generator-mcp.git cd ai-testcase-generator-mcp

  2. Install dependencies: npm install

  3. Build the server: npm run build

  4. (Optional) Run in watch mode for development with auto-rebuild: npm run watch

  5. Configure the MCP client to connect to this server (examples rely on stdio transport):

    • Claude Desktop or any MCP-compatible client: { "mcpServers": { "ai-testcase-generator-mcp": { "disabled": false, "timeout": 60, "command": "node", "args": [ "build/index.js" ], "transportType": "stdio" } } }

    • Other clients can similarly point to the same command/args to initialize stdio transport.

Additional notes

Tips and notes:

  • Ensure you have your Groq API key (if using Groq-backed prompts) and set it in your config.json as MODEL_API_KEY. Also configure WORK_DIR to designate where generated Excel files and logs are saved.
  • The server uses Winston for logging; check logs for debugging if the generated test plans don’t match expectations.
  • Excel output is designed with columns: Sl no, Test Name, Pre-Condition, Steps, Expected Result. You can customize the prompt templates under src/prompts if needed for different test-generation styles.
  • If debugging via MCP tools, remember MCP uses stdio; you may use the MCP Inspector tool to inspect requests and responses during development.
  • When deploying, ensure the build output path (build/index.js) matches the MCP client configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers