test-automation-mcp-server

A Test Automation MCP Server that analyzes GitHub repositories to detect test frameworks and generate automated test cases

GitHub Stars

0

User Rating

Not Rated

Favorites

0

Views

4

Forks

0

Issues

0

README
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
  1. Build the server:

    npm run build
    
  2. 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
      
  3. Get GitHub Token:

    • Go to GitHub.com β†’ Settings β†’ Developer settings β†’ Personal access tokens
    • Generate a new token with repo or public_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 JavaScript
  • npm run serve - Build and start the server
  • npm run test-client - Test the server with sample requests
Troubleshooting
  1. Authentication Issues: Make sure your GitHub token is valid and has appropriate permissions
  2. Rate Limits: Without a token, you're limited to 60 requests/hour. With a token: 5000/hour
  3. Repository Access: Ensure the repository is public or your token has access to private repos
  4. 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
Author Information
Rahul Kumar

I am Rahul , open source enthusiast . Associated with google summer of code for quiet some time . @epam

epam systemsHyderabad

2

Followers

33

Repositories

0

Gists

0

Total Contributions