Skip to main content
Glama
verify_fixes.py4.21 kB
#!/usr/bin/env python3 """Verification script for all implemented fixes.""" import sys def verify_app_py(): """Verify app.py fixes.""" print("Checking app.py...") with open('app.py', 'r') as f: content = f.read() # Check 1: No self.session.timeout if 'self.session.timeout' in content: print(" ❌ FAIL: self.session.timeout still exists") return False print(" ✓ Timeout attribute removed") # Check 2: All get() calls have timeout=30 if content.count('timeout=30') != 3: print(f" ❌ FAIL: Expected 3 timeout=30, found {content.count('timeout=30')}") return False print(" ✓ All 3 HTTP requests have timeout=30") # Check 3: import sys exists if 'import sys' not in content: print(" ❌ FAIL: import sys not found") return False print(" ✓ sys module imported") # Check 4: No print() statements if 'print(' in content: print(" ❌ FAIL: print() statements still exist") return False print(" ✓ No print() statements") # Check 5: sys.stderr.write exists 3 times if content.count('sys.stderr.write') != 3: print(f" ❌ FAIL: Expected 3 sys.stderr.write, found {content.count('sys.stderr.write')}") return False print(" ✓ All 3 error messages use sys.stderr.write") return True def verify_readme(): """Verify README.md encoding.""" print("\nChecking README.md...") try: with open('README.md', 'r', encoding='utf-8') as f: content = f.read() # Check for proper UTF-8 Turkish characters if 'SpaceX MCP' not in content: print(" ❌ FAIL: Title not found") return False print(" ✓ File is readable as UTF-8") if 'Özellikler' not in content: print(" ❌ FAIL: Turkish characters not rendering correctly") return False print(" ✓ Turkish characters render correctly") return True except UnicodeDecodeError: print(" ❌ FAIL: File is not UTF-8 encoded") return False def verify_smithery_yaml(): """Verify smithery.yaml has no apiKey.""" print("\nChecking smithery.yaml...") with open('smithery.yaml', 'r') as f: content = f.read() if 'apiKey' in content: print(" ❌ FAIL: apiKey still present") return False print(" ✓ apiKey configuration removed") if 'configSchema' in content: print(" ❌ FAIL: configSchema still present") return False print(" ✓ configSchema removed") return True def verify_new_files(): """Verify new files exist.""" print("\nChecking new files...") import os files = { '.gitignore': 'Python patterns gitignore', 'LICENSE': 'MIT License', 'requirements-dev.txt': 'Test dependencies', 'test_app.py': 'App tests', 'test_server.py': 'Server tests' } all_exist = True for filename, desc in files.items(): if os.path.exists(filename): print(f" ✓ {filename} exists ({desc})") else: print(f" ❌ FAIL: {filename} missing") all_exist = False return all_exist def main(): """Run all verifications.""" print("=" * 60) print("VERIFYING ALL FIXES") print("=" * 60) results = [] results.append(("app.py fixes", verify_app_py())) results.append(("README.md encoding", verify_readme())) results.append(("smithery.yaml cleanup", verify_smithery_yaml())) results.append(("New files", verify_new_files())) print("\n" + "=" * 60) print("RESULTS SUMMARY") print("=" * 60) all_passed = True for name, result in results: status = "✓ PASS" if result else "❌ FAIL" print(f"{status}: {name}") if not result: all_passed = False print("=" * 60) if all_passed: print("✓ ALL FIXES VERIFIED SUCCESSFULLY!") return 0 else: print("❌ SOME FIXES FAILED VERIFICATION") return 1 if __name__ == "__main__": sys.exit(main())

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/rftsngl/SpaceX-mcp'

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