Skip to main content

Associative Memory MCP Server for LLMs - Knowledge management system with hierarchical scope organization

Project description

CI Coverage License: MIT PyPI

MCP Associative Memory Server

๐Ÿง  Production-Ready Intelligent Memory System - Store, search, and discover knowledge connections using the Model Context Protocol (MCP) with 74/74 tests passing and complete CI/CD pipeline.

๐Ÿ† Production Status (July 2025)

โœ… ENTERPRISE-READY:

  • 74/74 tests passing (100% success rate)
  • Complete CI/CD pipeline with security and quality gates
  • 10 MCP tools for comprehensive memory management
  • Sub-second performance with optimized vector search
  • Docker containerized for production deployment

๐ŸŒŸ Overview

Transform your development workflow with an AI-powered memory system that:

  • Stores insights from your daily work and learning
  • Finds related knowledge when you need it most
  • Discovers unexpected connections between ideas
  • Organizes knowledge in intuitive hierarchical scopes
  • Syncs across environments for seamless workflow integration

Built with FastMCP 2.0 for modern LLM integration, optimized for GitHub Copilot workflows.

โœจ Key Features

๐Ÿง  Intelligent Memory Operations

  • Semantic Search: Find relevant memories using natural language queries
  • Association Discovery: Automatically discover connections between concepts
  • Complete CRUD: Create, Read, Update, Delete with full lifecycle management
  • Smart Organization: Hierarchical scopes with auto-categorization

๐Ÿ” Advanced Discovery

  • Top-K Search: Optimized threshold (0.1) with LLM-guided relevance judgment
  • Cross-Scope Associations: Find connections across different knowledge scopes
  • Similarity Scoring: Transparent relevance metrics for intelligent filtering
  • Creative Connections: Discover unexpected relationships for innovation

๐Ÿ—‚๏ธ Powerful Organization

  • Hierarchical Scopes: work/projects/name, learning/technology, personal/ideas
  • Flexible Categorization: Tags, metadata, and automatic scope suggestions
  • Session Management: Temporary workspaces for project isolation
  • Memory Movement: Reorganize knowledge as understanding evolves

๐Ÿ”„ Cross-Environment Sync

  • Export/Import: Backup and restore memories across development environments
  • Multiple Formats: JSON, YAML with compression support
  • Merge Strategies: Handle duplicates intelligently during sync
  • Git Workflow: Integrate memory backup into version control processes

๐Ÿ› ๏ธ Developer Experience

  • GitHub Copilot Integration: Natural language memory operations
  • VS Code Tasks: One-click server management and maintenance
  • Real-time Association: Automatic relationship discovery during storage
  • Performance Optimized: Sub-second search across thousands of memories
  • Response Level Control: Minimal, standard, or full detail responses for optimal token usage

โšก Smart Response Levels

Control response detail and token usage with three intelligent levels:

  • minimal: Essential information only (~50 tokens) - Perfect for status checks and basic operations
  • standard: Balanced detail for workflow continuity (default) - Optimal for most use cases
  • full: Comprehensive data including metadata, associations, and analysis - Ideal for debugging and detailed exploration

Example Usage:

# Quick status check
memory_store(content="meeting notes", response_level="minimal")
# Returns: {"success": true, "message": "Memory stored", "memory_id": "..."}

# Full debugging info
memory_search(query="project ideas", response_level="full") 
# Returns: Complete results with similarity scores, metadata, associations

๐ŸŽฏ Complete MCP Tool Suite

๐Ÿš€ Modern API (10 Clean Tools)

Core Operations (Primary API)

  • memory_store - Store new memories with auto-association
  • memory_search - Unified search with standard and diversified modes
  • memory_manage - Get, update, and delete memory operations
  • memory_sync - Import and export memories for backup/sync

Discovery and Analysis

  • memory_discover_associations - Find semantically related memories
  • memory_list_all - Browse complete memory collection with pagination

Organization Management

  • scope_list - Browse hierarchical memory organization
  • scope_suggest - AI-powered scope recommendations
  • memory_move - Reorganize memories into better categories

Session Management

  • session_manage - Create, list, and cleanup temporary working sessions

๐ŸŽฏ Clean, Modern API

All tools use intuitive, natural names with powerful unified interfaces for better developer experience.

๐Ÿ“š Comprehensive Documentation

๐Ÿš€ Quick Start Guide

Get up and running in 5 minutes with essential commands and patterns.

๐Ÿ’ก Best Practices

Comprehensive guide to optimizing your associative memory workflow.

๐Ÿ”ง API Reference

Complete technical documentation for all MCP tools and parameters.

๐Ÿข Real-World Examples

Practical usage patterns for developers, teams, and organizations.

๐Ÿ†˜ Troubleshooting Guide

Solutions for common issues and system maintenance procedures.

๐Ÿ“Š Sample Data

Ready-to-import memory dataset with 28 curated memories demonstrating system capabilities.

