Skip to main content
Glama

Memory MCP

by drdee
conftest.py1.17 kB
"""Pytest fixtures for the memory-mcp package.""" import os import pytest import tempfile from memory_mcp.server import DatabaseManager @pytest.fixture def temp_db_path(): """Create a temporary database file path.""" with tempfile.NamedTemporaryFile(delete=False, suffix=".db") as tmp: db_path = tmp.name yield db_path # Clean up the temporary file after the test if os.path.exists(db_path): os.unlink(db_path) @pytest.fixture def db_manager(temp_db_path): """Create a database manager with a temporary database.""" manager = DatabaseManager(db_path=temp_db_path) yield manager manager.close() @pytest.fixture def sample_memories(db_manager): """Create sample memories in the database.""" memory_ids = [] # Add some test memories memory_ids.append( db_manager.add_memory("Test Memory 1", "This is the content of test memory 1") ) memory_ids.append( db_manager.add_memory("Test Memory 2", "This is the content of test memory 2") ) memory_ids.append( db_manager.add_memory("Another Memory", "This is another test memory") ) return memory_ids

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/drdee/memory-mcp'

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