An implementation of the Model Context Protocol (MCP) server for managing Claude's memory and knowledge graph.
You can install the package using uv
:
uvx memory-mcp-server
Or install it from the repository:
uv pip install git+https://github.com/estav/python-memory-mcp-server.git
Once installed, you can run the server using:
uvx memory-mcp-server
The server expects certain environment variables to be set:
DATABASE_URL
: SQLite database URL for storing the knowledge graphTo use this MCP server with Claude Desktop, add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"memory": {
"command": "uvx",
"args": ["memory-mcp-server"]
}
}
}
git clone https://github.com/estav/python-memory-mcp-server.git
cd python-memory-mcp-server
uv venv
source .venv/bin/activate
uv pip install -e ".[test]" # Include test dependencies
pytest # Run all tests
pytest -v # Run with verbose output
pytest -v --cov # Run with coverage report
python -m memory_mcp_server
The project uses pytest for testing. The test suite includes:
test_knowledge_graph_manager.py
: Tests for basic knowledge graph operationstest_optimized_knowledge_graph_manager.py
: Tests for optimized/batch operationstest_server.py
: Tests for MCP server implementation# Run all tests
pytest
# Run with coverage report
pytest --cov=memory_mcp_server
# Run specific test file
pytest tests/test_server.py
# Run tests with verbose output
pytest -v
The conftest.py
file provides common test fixtures:
temp_db_path
: Creates a temporary SQLite databaseknowledge_graph_manager
: Provides a KnowledgeGraphManager instanceoptimized_knowledge_graph_manager
: Provides an OptimizedKnowledgeGraphManager instanceThis project is licensed under the MIT License - see the LICENSE file for details.
{
"mcpServers": {
"memory": {
"env": {},
"args": [
"memory-mcp-server"
],
"command": "uvx"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.