Associative Memory MCP Server for LLMs - Knowledge management system with hierarchical scope organization
Project description
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 operationsstandard: Balanced detail for workflow continuity (default) - Optimal for most use casesfull: 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-associationmemory_search- Unified search with standard and diversified modesmemory_manage- Get, update, and delete memory operationsmemory_sync- Import and export memories for backup/sync
Discovery and Analysis
memory_discover_associations- Find semantically related memoriesmemory_list_all- Browse complete memory collection with pagination
Organization Management
scope_list- Browse hierarchical memory organizationscope_suggest- AI-powered scope recommendationsmemory_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
Direct STDIO Mode (Recommended)
Standard MCP startup method:
python -m mcp_assoc_memory.server --config config.json
The server operates in STDIO mode for direct MCP client integration. This is the recommended approach for VS Code Copilot and other MCP clients.
Configuration
- Copy
config.json.templatetoconfig.json - Set your OpenAI API key for embeddings
- Configure transport options (STDIO enabled by default)
Environment Variables
OPENAI_API_KEY: Required for OpenAI embeddingsMCP_LOG_LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)
๐ ๏ธ Installation (PyPI, pipx, GitHub)
Recommended: PyPI
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.server --config config.json
- Configure via
.vscode/mcp.jsonfor VS Code Copilot integration - 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
- System Architecture - Architecture and structure documentation
- Technical Specifications - API specs and feature details
- Security & Configuration - Authentication and transport configuration
- Knowledge Base - Curated development knowledge
- Complete Development Docs โ
Contributing
- Check development guidelines before contributing
- Review architecture documentation for system understanding
- Follow GitHub Copilot instructions for AI-assisted development
- 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
python -m mcp_assoc_memory.server --config config.json
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_assoc_memory-0.1.4.tar.gz.
File metadata
- Download URL: mcp_assoc_memory-0.1.4.tar.gz
- Upload date:
- Size: 123.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04ccec78e9494bed7b265aa4cf9741690cc1658a5b46c6c2451399c557a74852
|
|
| MD5 |
91bfd131e5fa543008825949404127ab
|
|
| BLAKE2b-256 |
7422b3c1643de07fdad8da1f16aa3f344ecfc23d080117dee2a47b266b7e0734
|
File details
Details for the file mcp_assoc_memory-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mcp_assoc_memory-0.1.4-py3-none-any.whl
- Upload date:
- Size: 139.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b574d02fc2eadedb89be4dd6b60e71c497f5ad3705c9bbbf16e10ea51f7fd33
|
|
| MD5 |
e62f7f4b23fd586d1445af547e812625
|
|
| BLAKE2b-256 |
5da4032146f8d543344f1742794b03a0737d9308a4fc01a8d33313b7c4907686
|