About Unit Test Generator
Unit Test Generator is an MCP-based unit test generator for developers integrating the tool with Cursor. Its README provides build steps and Cursor configuration instructions.
Key features
- 01Generate unit tests
- 02Install dependencies and build with npm
- 03Configure a Cursor MCP server
Use cases
- 01Integrate the unit test generator with Cursor
- 02Build the MCP server for local configuration
MCP support
The MCP server generates unit tests; the README shows how to configure it in Cursor.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEUnit Test Generator
一个 MCP 协议的单元测试生成器。
使用
git clone [email protected]:hanqizheng/unit-test-generator-mcp-server.git
cd unit-test-generator-mcp-server
npm install
npm run build
在 Cursor 完成集成
-
Cursor -> Preferences -> Cursor Settings -> MCP -> Add new global MCP server
-
输入以下配置
{
"mcpServers": {
"unit-test-generator": {
"command": "node",
"args": ["YOUR_MCP_SERVER_BUILD_INDEX_PATH"],
"env": {
"PROJECT_PATH": "YOUR_COMPONENT_LIBRARY_PROJECT_PATH"
},
"transport": "stdio",
"enabled": true,
"description": "component library unit test generator"
}
}
}
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.