Frontend Test Generation & Code Review MCP Server
Uses OpenAI's LLM and embedding models for intelligent code review analysis, test generation, and similarity-based deduplication of comments and tests.
Fetches diffs from Phabricator, performs multi-dimensional code reviews (React/TypeScript/performance/security/accessibility/CSS/i18n), generates unit tests, and publishes inline comments back to revisions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Frontend Test Generation & Code Review MCP Servergenerate tests for the latest commit in my React project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fe-testgen-mcp
Frontend unit test generation service based on the MCP protocol, focusing on AI analysis and code generation capabilities. Exposes MCP tools via HTTP Streaming for integration with clients like n8n, Cursor, and Claude.
Core Capabilities
Test Matrix Analysis: Analyzes code changes to generate feature lists and test scenarios
Test Code Generation: Generates complete unit test code based on the matrix
Multi-framework Support: Supports Vitest and Jest
Multi-scenario Coverage: happy-path, edge-case, error-path, state-change
Related MCP server: Phabricator MCP Server
Quick Start
# 安装依赖
pnpm install
# 构建
pnpm build
# 启动服务
pnpm startThe service listens on http://localhost:3000/mcp by default.
Environment Configuration
Copy env.example to .env and fill in the necessary configurations:
# 必需:OpenAI API 密钥
OPENAI_API_KEY=your_api_key
# 可选:自定义模型
OPENAI_MODEL=gpt-4
# 可选:服务配置
HTTP_PORT=3000
HTTP_HOST=0.0.0.0 # 允许外部访问MCP Tools
analyze-test-matrix
Analyzes code changes and generates a test matrix.
Parameters:
Parameter | Type | Required | Description |
rawDiff | string | ✅ | Unified diff format text |
identifier | string | Unique identifier (MR ID, commit hash) | |
rules | string | Content of test-strategy.md | |
framework | string | Test framework (vitest/jest) |
Returns: Feature list, test scenarios, statistics
generate-tests
Generates unit test code.
Parameters:
Parameter | Type | Required | Description |
rawDiff | string | ✅ | Unified diff format text |
identifier | string | Unique identifier | |
rules | string | Content of test-strategy.md | |
framework | string | Test framework | |
scenarios | string[] | Specified scenario types | |
maxTests | number | Maximum number of tests |
Returns: Array of test cases (including file path, code, and scenario type)
n8n Integration
Workflow Example
GitLab/Phabricator Webhook
│
▼
读取 diff + rules 文件
│
▼
调用 MCP generate-tests
│
▼
写入测试文件 + 创建 MR
│
▼
发送通知(企微/飞书)HTTP Call Example
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "generate-tests",
"arguments": {
"rawDiff": "diff --git a/src/utils.ts ...",
"framework": "vitest"
}
}
}'rules File Format
Create .cursor/rules/test-strategy.md in your project:
# 测试生成规则
## 测试框架配置
- **测试框架**:vitest
- **测试文件模式**:**/*.{test,spec}.{ts,tsx}
## Mock 策略
- 使用 vi.fn() 进行函数 mock
- HTTP 请求优先 mock fetch/axiosn8n reads the content of this file and passes it as the rules parameter to the MCP.
Docker Deployment
docker build -t fe-testgen-mcp .
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY=xxx \
fe-testgen-mcpFAQ
Q: How to improve the consistency of the generated results?
A: The service uses temperature=0 and a fixed seed=42 by default, with response caching enabled.
Q: How to specify the test framework?
A: Priority: framework parameter > parsed from rules > default vitest
Q: What Node.js version is required?
A: Node.js 18+ (20+ recommended)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseDqualityDmaintenanceProvides tools for frontend testing including code analysis, test generation, test execution, and React component testing for Jest and Cypress frameworks.426MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with Phabricator for task management and code review workflows, including viewing and commenting on tasks, managing differential revisions, and providing intelligent review analysis with code context.7MIT
- Alicense-qualityDmaintenanceAnalyzes React component changes by performing structural analysis and generating visual diffs to identify pixel-level differences. It integrates with Figma to validate implementation compliance against design specifications and automates component reviews across git branches.MIT
- FlicenseAqualityDmaintenanceProvides AI assistants with frontend development tools including component scaffolding, bundle analysis, accessibility checks, and responsive design guidance. Enables automated generation of React components with tests and stories, bundle optimization recommendations, and WCAG compliance fixes.6
Related MCP Connectors
AI QA that runs your app in a browser on every pull request: projects, test targets, test cases.
Agentic code review, no signup to try: reality gates + frontier-model review, with veto.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NorthSeacoder/fe-testgen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server