Skip to main content
Glama

Smart Code Search MCP Server

test_server.pyโ€ข2.06 kB
#!/usr/bin/env python3 """ Test harness for SCS MCP Server """ import json import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent)) def test_imports(): """Test that all modules can be imported""" print("๐Ÿงช Testing imports...") try: from src.core.search import SmartCodeSearch print(" โœ… SmartCodeSearch imported") from src.server import SCSMCPServer print(" โœ… SCSMCPServer imported") return True except Exception as e: print(f" โŒ Import failed: {e}") return False def test_search_instance(): """Test creating a search instance""" print("๐Ÿงช Testing search instance creation...") try: from src.core.search import SmartCodeSearch instance = SmartCodeSearch(".", quiet=True) print(" โœ… Search instance created") return True except Exception as e: print(f" โŒ Failed to create instance: {e}") return False def test_server_creation(): """Test creating the MCP server""" print("๐Ÿงช Testing MCP server creation...") try: from src.server import SCSMCPServer server = SCSMCPServer() print(" โœ… MCP server created") print(f" ๐Ÿ“Š Tools registered: {len(server.project_instances)} projects cached") return True except Exception as e: print(f" โŒ Failed to create server: {e}") return False def main(): print("๐Ÿš€ SCS MCP Server Test Suite\n") tests = [ test_imports, test_search_instance, test_server_creation ] passed = 0 failed = 0 for test in tests: if test(): passed += 1 else: failed += 1 print() print(f"๐Ÿ“Š Results: {passed} passed, {failed} failed") if failed == 0: print("โœจ All tests passed!") return 0 else: print("โŒ Some tests failed") 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/stevenjjobson/scs-mcp'

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