Skip to main content
Glama

MCP Learning Project

by BerdTan
basic_test.pyโ€ข2.52 kB
#!/usr/bin/env python3 """ Basic test to verify Python and our setup """ print("๐Ÿš€ Basic MCP Testing Harness Test") print("=" * 35) # Test 1: Python is working print("\nโœ… Python is working!") # Test 2: Check if we can import basic modules try: import asyncio import json import logging import sys from pathlib import Path print("โœ… Basic imports successful!") except ImportError as e: print(f"โŒ Basic import error: {e}") exit(1) # Test 3: Check if our directories exist try: src_path = Path("src") if src_path.exists(): print("โœ… src directory exists") else: print("โŒ src directory not found") exit(1) core_path = src_path / "core" if core_path.exists(): print("โœ… core directory exists") else: print("โŒ core directory not found") exit(1) server_file = core_path / "server.py" if server_file.exists(): print("โœ… server.py exists") else: print("โŒ server.py not found") exit(1) testing_file = core_path / "testing.py" if testing_file.exists(): print("โœ… testing.py exists") else: print("โŒ testing.py not found") exit(1) except Exception as e: print(f"โŒ File check error: {e}") exit(1) # Test 4: Try to read our server file try: with open("src/core/server.py", "r") as f: content = f.read() if "class MCPServer" in content: print("โœ… MCPServer class found in server.py") else: print("โŒ MCPServer class not found in server.py") with open("src/core/testing.py", "r") as f: content = f.read() if "class MCPServerTester" in content: print("โœ… MCPServerTester class found in testing.py") else: print("โŒ MCPServerTester class not found in testing.py") except Exception as e: print(f"โŒ File reading error: {e}") print("\n๐ŸŽ‰ Basic setup verification completed!") print("\n๐Ÿ“‹ Summary:") print(" โœ… Python is working") print(" โœ… Basic imports successful") print(" โœ… Project structure verified") print(" โœ… Core files exist") print("\n๐Ÿ’ก Next steps:") print(" 1. Install dependencies: pip install pydantic-settings python-dotenv") print(" 2. Run the full test: python test_server.py") print(" 3. Start the server: python src/main.py")

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/BerdTan/mcpharness'

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