Skip to main content
Glama

MCP Memory Server

by hannesnortje
test_components.pyโ€ข2.07 kB
#!/usr/bin/env python3 """ Simple test to verify MCP server functionality """ import asyncio import sys from pathlib import Path # Add src to path sys.path.insert(0, str(Path(__file__).parent)) from src.memory_manager import QdrantMemoryManager from src.markdown_processor import MarkdownProcessor async def test_components(): """Test individual components.""" print("๐Ÿงช Testing MCP Memory Server Components...") # Test markdown processor print("\n๐Ÿ“ Testing Markdown Processor...") processor = MarkdownProcessor() test_content = """# Test Document This is a test with multiple spaces and formatting. ## Section 1 - Item 1 - Item 2 Some content here. """ cleaned = processor.clean_content(test_content) print(f"โœ… Content cleaned ({len(cleaned)} chars)") # Test memory manager print("\n๐Ÿง  Testing Memory Manager...") try: manager = QdrantMemoryManager() await manager.initialize() print("โœ… Memory manager initialized") # Test adding content hash_id = await manager.add_to_memory( content="Test content for memory", memory_type="global", metadata={"source": "test"} ) print(f"โœ… Content added to global memory (ID: {hash_id[:8]}...)") # Test query results = await manager.query_memory("test content", memory_type="global") print(f"โœ… Query returned {len(results)} results") # Test duplicate detection is_duplicate = await manager.check_duplicate("Test content for memory", "global") print(f"โœ… Duplicate detection: {is_duplicate}") await manager.cleanup() print("โœ… Memory manager cleanup completed") except Exception as e: print(f"โŒ Memory manager test failed: {e}") return False print("\n๐ŸŽ‰ All component tests passed!") return True if __name__ == "__main__": success = asyncio.run(test_components()) sys.exit(0 if success else 1)

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/hannesnortje/MCP'

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