Skip to main content
Glama

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

Related MCP server: MCP HTTP Requests

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

-
security - not tested
-
license - not tested
-
quality - not tested

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

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/mcpassistant/mcp-testing-assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server