junit-mcp-server
Version:
A Model Context Protocol (MCP) server for generating JUnit tests for Java classes.
35 lines (28 loc) • 1.01 kB
Markdown
# junit-mcp-server
This project is a Node.js server for generating JUnit tests for Java classes. It uses analyzers, generators, and utilities to process Java source files and generate corresponding JUnit test files.
## Features
- HTTP server for test generation
- JUnit test generation for Java classes
- Extensible analyzers and generators
## Usage
1. Install dependencies:
```sh
npm install
```
2. **In VS Code:**
- Open the Command Palette (Ctrl+Shift+P) and run `Tasks: Run Task`.
- Select `Start MCP Server` to launch the server.
- To stop the server, run `Tasks: Run Task` and select `Stop MCP Server`.
3. Send a POST request to `http://localhost:49152/generate-junit-test` with a JSON body:
```json
{
"javaSource": "<Java source code>",
"className": "<ClassName>"
}
```
## Development
- Source code is in the `src/` directory.
- Compiled output is in the `build/` directory.
- Server entry point: `src/index.js`.
## License
MIT