๐Ÿš€ Complete Documentation โ†’

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   LLM Client    โ”‚โ”€โ”€โ”€โ”€โ”‚  FastMCP Server โ”‚โ”€โ”€โ”€โ”€โ”‚  Memory Store   โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ - Claude        โ”‚    โ”‚ - @app.tool()   โ”‚    โ”‚ - ChromaDB      โ”‚
โ”‚ - ChatGPT       โ”‚    โ”‚ - @app.resource()โ”‚   โ”‚ - SQLite        โ”‚
โ”‚ - Custom LLM    โ”‚    โ”‚ - @app.prompt() โ”‚    โ”‚ - NetworkX      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Technology Stack

  • Language: Python 3.11+
  • MCP Framework: FastMCP 2.0
  • Vector Database: ChromaDB
  • Embedding Model: OpenAI Embeddings / Sentence Transformers
  • Graph Database: NetworkX (in-memory)
  • Storage: SQLite (metadata)

Installation & Usage

For detailed setup instructions, see docs/installation.md.

Server Startup

Recommended: FastMCP Server (STDIO default)

Official startup method:

python -m mcp_assoc_memory

The server always starts in STDIO mode by default for MCP client integration. The legacy mcp-server command is deprecated and no longer provided.

Environment Variables

  • OPENAI_API_KEY: Required for OpenAI embeddings
  • MCP_LOG_LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)

Server Control Scripts

  • Start: ./scripts/mcp_server_daemon.sh start
  • Stop: ./scripts/mcp_server_daemon.sh stop
  • Restart: ./scripts/mcp_server_daemon.sh restart
  • Status: ./scripts/mcp_server_daemon.sh status

Logs & PID Files

  • Logs: logs/mcp_server.log
  • PID: logs/mcp_server.pid

๐Ÿ› ๏ธ Installation (PyPI, pipx, GitHub)

Recommended: PyPI (after publish)

pip install mcp-assoc-memory

pipx (isolated global install)

pipx install mcp-assoc-memory

GitHub (latest/dev version)

pip install git+https://github.com/mako10k/mcp-assoc-memory.git
# or
pipx install git+https://github.com/mako10k/mcp-assoc-memory.git

Start the server (after install)

python -m mcp_assoc_memory
  • MCPใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚„่‡ชๅ‹•ๆคœๅ‡บใƒ„ใƒผใƒซ๏ผˆClaude Desktop Extensions, FastMCP, Cursor็ญ‰๏ผ‰ใ‹ใ‚‰ใ‚‚่‡ชๅ‹•่ช่ญ˜ใ•ใ‚Œใพใ™ใ€‚
  • Dockerใ‚คใƒกใƒผใ‚ธใ‚‚่ฟ‘ๆ—ฅๅ…ฌ้–‹ไบˆๅฎšใ€‚

Developer Information

Development Guidelines

๐Ÿค– AI Development Agent: development/workflow/AGENT.md
๐Ÿ“‹ GitHub Copilot Rules: .github/copilot-instructions.md
๐Ÿ”„ Development Workflow: development/workflow/DEVELOPER_GUIDELINES.md


โœ… Quality Status

All code passes mypy (type check), flake8 (lint), and pytest (unit/integration tests) as of July 2025.
CI/CD pipeline enforces these checks for every commit.

Technical Reference

Contributing

  1. Check development guidelines before contributing
  2. Review architecture documentation for system understanding
  3. Follow GitHub Copilot instructions for AI-assisted development
  4. Update relevant documentation when making changes

๐Ÿš€ Quick Start

1. Clone the repository

git clone https://github.com/mako10k/mcp-assoc-memory.git
cd mcp-assoc-memory

2. Set up your environment

python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate  # Windows

3. Install dependencies

pip install -r requirements.txt
pip install -r requirements-dev.txt

4. Run tests and linting

python scripts/smart_lint.py
pytest tests/ -v

5. Start the MCP server

./scripts/mcp_server_daemon.sh start

For Docker users:

docker-compose up --build

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_assoc_memory-0.1.1.tar.gz (118.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_assoc_memory-0.1.1-py3-none-any.whl (134.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_assoc_memory-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_assoc_memory-0.1.1.tar.gz
  • Upload date:
  • Size: 118.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.6

File hashes

Hashes for mcp_assoc_memory-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbc579299e6db38d6701e0502d4585bf0557d6de61445a031adeeb6f10905291
MD5 1a8aafa8406eac6bd1739f864e0ffa6b
BLAKE2b-256 9f1f88375d10627f315ed50acd7060a9ab41b16cbbb5daa52e56695869235880

See more details on using hashes here.

File details

Details for the file mcp_assoc_memory-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_assoc_memory-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c89b97e48e5662fc8cadd7ac5bd366a9aed311b282db84d858f343bd3765303
MD5 e3d5738f6a867ea4bcce3177ea825d6a
BLAKE2b-256 2eeb86fa882782c880ff99300a603215df47d4454db91089e5afb3a84174c438

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page