MCP ExplorerExplorer

Evangstav Python Memory Mcp Server

@MCP-Mirroron a year ago
1 MIT
FreeCommunity
AI Systems
Mirror of https://github.com/evangstav/python-memory-mcp-server

Overview

What is Evangstav Python Memory Mcp Server

The evangstav_python-memory-mcp-server is an implementation of the Model Context Protocol (MCP) server designed for managing Claude’s memory and knowledge graph.

Use cases

Use cases include AI chatbots that require memory of past interactions, applications that need to store and retrieve contextual information, and systems that utilize knowledge graphs for enhanced decision-making.

How to use

To use the server, install it using ‘uvx memory-mcp-server’ or from the repository with ‘uv pip install git+https://github.com/estav/python-memory-mcp-server.git’. After installation, run the server with ‘uvx memory-mcp-server’. Ensure to set the required environment variables, such as ‘DATABASE_URL’ for the SQLite database.

Key features

Key features include the ability to manage a knowledge graph, integration with Claude Desktop, and support for testing with pytest. The server also allows for configuration through environment variables.

Where to use

This MCP server can be used in applications requiring memory management and knowledge graph functionalities, particularly in AI systems that need to maintain context over interactions.

Content

Memory MCP Server

An implementation of the Model Context Protocol (MCP) server for managing Claude’s memory and knowledge graph.

Installation

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

Usage

Once installed, you can run the server using:

uvx memory-mcp-server

Configuration

The server expects certain environment variables to be set:

  • DATABASE_URL: SQLite database URL for storing the knowledge graph
  • Add any other configuration variables here…

Integration with Claude Desktop

To use this MCP server with Claude Desktop, add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "memory": {
      "command": "uvx",
      "args": [
        "memory-mcp-server"
      ]
    }
  }
}

Development

  1. Clone the repository:
git clone https://github.com/estav/python-memory-mcp-server.git
cd python-memory-mcp-server
  1. Create a virtual environment and install dependencies:
uv venv
source .venv/bin/activate
uv pip install -e ".[test]"  # Include test dependencies
  1. Run tests:
pytest                    # Run all tests
pytest -v                # Run with verbose output
pytest -v --cov         # Run with coverage report
  1. Run the server locally:
python -m memory_mcp_server

Testing

The project uses pytest for testing. The test suite includes:

Unit Tests

  • test_knowledge_graph_manager.py: Tests for basic knowledge graph operations
  • test_optimized_knowledge_graph_manager.py: Tests for optimized/batch operations
  • test_server.py: Tests for MCP server implementation

Running Tests

# 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

Test Fixtures

The conftest.py file provides common test fixtures:

  • temp_db_path: Creates a temporary SQLite database
  • knowledge_graph_manager: Provides a KnowledgeGraphManager instance
  • optimized_knowledge_graph_manager: Provides an OptimizedKnowledgeGraphManager instance

License

This project is licensed under the MIT License - see the LICENSE file for details.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers