Local Testing Agent MCP Server

Local Testing Agent MCP Server

A multi-language testing automation server that enables AI assistants to discover, plan, and execute tests across six major programming languages. It provides comprehensive tools for repository scanning, automated test execution, and detailed coverage reporting.

Category
访问服务器

README

Local Testing Agent MCP Server

A comprehensive multi-language testing automation MCP (Model Context Protocol) server that enables AI assistants like Claude to discover, plan, and execute tests across multiple programming languages.

License: MIT Python 3.11+

🌟 Features

  • Multi-Language Support: Automatically detect and test projects in 6 programming languages
  • Smart Test Discovery: Comprehensive pattern matching for test files across different frameworks
  • Automated Test Execution: Run language-specific test suites with proper frameworks
  • AI-Powered Test Planning: Generate intelligent test plans for Claude and other AI assistants
  • Comprehensive Reporting: JSON and Markdown reports with coverage maps
  • MCP Protocol: Seamless integration with Claude Code, Gravity, and other MCP clients

🔧 Supported Languages & Frameworks

Language File Extensions Test Framework Test Patterns
Python .py pytest test_*.py, *_test.py, tests/
JavaScript/TypeScript .js, .jsx, .ts, .tsx jest *.test.js, *.spec.ts, __tests__/
Go .go go test *_test.go
Rust .rs cargo test *_test.rs, tests/
Java .java Maven/Gradle *Test.java, test/
Ruby .rb RSpec/Minitest *_spec.rb, *_test.rb, spec/

📦 Installation

Prerequisites

  • Python 3.11 or higher
  • pip (Python package installer)

Setup

  1. Clone the repository:
git clone https://github.com/marcelkurvers/local-testing-agent.git
cd local-testing-agent
  1. Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Install language-specific test frameworks (optional, based on your needs):
# Python (already included)
pip install pytest

# JavaScript/TypeScript
npm install -g jest

# Go (already included with Go installation)
# Rust (already included with Cargo)
# Java - Maven or Gradle
# Ruby
gem install rspec

🚀 Usage

As an MCP Server

With Claude Code

The server auto-discovers when running Claude Code. No additional configuration needed.

With Gravity (Google Antigravity)

  1. Configure in ~/.gemini/antigravity/mcp_config.json:
{
  "mcpServers": {
    "local-testing-agent": {
      "command": "/path/to/local-testing-agent/.venv/bin/python",
      "args": [
        "/path/to/local-testing-agent/testing_agent.py"
      ],
      "env": {}
    }
  }
}
  1. Restart Gravity completely to register the MCP server.

MCP Tools Available

The server exposes three MCP tools:

1. scan_repository

Scans a project directory and detects source files and test files for all supported languages.

scan_repository(project_root=".")

Returns:

  • Snapshot file (.mcp_scan_snapshot.json)
  • Test plan file (TEST_PLAN_AI.md)
  • Language detection results

2. run_all_tests

Runs all detected tests for all languages with test files.

run_all_tests(project_root=".")

Returns:

  • Test report (.mcp_test_report.json)
  • Coverage map (TEST_COVERAGE_MAP.md)
  • Execution results for each framework

3. full_phase2_pipeline

Convenience tool that runs scan → plan → test → coverage in one call.

full_phase2_pipeline(project_root=".")

Standalone Usage

Run the MCP server directly:

python testing_agent.py

Or use the Phase 1 testing engine:

python -c "from testing_engine.pipeline import full_test_pipeline; full_test_pipeline('.')"

📊 Output Files

The MCP server generates several files:

  • .mcp_scan_snapshot.json: Complete scan results with all detected files
  • .mcp_test_report.json: Test execution results with pass/fail status
  • TEST_COVERAGE_MAP.md: Human-readable coverage summary
  • TEST_PLAN_AI.md: AI-generated test plan with suggestions

🏗️ Architecture

Project Structure

local-testing-agent/
├── testing_agent.py           # Phase 2 MCP server (main)
├── testing_engine/            # Phase 1 implementation
│   ├── file_scanner.py        # File discovery
│   ├── unit_test_generator.py # Test generation
│   └── pipeline.py            # Test orchestration
├── tests/                     # Test suite
│   ├── test_smoke.py         # Smoke tests
│   └── unit/                 # Unit tests
├── CLAUDE.md                  # Development guide
├── IMPROVEMENT_PLAN.md        # Roadmap
└── requirements.txt           # Dependencies

Key Components

  1. Language Detection (detect_languages): Walks the repository once and identifies all source and test files
  2. Test Planning (plan_test_runs): Creates execution plans based on detected files
  3. Test Execution (execute_planned_runs): Runs language-specific test commands
  4. Report Generation: Produces JSON and Markdown reports

🔍 Test Detection Patterns

The agent uses comprehensive patterns to detect test files:

  • Directory-based: tests/, test/, spec/, __tests__/
  • Naming conventions: test_*.py, *_test.go, *.spec.ts, *Test.java
  • Framework-specific: Adapts to Jest, RSpec, Minitest, etc.

⚙️ Configuration

Excluded Directories

The following directories are automatically excluded from scanning:

  • Virtual environments: .venv, venv, site-packages
  • Version control: .git
  • Build artifacts: dist, build, out
  • Caches: __pycache__, .cache, .pytest_cache, coverage
  • IDE/Editor: .vscode, .idea
  • Framework-specific: node_modules, .next, .turbo, .mcp

Customization

See CLAUDE.md for detailed development guidelines and customization options.

🧪 Testing

Run the test suite:

# Activate virtual environment
source .venv/bin/activate

# Run all tests
pytest

# Run with verbose output
pytest -v

# Run specific test file
pytest tests/test_smoke.py

🗺️ Roadmap

See IMPROVEMENT_PLAN.md for the complete phased improvement plan.

Completed ✅

  • Phase 1: Multi-language support (Python, JS/TS, Go, Rust, Java, Ruby)
  • Comprehensive test detection patterns
  • MCP protocol integration

In Progress 🚧

  • Phase 2: Parallel test execution
  • Phase 2: Coverage collection integration
  • Phase 3: Comprehensive test suite

Planned 📋

  • PHP and C# language support
  • Smart framework detection
  • Configuration system
  • Watch mode
  • CI/CD integration helpers

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with FastMCP for MCP protocol support
  • Designed for use with Claude Code
  • Compatible with Google Gravity (Antigravity)

📧 Contact

Marcel Kurvers - @marcelkurvers

Project Link: https://github.com/marcelkurvers/local-testing-agent


Note: This project is actively developed. See IMPROVEMENT_PLAN.md for upcoming features and enhancements.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选