MCP Testing Assistant

MCP Testing Assistant

Enables automated testing and coverage reporting for MCP services with test execution, file generation, and mock service creation. Provides comprehensive testing infrastructure including Jest integration, coverage reports, and health checks for the MCP ecosystem.

Category
Visit Server

README

MCP Testing Assistant

Automated testing and coverage reporting for MCP services in the ecosystem.

Overview

The MCP Testing Assistant provides comprehensive testing capabilities for all MCP services, including:

  • Automated test execution with Jest
  • Coverage reporting with c8
  • Test file generation using shared utilities
  • Mock service creation for testing
  • Testing infrastructure health checks

Installation

npm install

Usage

MCP Mode (Claude Desktop)

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "testing-assistant": {
      "command": "node",
      "args": ["/path/to/mcp-testing-assistant/start.js"],
      "env": {}
    }
  }
}

HTTP Mode

# Start HTTP bridge on port 9116
npm run http

# Or with custom port
SERVICE_PORT=9200 npm run http

Available Tools

run_tests

Run tests for a specific service or all services.

{
  service: "mcp-secrets-assistant",  // Optional, all services if not specified
  type: "unit",                      // unit, integration, e2e, or all
  coverage: true                     // Generate coverage report
}

generate_tests

Generate test files for a service using shared test utilities.

{
  service: "mcp-logs-assistant",
  tools: ["search_logs", "tail_logs"]  // List of tools to test
}

coverage_report

Generate coverage report for services.

{
  service: "mcp-gateway",  // Optional, all services if not specified
  format: "html"          // text, html, or json
}

test_health

Check testing infrastructure health.

{}  // No parameters required

create_mock

Create a mock service for testing.

{
  service: "mcp-secrets-assistant",
  port: 9300,
  responses: {
    "/health": { status: "healthy", mock: true },
    "/api/tools": { tools: [] }
  }
}

REST API Endpoints

When running in HTTP mode:

  • GET /health - Service health check
  • GET /api/tools - List available tools
  • POST /api/execute - Execute a tool
  • GET /test-results/:service - Get test results for a service
  • GET /coverage-summary - Get coverage summary for all services

CLI Commands

# Run coverage report
node index.js coverage [service]

# Generate tests
node index.js generate <service>

# Start in MCP mode
npm start

# Start in HTTP mode
npm run http

Development

# Run in development mode with auto-reload
npm run dev

# Run tests
npm test

Configuration

Environment Variables

  • SERVICE_PORT - HTTP bridge port (default: 9116)
  • LOG_LEVEL - Logging level (default: info)
  • ALLOWED_ORIGINS - CORS allowed origins

Data Storage

Test results and coverage reports are stored in:

~/Documents/mcp-assistant/data/testing/
├── results/      # Test execution results
├── coverage/     # Coverage reports
└── mocks/        # Mock service definitions

Integration with Ecosystem

The Testing Assistant integrates with:

  • Gateway: Accessible via /api/proxy/testing/*
  • Launch Assistant: Can be managed as a service
  • Logs Assistant: Test execution logs are centralized

Best Practices

  1. Regular Testing: Run tests before deploying changes
  2. Coverage Goals: Aim for >80% code coverage
  3. Test Categories: Organize tests by type (unit, integration, e2e)
  4. Mock Services: Use mocks for external dependencies
  5. Continuous Integration: Integrate with CI/CD pipelines

Troubleshooting

Tests Not Found

  • Ensure test files follow naming convention: *.test.js
  • Check that services have a tests/ directory

Coverage Not Generated

  • Verify c8 is installed: npm list c8
  • Check for .c8rc.json configuration

Mock Service Issues

  • Ensure port is not in use
  • Check mock responses are valid JSON

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured