=== NEW SERVERS ADDED (7) === - servers/closebot — 119 tools, 14 modules, 4,656 lines TS (Stage 7) - servers/google-console — Google Search Console MCP (Stage 7) - servers/meta-ads — Meta/Facebook Ads MCP (Stage 8) - servers/twilio — Twilio communications MCP (Stage 8) - servers/competitor-research — Competitive intel MCP (Stage 6) - servers/n8n-apps — n8n workflow MCP apps (Stage 6) - servers/reonomy — Commercial real estate MCP (Stage 1) === FACTORY INFRASTRUCTURE ADDED === - infra/factory-tools — mcp-jest, mcp-validator, mcp-add, MCP Inspector - 60 test configs, 702 auto-generated test cases - All 30 servers score 100/100 protocol compliance - infra/command-center — Pipeline state, operator playbook, dashboard config - infra/factory-reviews — Automated eval reports === DOCS ADDED === - docs/MCP-FACTORY.md — Factory overview - docs/reports/ — 5 pipeline evaluation reports - docs/research/ — Browser MCP research === RULES ESTABLISHED === - CONTRIBUTING.md — All MCP work MUST go in this repo - README.md — Full inventory of 37 servers + infra docs - .gitignore — Updated for Python venvs TOTAL: 37 MCP servers + full factory pipeline in one repo. This is now the single source of truth for all MCP work.
3.0 KiB
3.0 KiB
Copyright (c) 2025 Scott Wilcox
SPDX-License-Identifier: AGPL-3.0-or-later
MCP Testing Utilities
This directory contains common utility functions and classes used throughout the MCP testing framework.
Components
- runner.py: Contains test runner functionality to execute test suites against MCP servers
- reporter.py: Implements reporting tools to generate test reports in various formats
Test Runner
The test runner is responsible for executing test cases against MCP servers in a standardized way. It handles:
- Test discovery and filtering
- Test execution and result collection
- Error handling and reporting
- Test timing and performance metrics
Usage example:
from mcp_testing.utils.runner import TestRunner
from mcp_testing.protocols import get_protocol
from mcp_testing.transports.stdio import STDIOTransport
# Create a transport
transport = STDIOTransport("python /path/to/server.py")
# Get protocol
protocol = get_protocol("2025-03-26")
# Create and run test runner
runner = TestRunner(transport, protocol)
results = runner.run_tests(categories=["initialization", "tools"])
# Access results
for test_name, result in results.items():
print(f"{test_name}: {'PASS' if result.passed else 'FAIL'}")
Reporter
The reporter module generates formatted test reports in different output formats (text, HTML, JSON, Markdown). Features include:
- Summary statistics (pass/fail counts, timing)
- Detailed test results
- Specification compliance reporting
- Visual indicators for pass/fail status
Usage example:
from mcp_testing.utils.reporter import TestReporter
from mcp_testing.utils.runner import TestRunner
# Run tests
runner = TestRunner(transport, protocol)
results = runner.run_tests()
# Generate report
reporter = TestReporter(results)
# Generate different formats
reporter.generate_text_report("report.txt")
reporter.generate_html_report("report.html")
reporter.generate_json_report("report.json")
reporter.generate_markdown_report("report.md")
Adding New Utilities
When adding new utility functions or classes:
- Determine whether they belong in an existing file or warrant a new file
- Ensure proper documentation with docstrings
- Keep single responsibility principle in mind
- Add appropriate error handling
- Consider writing tests for the utility functions themselves
If creating a new utility file, follow this structure:
# Copyright (c) 2025 Scott Wilcox
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Brief description of the utility module.
"""
import necessary_modules
def utility_function(param1, param2):
"""
Description of what the function does.
Args:
param1: Description of param1
param2: Description of param2
Returns:
Description of return value
"""
# Implementation
pass
class UtilityClass:
"""
Description of the utility class.
"""
def __init__(self, ...):
"""Initialize the class."""
pass
def method(self, ...):
"""Description of method."""
pass