quick_test.pyโข1.27 kB
#!/usr/bin/env python3
"""
Quick test to verify MCP server functionality
"""
import sys
from pathlib import Path
# Add src to path
sys.path.insert(0, str(Path(__file__).parent / "src"))
print("๐ Quick MCP Server Test")
print("=" * 25)
try:
# Test imports
from core.server import MCPServer, MCPServerInfo
from core.testing import MCPServerTester
print("โ
All imports successful!")
# Test server creation
server = MCPServer(host="localhost", port=8000, debug=True)
print("โ
Server created successfully!")
# Test tester creation
tester = MCPServerTester()
print("โ
Tester created successfully!")
# Test built-in tools
tools = server.builtin_tools
print(f"โ
Found {len(tools)} built-in tools:")
for tool_name in tools:
print(f" - {tool_name}")
print("\n๐ All tests passed!")
print("\n๐ก Your MCP Testing Harness is ready!")
print(" You can now:")
print(" 1. Start the server: py -3 start_server.py")
print(" 2. Test with client: py -3 test_client.py")
print(" 3. Use with any MCP client")
except Exception as e:
print(f"โ Error: {e}")
import traceback
traceback.print_exc()