CoolFace
Apppublic

us3r/synapse-mcp-memory-server

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

๐Ÿง  SYNAPSE: Self-Evolving Memory MCP Server

๐Ÿงฌ Where AI Memories Learn and Neural Connections Grow Stronger

![License: MIT](https://opensource.org/licenses/MIT) ![Python 3.9+](https://www.python.org/downloads/) ![MCP Compatible](https://github.com/modelcontextprotocol)

๐Ÿ† What Makes SYNAPSE Special

SYNAPSE revolutionizes AI memory by implementing features that no other MCP server has:

  • โ€”๐Ÿงฌ Self-Evolving Memories: Memories adapt, strengthen, and form new connections autonomously
  • โ€”๐Ÿค” Metacognitive Awareness: The system knows what it knows and what it doesn't know
  • โ€”๐Ÿ•ธ๏ธ Dynamic Knowledge Graphs: Zettelkasten-inspired interconnected memory networks
  • โ€”๐ŸŽฏ Confidence Assessment: Real-time confidence scoring for knowledge queries
  • โ€”๐Ÿ” Semantic Evolution: Memories learn from access patterns and strengthen relationships
  • โ€”๐Ÿ“Š 3D Interactive Visualization: Beautiful visualization showing memory evolution in real-time

๐Ÿš€ Quick Start (2 Steps)

1. Install SYNAPSE

bash
# Clone and install
git clone <repository-url>
cd memory_mcp
uv pip install -e .

2. Start the MCP Server

bash
synapse serve

That's it! The server auto-initializes everything and provides:

  • โ€”MCP tools for Claude Desktop integration
  • โ€”Automatic memory storage and evolution
  • โ€”3D visualization at http://localhost:7860

๐Ÿ”Œ Using SYNAPSE with Claude Desktop

Local Installation

Add to your Claude Desktop MCP configuration:

json
{
  "mcpServers": {
    "synapse": {
      "command": "synapse",
      "args": ["serve"]
    }
  }
}

Hugging Face Space (Gradio MCP)

Use SYNAPSE directly from Hugging Face Spaces:

json
{
  "mcpServers": {
    "synapse-gradio": {
      "url": "https://your-space-name.hf.space/gradio_api/mcp/sse"
    }
  }
}

The Gradio MCP endpoint provides the same tools with additional web interface benefits:

  • โ€”Real-time 3D visualization at the Space URL
  • โ€”Interactive memory exploration
  • โ€”Built-in demo data for immediate testing

Then use memory tools in Claude:

  • โ€”store_memory - Save information with automatic categorization
  • โ€”search_memory - Find memories using semantic similarity
  • โ€”evolve_memory - Trigger memory network evolution
  • โ€”get_memory_insights - Analyze knowledge gaps and patterns

๐Ÿ’ก Memory Organization

SYNAPSE uses a unified memory space organized by:

bash
# Store memories with tags and context
store_memory(
  content="Python is great for data science",
  tags=["programming", "python", "data-science"],
  context="learning",
  memory_type="semantic"
)

# Search by topic
search_memory(query="python programming", tags=["programming"])

Memory Types

  • โ€”๐Ÿ“– Episodic: Personal experiences ("I learned React today")
  • โ€”๐Ÿงฎ Semantic: Facts and concepts ("React is a JavaScript library")
  • โ€”โš™๏ธ Procedural: How-to knowledge ("To create a React component, use...")

๐ŸŽฎ See SYNAPSE in Action

Want to see the features before using with Claude? Run the standalone demo:

bash
synapse demo

This creates sample memories and shows the 3D visualization - perfect for demos and testing!

๐Ÿ› ๏ธ Available Commands

bash
synapse serve          # Start MCP server (main command)
synapse demo           # Standalone feature demo
synapse status         # Check system status  
synapse config --show  # View configuration
synapse test           # Test installation

๐ŸŽจ 3D Visualization

When running, visit http://localhost:7860 to see:

  • โ€”๐Ÿ•ธ๏ธ Interactive 3D Memory Graph: Explore connections in three dimensions
  • โ€”๐Ÿ“Š Real-time Analytics: Memory statistics and type distributions
  • โ€”๐Ÿ” Semantic Search Interface: Find and highlight relevant memories
  • โ€”๐Ÿงฌ Evolution Controls: Trigger and monitor memory adaptation

๐Ÿงฌ How Memory Evolution Works

SYNAPSE continuously evolves your memory network:

Automatic Evolution Triggers

  • โ€”Time-based: Every hour (configurable)
  • โ€”Activity-based: Every 50 new memories
  • โ€”Manual: Via MCP tools

Evolution Process

  1. 1.Memory Decay: Unused memories gradually weaken
  2. 2.Reinforcement: Frequently accessed memories strengthen
  3. 3.Connection Discovery: New relationships form based on usage
  4. 4.Network Optimization: Weak connections are pruned
  5. 5.Community Detection: Related memories cluster together

๐Ÿค” Metacognitive Capabilities

SYNAPSE understands its own knowledge:

  • โ€”Confidence Scoring: How certain the system is about information
  • โ€”Knowledge Gap Detection: Identifies missing knowledge areas
  • โ€”Coverage Analysis: Maps well/poorly covered topics
  • โ€”Learning Velocity: Tracks knowledge acquisition patterns

โš™๏ธ Configuration (Optional)

SYNAPSE works out-of-the-box, but you can customize:

bash
# View current settings
synapse config --show

# Set custom database path
export SYNAPSE_MEMORY_DB_PATH="./my_memories/memory.db"

# Set custom visualization port  
export SYNAPSE_VIZ_PORT=8080

# Start with custom settings
synapse serve

๐Ÿ—๏ธ Architecture

SYNAPSE System
โ”œโ”€โ”€ ๐Ÿง  Memory System
โ”‚   โ”œโ”€โ”€ Vector embeddings (sentence-transformers)
โ”‚   โ”œโ”€โ”€ Self-evolving connections
โ”‚   โ””โ”€โ”€ Multi-type memory support
โ”œโ”€โ”€ ๐Ÿค” Metacognitive System  
โ”‚   โ”œโ”€โ”€ Knowledge gap detection
โ”‚   โ””โ”€โ”€ Confidence assessment
โ”œโ”€โ”€ ๐Ÿ•ธ๏ธ Graph Database
โ”‚   โ”œโ”€โ”€ NetworkX in-memory graphs
โ”‚   โ””โ”€โ”€ Community detection
โ”œโ”€โ”€ ๐ŸŽจ 3D Visualization
โ”‚   โ””โ”€โ”€ Interactive Gradio interface
โ””โ”€โ”€ ๐Ÿ”Œ MCP Server
    โ”œโ”€โ”€ Standard MCP tools/resources
    โ””โ”€โ”€ Memory management APIs

๐Ÿ† Why SYNAPSE Wins

Innovation

  • โ€”First self-evolving memory system in the MCP ecosystem
  • โ€”Metacognitive awareness - knows what it knows
  • โ€”Beautiful 3D visualization that actually works
  • โ€”Unified memory space with intelligent organization

Technical Excellence

  • โ€”Auto-initializing, zero-config setup
  • โ€”Scalable architecture
  • โ€”Production-ready with proper error handling
  • โ€”Clean, extensible codebase

User Experience

  • โ€”One command to get started: synapse serve
  • โ€”Immediate visual feedback via 3D interface
  • โ€”Seamless Claude Desktop integration
  • โ€”Clear, logical workflow

๐Ÿ“Š File Structure

src/synapse/
โ”œโ”€โ”€ cli.py           # Command-line interface
โ”œโ”€โ”€ server.py        # Main MCP server  
โ”œโ”€โ”€ memory.py        # Core memory system
โ”œโ”€โ”€ metacognition.py # Metacognitive awareness
โ”œโ”€โ”€ visualizer.py    # 3D visualization
โ”œโ”€โ”€ graph_db.py      # Graph database
โ””โ”€โ”€ config.py        # Configuration

๐ŸŽฏ Getting Started Checklist

  • โ€”[ ] Install: uv pip install -e .
  • โ€”[ ] Start server: synapse serve
  • โ€”[ ] Add to Claude Desktop config
  • โ€”[ ] Store your first memory in Claude
  • โ€”[ ] Visit http://localhost:7860 for visualization
  • โ€”[ ] Watch your knowledge network grow and evolve!

๐ŸŽฌ Video Demo

๐Ÿ“น [Watch SYNAPSE MCP Server in Action](demo-video-placeholder.mp4)

This video demonstrates:

  • โ€”SYNAPSE MCP server integration with Claude Desktop
  • โ€”Real-time memory storage and retrieval
  • โ€”3D interactive visualization features
  • โ€”Self-evolving memory network capabilities
  • โ€”Metacognitive insights and knowledge gap analysis

๐Ÿท๏ธ Hackathon Submission

Track: MCP Tool/Server Track Tags: mcp-tool-server-track, gradio-hackathon-2025


Built with โค๏ธ for the Hugging Face + Gradio Hackathon

SYNAPSE represents the future of AI memory systems - where memories learn and connections grow stronger.