ai-testcase-generator-mcp
Copilot instructions16 starsChanged 14 months agoMITView on GitHub
This codebase implements a Model Context Protocol (MCP) server for generating comprehensive API test plans (positive, negative, and edge cases) from endpoint metadata. The server is written in TypeScript and exposes a single tool: generate_tests_excel. - src/index.ts: Main MCP server entry point. Handles tool registration, LLM prompt construction, and Excel file generation. generation and Excel export. - build/: Compiled JavaScript output. Do not edit directly. - Debugging: Use npm run inspector to launch the MCP Inspector for stdio debugging. If…
- Reads credentials
- Installs packages
The file
We split this copilot-instructions.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Use npm run inspector to launch the MCP Inspector for stdio debugging.
- Very specific: line 48
No direct editing of build/: Always edit TypeScript sources in src/.
- Very specific: line 49
Excel output: All test plans are written as .xlsx files using the xlsx library.
- Very specific: line 61
Call generate_tests_excel with { endpoint: "https://api.example.com/v1/users/{userId}", method: "PATCH" }
- Distinctive: line 66
If you update the tool schema or add new tools, document them here.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions for Comprehensive TestCase MCP
Project Overview
This codebase implements a Model Context Protocol (MCP) server for generating comprehensive API test plans (positive, negative, and edge cases) from endpoint metadata. The server is written in TypeScript and exposes a single tool: generate_tests_excel.
Architecture & Key Components
- src/index.ts: Main MCP server entry point. Handles tool registration, LLM prompt construction, and Excel file generation. generation and Excel export.
- build/: Compiled JavaScript output. Do not edit directly.
Developer Workflows
- Install dependencies:
npm install - Build the server:
npm run build - Run the MCP server:
node build/index.js - Development with auto-rebuild:
npm run watch - Debugging:
Use
npm run inspectorto launch the MCP Inspector for stdio debugging.
Tooling & Usage
- The only exposed tool is
generate_tests_excel(seesrc/index.ts).- Required params:
endpoint(string),method(string) - Optional:
payload(object),extraContext(string)
- Required params:
- Tool output is an Excel file in
/generated. - The LLM prompt is carefully engineered for test case structure and boundary coverage (see
src/index.tsandsrc/generate_tests/generateTest_llm.ts).
Project Conventions & Patterns
- Environment variables (see
.env):MODEL_API_KEY(required)MODEL_API_URL,MODEL_NAME,MODEL_TEMPERATURE,MODEL_MAX_TOKENS,OUTPUT_DIR(optional)
- TypeScript strict mode is enforced (see
tsconfig.json). - No direct editing of build/: Always edit TypeScript sources in
src/. - Excel output: All test plans are written as
.xlsxfiles using thexlsxlibrary. - MCP config: For Claude Desktop or other clients, see
cline_mcp_settings.jsonfor server registration.
Integration Points
- LLM API: Uses Groq's OpenAI-compatible API (see
MODEL_API_URL). - MCP protocol: Communicates over stdio (see
src/index.ts). - Inspector: For debugging MCP protocol, use the Inspector script.
Examples
- To generate a test plan for a PATCH endpoint:
- Call
generate_tests_excelwith{ endpoint: "https://api.example.com/v1/users/{userId}", method: "PATCH" }
- Call
- To add new tools, register them in
src/index.tsusingserver.setRequestHandler.
If you update the tool schema or add new tools, document them here. For questions about conventions or unclear patterns, ask the project maintainer.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

