unit-test-generator-mcp-server
This project is a unit test generator based on the MCP protocol. Implemented in TypeScript, it allows for easy integration with Cursor. Users can add an MCP server through a configuration file and specify environment variables necessary for test generation. This enables efficient testing of component libraries.
GitHub Stars
0
User Rating
Not Rated
Favorites
0
Views
24
Forks
0
Issues
1
README
Unit Test Generator
一个 MCP 协议的单元测试生成器。
使用
git clone git@github.com: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"
}
}
}