# Enhanced MCP Memory
> **โก Optimized for Claude Sonnet 4** - This MCP server works best with Claude Sonnet 4 for optimal performance and AI-powered features.
An enhanced MCP (Model Context Protocol) server for intelligent memory and task management, designed for AI assistants and development workflows. Features semantic search, automatic task extraction, knowledge graphs, and comprehensive project management.
## โจ Key Features
### ๐ง Intelligent Memory Management
- **Semantic search** using sentence-transformers for natural language queries
- **Automatic memory classification** with importance scoring
- **Duplicate detection** and content deduplication
- **File path associations** for code-memory relationships
- **Knowledge graph relationships** with automatic similarity detection
### ๐ Advanced Task Management
- **Auto-task extraction** from conversations and code comments
- **Priority and category management** with validation
- **Status tracking** (pending, in_progress, completed, cancelled)
- **Task-memory relationships** in knowledge graph
- **Project-based organization**
### ๐ง Enterprise Features
- **Performance monitoring** with detailed metrics
- **Health checks** and system diagnostics
- **Automatic cleanup** of old data and duplicates
- **Database optimization** tools
- **Comprehensive logging** and error tracking
### ๐ Easy Deployment
- **uvx compatible** for one-command installation
- **Zero-configuration** startup with sensible defaults
- **Environment variable** configuration
- **Cross-platform** support (Windows, macOS, Linux)
## ๐๏ธ Project Structure
```
enhanced-mcp-memory/
โโโ mcp_server_enhanced.py # Main MCP server
โโโ memory_manager.py # Core memory/task logic
โโโ database.py # Database operations
โโโ requirements.txt # Python dependencies
โโโ setup.py # Package configuration
โโโ data/ # SQLite database storage
โโโ logs/ # Application logs
โโโ tests/ # Test files
```
## ๐ Quick Start
### Option 1: Using uvx (Recommended)
```bash
# Install and run with uvx
uvx enhanced-mcp-memory
```
### Option 2: Manual Installation
```bash
# Clone and install
git clone https://github.com/cbunting99/enhanced-mcp-memory.git
cd enhanced-mcp-memory
pip install -e .
# Run the server
enhanced-mcp-memory
```
### Option 3: Development Setup
```bash
# Clone repository
git clone https://github.com/cbunting99/enhanced-mcp-memory.git
cd enhanced-mcp-memory
# Install dependencies
pip install -r requirements.txt
# Run directly
python mcp_server_enhanced.py
```
## โ๏ธ MCP Configuration
Add to your MCP client configuration:
### For uvx installation:
```json
{
"mcpServers": {
"memory-manager": {
"command": "uvx",
"args": ["enhanced-mcp-memory"],
"env": {
"LOG_LEVEL": "INFO",
"MAX_MEMORY_ITEMS": "1000",
"ENABLE_AUTO_CLEANUP": "true"
}
}
}
}
```
### For local installation:
```json
{
"mcpServers": {
"memory-manager": {
"command": "python",
"args": ["mcp_server_enhanced.py"],
"cwd": "/path/to/enhanced-mcp-memory",
"env": {
"LOG_LEVEL": "INFO",
"MAX_MEMORY_ITEMS": "1000",
"ENABLE_AUTO_CLEANUP": "true"
}
}
}
}
```
## ๐ ๏ธ Available Tools
### Core Memory Tools
- `get_memory_context(query)` - Get relevant memories and context
- `create_task(title, description, priority, category)` - Create new tasks
- `get_tasks(status, limit)` - Retrieve tasks with filtering
- `get_project_summary()` - Get comprehensive project overview
### System Management Tools
- `health_check()` - Check server health and connectivity
- `get_performance_stats()` - Get detailed performance metrics
- `cleanup_old_data(days_old)` - Clean up old memories and tasks
- `optimize_memories()` - Remove duplicates and optimize storage
- `get_database_stats()` - Get comprehensive database statistics
## ๐ง Configuration Options
Configure via environment variables:
| Variable | Default | Description |
|----------|---------|-------------|
| `LOG_LEVEL` | `INFO` | Logging level (DEBUG, INFO, WARNING, ERROR) |
| `MAX_MEMORY_ITEMS` | `1000` | Maximum memories per project |
| `CLEANUP_INTERVAL_HOURS` | `24` | Auto-cleanup interval |
| `ENABLE_AUTO_CLEANUP` | `true` | Enable automatic cleanup |
| `MAX_CONCURRENT_REQUESTS` | `5` | Max concurrent requests |
| `REQUEST_TIMEOUT` | `30` | Request timeout in seconds |
## ๐งช Testing
Run the test suite to verify functionality:
```bash
# Run all tests
python test_enhanced_features.py
python test_new_project_system.py
python test_project_tools.py
# Test MCP protocol
python test_mcp_protocol.py
```
## ๐ Performance & Monitoring
The server includes built-in performance tracking:
- **Response time monitoring** for all tools
- **Success rate tracking** with error counts
- **Memory usage statistics**
- **Database performance metrics**
- **Automatic health checks**
Access via the `get_performance_stats()` and `health_check()` tools.
## ๐๏ธ Database
- **SQLite** for reliable, file-based storage
- **Automatic schema migrations** for updates
- **Comprehensive indexing** for fast queries
- **Built-in backup and optimization** tools
- **Cross-platform compatibility**
Default location: `./data/mcp_memory.db`
## ๐ Semantic Search
Powered by sentence-transformers for intelligent memory retrieval:
- **Natural language queries** - "Find memories about database optimization"
- **Similarity-based matching** using embeddings
- **Configurable similarity thresholds**
- **Automatic model downloading** (~90MB on first run)
## ๐ Logging
Comprehensive logging system:
- **Daily log rotation** in `./logs/` directory
- **Structured logging** with timestamps and levels
- **Performance tracking** integrated
- **Error tracking** with stack traces
## ๐ค Contributing
1. Fork the repository
2. Create a feature branch
3. Add tests for new functionality
4. Ensure all tests pass
5. Submit a pull request
## ๐ License
MIT License - see LICENSE file for details.
## ๐ Support
- **Issues**: [GitHub Issues](https://github.com/cbunting99/enhanced-mcp-memory/issues)
- **Documentation**: [README](https://github.com/cbunting99/enhanced-mcp-memory#readme)
- **Discussions**: [GitHub Discussions](https://github.com/cbunting99/enhanced-mcp-memory/discussions)
## ๐ท๏ธ Version History
- **v1.2.0** - Enhanced MCP server with performance monitoring and health checks
- **v1.1.0** - Added semantic search and knowledge graph features
- **v1.0.0** - Initial release with basic memory and task management
Raw data
{
"_id": null,
"home_page": "https://github.com/cbunting99/enhanced-mcp-memory",
"name": "enhanced-mcp-memory",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "cbunting99 <cbunting99@users.noreply.github.com>",
"keywords": "mcp, memory, ai, task-management, knowledge-graph, semantic-search",
"author": "cbunting99",
"author_email": "cbunting99 <cbunting99@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/e2/2f/41c0513702f69d8dbb7a86e80f520c436c769619d93de70dfe67dbd2acf0/enhanced_mcp_memory-1.2.1.tar.gz",
"platform": null,
"description": "# Enhanced MCP Memory\r\n\r\n> **\u26a1 Optimized for Claude Sonnet 4** - This MCP server works best with Claude Sonnet 4 for optimal performance and AI-powered features.\r\n\r\nAn enhanced MCP (Model Context Protocol) server for intelligent memory and task management, designed for AI assistants and development workflows. Features semantic search, automatic task extraction, knowledge graphs, and comprehensive project management.\r\n\r\n## \u2728 Key Features\r\n\r\n### \ud83e\udde0 Intelligent Memory Management\r\n- **Semantic search** using sentence-transformers for natural language queries\r\n- **Automatic memory classification** with importance scoring\r\n- **Duplicate detection** and content deduplication\r\n- **File path associations** for code-memory relationships\r\n- **Knowledge graph relationships** with automatic similarity detection\r\n\r\n### \ud83d\udccb Advanced Task Management\r\n- **Auto-task extraction** from conversations and code comments\r\n- **Priority and category management** with validation\r\n- **Status tracking** (pending, in_progress, completed, cancelled)\r\n- **Task-memory relationships** in knowledge graph\r\n- **Project-based organization**\r\n\r\n### \ud83d\udd27 Enterprise Features\r\n- **Performance monitoring** with detailed metrics\r\n- **Health checks** and system diagnostics\r\n- **Automatic cleanup** of old data and duplicates\r\n- **Database optimization** tools\r\n- **Comprehensive logging** and error tracking\r\n\r\n### \ud83d\ude80 Easy Deployment\r\n- **uvx compatible** for one-command installation\r\n- **Zero-configuration** startup with sensible defaults\r\n- **Environment variable** configuration\r\n- **Cross-platform** support (Windows, macOS, Linux)\r\n\r\n## \ud83c\udfd7\ufe0f Project Structure\r\n\r\n```\r\nenhanced-mcp-memory/\r\n\u251c\u2500\u2500 mcp_server_enhanced.py # Main MCP server\r\n\u251c\u2500\u2500 memory_manager.py # Core memory/task logic\r\n\u251c\u2500\u2500 database.py # Database operations\r\n\u251c\u2500\u2500 requirements.txt # Python dependencies\r\n\u251c\u2500\u2500 setup.py # Package configuration\r\n\u251c\u2500\u2500 data/ # SQLite database storage\r\n\u251c\u2500\u2500 logs/ # Application logs\r\n\u2514\u2500\u2500 tests/ # Test files\r\n```\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Option 1: Using uvx (Recommended)\r\n\r\n```bash\r\n# Install and run with uvx\r\nuvx enhanced-mcp-memory\r\n```\r\n\r\n### Option 2: Manual Installation\r\n\r\n```bash\r\n# Clone and install\r\ngit clone https://github.com/cbunting99/enhanced-mcp-memory.git\r\ncd enhanced-mcp-memory\r\npip install -e .\r\n\r\n# Run the server\r\nenhanced-mcp-memory\r\n```\r\n\r\n### Option 3: Development Setup\r\n\r\n```bash\r\n# Clone repository\r\ngit clone https://github.com/cbunting99/enhanced-mcp-memory.git\r\ncd enhanced-mcp-memory\r\n\r\n# Install dependencies\r\npip install -r requirements.txt\r\n\r\n# Run directly\r\npython mcp_server_enhanced.py\r\n```\r\n\r\n## \u2699\ufe0f MCP Configuration\r\n\r\nAdd to your MCP client configuration:\r\n\r\n### For uvx installation:\r\n```json\r\n{\r\n \"mcpServers\": {\r\n \"memory-manager\": {\r\n \"command\": \"uvx\",\r\n \"args\": [\"enhanced-mcp-memory\"],\r\n \"env\": {\r\n \"LOG_LEVEL\": \"INFO\",\r\n \"MAX_MEMORY_ITEMS\": \"1000\",\r\n \"ENABLE_AUTO_CLEANUP\": \"true\"\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\n### For local installation:\r\n```json\r\n{\r\n \"mcpServers\": {\r\n \"memory-manager\": {\r\n \"command\": \"python\",\r\n \"args\": [\"mcp_server_enhanced.py\"],\r\n \"cwd\": \"/path/to/enhanced-mcp-memory\",\r\n \"env\": {\r\n \"LOG_LEVEL\": \"INFO\",\r\n \"MAX_MEMORY_ITEMS\": \"1000\",\r\n \"ENABLE_AUTO_CLEANUP\": \"true\"\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\n## \ud83d\udee0\ufe0f Available Tools\r\n\r\n### Core Memory Tools\r\n- `get_memory_context(query)` - Get relevant memories and context\r\n- `create_task(title, description, priority, category)` - Create new tasks\r\n- `get_tasks(status, limit)` - Retrieve tasks with filtering\r\n- `get_project_summary()` - Get comprehensive project overview\r\n\r\n### System Management Tools\r\n- `health_check()` - Check server health and connectivity\r\n- `get_performance_stats()` - Get detailed performance metrics\r\n- `cleanup_old_data(days_old)` - Clean up old memories and tasks\r\n- `optimize_memories()` - Remove duplicates and optimize storage\r\n- `get_database_stats()` - Get comprehensive database statistics\r\n\r\n## \ud83d\udd27 Configuration Options\r\n\r\nConfigure via environment variables:\r\n\r\n| Variable | Default | Description |\r\n|----------|---------|-------------|\r\n| `LOG_LEVEL` | `INFO` | Logging level (DEBUG, INFO, WARNING, ERROR) |\r\n| `MAX_MEMORY_ITEMS` | `1000` | Maximum memories per project |\r\n| `CLEANUP_INTERVAL_HOURS` | `24` | Auto-cleanup interval |\r\n| `ENABLE_AUTO_CLEANUP` | `true` | Enable automatic cleanup |\r\n| `MAX_CONCURRENT_REQUESTS` | `5` | Max concurrent requests |\r\n| `REQUEST_TIMEOUT` | `30` | Request timeout in seconds |\r\n\r\n## \ud83e\uddea Testing\r\n\r\nRun the test suite to verify functionality:\r\n\r\n```bash\r\n# Run all tests\r\npython test_enhanced_features.py\r\npython test_new_project_system.py\r\npython test_project_tools.py\r\n\r\n# Test MCP protocol\r\npython test_mcp_protocol.py\r\n```\r\n\r\n## \ud83d\udcca Performance & Monitoring\r\n\r\nThe server includes built-in performance tracking:\r\n\r\n- **Response time monitoring** for all tools\r\n- **Success rate tracking** with error counts\r\n- **Memory usage statistics**\r\n- **Database performance metrics**\r\n- **Automatic health checks**\r\n\r\nAccess via the `get_performance_stats()` and `health_check()` tools.\r\n\r\n## \ud83d\uddc4\ufe0f Database\r\n\r\n- **SQLite** for reliable, file-based storage\r\n- **Automatic schema migrations** for updates\r\n- **Comprehensive indexing** for fast queries\r\n- **Built-in backup and optimization** tools\r\n- **Cross-platform compatibility**\r\n\r\nDefault location: `./data/mcp_memory.db`\r\n\r\n## \ud83d\udd0d Semantic Search\r\n\r\nPowered by sentence-transformers for intelligent memory retrieval:\r\n\r\n- **Natural language queries** - \"Find memories about database optimization\"\r\n- **Similarity-based matching** using embeddings\r\n- **Configurable similarity thresholds**\r\n- **Automatic model downloading** (~90MB on first run)\r\n\r\n## \ud83d\udcdd Logging\r\n\r\nComprehensive logging system:\r\n\r\n- **Daily log rotation** in `./logs/` directory\r\n- **Structured logging** with timestamps and levels\r\n- **Performance tracking** integrated\r\n- **Error tracking** with stack traces\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch\r\n3. Add tests for new functionality\r\n4. Ensure all tests pass\r\n5. Submit a pull request\r\n\r\n## \ud83d\udcc4 License\r\n\r\nMIT License - see LICENSE file for details.\r\n\r\n## \ud83c\udd98 Support\r\n\r\n- **Issues**: [GitHub Issues](https://github.com/cbunting99/enhanced-mcp-memory/issues)\r\n- **Documentation**: [README](https://github.com/cbunting99/enhanced-mcp-memory#readme)\r\n- **Discussions**: [GitHub Discussions](https://github.com/cbunting99/enhanced-mcp-memory/discussions)\r\n\r\n## \ud83c\udff7\ufe0f Version History\r\n\r\n- **v1.2.0** - Enhanced MCP server with performance monitoring and health checks\r\n- **v1.1.0** - Added semantic search and knowledge graph features\r\n- **v1.0.0** - Initial release with basic memory and task management\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Enhanced MCP server for memory and task management with AI-powered features",
"version": "1.2.1",
"project_urls": {
"Documentation": "https://github.com/cbunting99/enhanced-mcp-memory#readme",
"Homepage": "https://github.com/cbunting99/enhanced-mcp-memory",
"Issues": "https://github.com/cbunting99/enhanced-mcp-memory/issues",
"Repository": "https://github.com/cbunting99/enhanced-mcp-memory"
},
"split_keywords": [
"mcp",
" memory",
" ai",
" task-management",
" knowledge-graph",
" semantic-search"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5bed2c61f6e40fb390b92ac4e5d4d4b8981db65bfa07e043628db63ad956beec",
"md5": "835aa967ed52d023a3e58b5b104c896d",
"sha256": "a6dee52718f742c9a87eca6479f5238152ef3296af5fbd3020062c092232f9e6"
},
"downloads": -1,
"filename": "enhanced_mcp_memory-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "835aa967ed52d023a3e58b5b104c896d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 23070,
"upload_time": "2025-07-17T13:22:18",
"upload_time_iso_8601": "2025-07-17T13:22:18.137674Z",
"url": "https://files.pythonhosted.org/packages/5b/ed/2c61f6e40fb390b92ac4e5d4d4b8981db65bfa07e043628db63ad956beec/enhanced_mcp_memory-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e22f41c0513702f69d8dbb7a86e80f520c436c769619d93de70dfe67dbd2acf0",
"md5": "1326674d16bbfbd3897fa6a00613fc6b",
"sha256": "91001b9231dbc15002361f92378d431c5c25a390a307eb10ab6612692eb90f68"
},
"downloads": -1,
"filename": "enhanced_mcp_memory-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "1326674d16bbfbd3897fa6a00613fc6b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 29343,
"upload_time": "2025-07-17T13:22:19",
"upload_time_iso_8601": "2025-07-17T13:22:19.191194Z",
"url": "https://files.pythonhosted.org/packages/e2/2f/41c0513702f69d8dbb7a86e80f520c436c769619d93de70dfe67dbd2acf0/enhanced_mcp_memory-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 13:22:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cbunting99",
"github_project": "enhanced-mcp-memory",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "fastmcp",
"specs": [
[
">=",
"2.10.5"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "sentence-transformers",
"specs": [
[
">=",
"2.2.0"
]
]
},
{
"name": "numpy",
"specs": [
[
">=",
"1.21.0"
]
]
},
{
"name": "scipy",
"specs": [
[
">=",
"1.7.0"
]
]
},
{
"name": "filelock",
"specs": [
[
">=",
"3.0.0"
]
]
}
],
"lcname": "enhanced-mcp-memory"
}