rahul267/test-automation-mcp-server
If you are the rightful owner of test-automation-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This Test Automation MCP Server is designed to analyze GitHub repositories for test frameworks and generate automated test cases.
Test Automation MCP Server - Client Setup
Overview
This Test Automation MCP Server analyzes GitHub repositories to detect test frameworks and generate automated test cases.
Features
- š analyze-test-framework: Detect test frameworks (Jest, Mocha, Cypress, Playwright, Selenium)
- š get-test-files: Find all test files in a repository
- š¬ analyze-test-file: Analyze specific test file structure and content
- š ļø generate-test-case: Generate new test cases based on frameworks
- š get-repo-file: Read any file from a GitHub repository
Setup Instructions
1. For Claude Desktop
Copy the contents of claude_desktop_config.json
to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
2. For VS Code Extensions
Use vscode_mcp_config.json
for VS Code extension configuration.
3. For Other MCP Clients
Use mcp_client_config.json
as a universal configuration reference.
Environment Setup
-
Build the server:
npm run build
-
Set GitHub Token:
- Create a
.env
file with your GitHub token:GITHUB_TOKEN=your_github_token_here
- Or set it as an environment variable:
export GITHUB_TOKEN=your_github_token_here
- Create a
-
Get GitHub Token:
- Go to GitHub.com ā Settings ā Developer settings ā Personal access tokens
- Generate a new token with
repo
orpublic_repo
scope
Usage Examples
Analyze Test Framework
{
"tool": "analyze-test-framework",
"parameters": {
"owner": "facebook",
"repo": "react"
}
}
Find Test Files
{
"tool": "get-test-files",
"parameters": {
"owner": "lodash",
"repo": "lodash",
"framework": "jest"
}
}
Generate Test Case
{
"tool": "generate-test-case",
"parameters": {
"framework": "jest",
"testDescription": "calculate sum of two numbers",
"functionName": "add",
"testType": "unit"
}
}
Analyze Specific Test File
{
"tool": "analyze-test-file",
"parameters": {
"owner": "facebook",
"repo": "react",
"filePath": "packages/react/src/__tests__/React-test.js"
}
}
Read Repository File
{
"tool": "get-repo-file",
"parameters": {
"owner": "facebook",
"repo": "react",
"filePath": "package.json"
}
}
Testing
Run the test client:
npm run test-client
Server Commands
npm run build
- Build TypeScript to JavaScriptnpm run serve
- Build and start the servernpm run test-client
- Test the server with sample requests
Troubleshooting
- Authentication Issues: Make sure your GitHub token is valid and has appropriate permissions
- Rate Limits: Without a token, you're limited to 60 requests/hour. With a token: 5000/hour
- Repository Access: Ensure the repository is public or your token has access to private repos
- Build Issues: Make sure TypeScript compiles successfully with
npm run build
File Structure
calculator-server/
āāā src/index.ts # Main server code
āāā build/index.js # Compiled server
āāā claude_desktop_config.json # Claude Desktop config
āāā vscode_mcp_config.json # VS Code extension config
āāā mcp_client_config.json # Universal client config
āāā client-test.js # Test client
āāā .env # Environment variables
āāā package.json # Dependencies and scripts