Jake Shore f3c4cd817b Add all MCP servers + factory infra to MCPEngine — 2026-02-06
=== 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.
2026-02-06 06:32:29 -05:00

112 lines
2.9 KiB
Python

#!/usr/bin/env python3
# Copyright (c) 2025 Scott Wilcox
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
MCP HTTP Testing Command Line Interface
A command-line interface for testing MCP HTTP server implementations.
"""
import argparse
import os.path
import subprocess
import sys
from .tester import MCPHttpTester
from .utils import wait_for_server
def run_http_tester(url, debug=False, protocol_version="2025-03-26", oauth=False):
"""
Run the HTTP tester against a server.
Args:
url: The server URL to test
debug: Whether to enable debug output
protocol_version: The protocol version to test
oauth: Whether to enable OAuth 2.1 authentication testing
Returns:
True if all tests passed, False otherwise
"""
# Ensure URL ends with /mcp if it doesn't already have a path
from urllib.parse import urlparse
parsed = urlparse(url)
if not parsed.path or parsed.path == '/':
url = url.rstrip('/') + '/mcp'
tester = MCPHttpTester(url, debug)
tester.protocol_version = protocol_version
# Always run comprehensive tests (includes OAuth if enabled)
if oauth:
return tester.run_comprehensive_tests()
else:
return tester.run_all_tests()
def main():
"""Main entry point for the CLI."""
parser = argparse.ArgumentParser(
description="Run MCP HTTP compliance tests against an MCP HTTP server."
)
parser.add_argument(
"--server-url",
default="http://localhost:9000/mcp",
help="URL of the MCP HTTP server to test"
)
parser.add_argument(
"--debug",
action="store_true",
help="Enable debug output"
)
parser.add_argument(
"--protocol-version",
choices=["2024-11-05", "2025-03-26", "2025-06-18"],
default="2025-06-18",
help="MCP protocol version to test"
)
parser.add_argument(
"--max-retries",
type=int,
default=3,
help="Maximum number of connection retries"
)
parser.add_argument(
"--retry-interval",
type=int,
default=2,
help="Seconds to wait between connection retries"
)
parser.add_argument(
"--oauth",
action="store_true",
help="Enable OAuth 2.1 authentication testing"
)
args = parser.parse_args()
# Check server connection first
if not wait_for_server(
args.server_url,
max_retries=args.max_retries,
retry_interval=args.retry_interval
):
return 1
# Run the tester
success = run_http_tester(
args.server_url,
args.debug,
args.protocol_version,
args.oauth
)
if success:
print("All HTTP tests passed!")
return 0
else:
print("Some HTTP tests failed", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())