MCP Synaptic

by jvanmelckebeke

235 downloads Not rated yet

About

Memory-enhanced MCP server with local RAG database and expiring memory capabilities

Explore

- Expiring memories with configurable TTL and automatic cleanup
- Support for ephemeral, short-term, long-term, and permanent memory types
- Optional Redis backend for distributed memory storage
- ChromaDB-based vector database with semantic search
- API-based or local embedding models (sentence-transformers)
- Full MCP protocol, SSE, and WebSocket real-time communication
- Docker-ready with multi-service orchestration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Synaptic
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.11 or higher
- UV package manager
- Docker (optional, for containerized deployment)

1. Build and run with Docker Compose:

   docker-compose up --build

2. Or run individual container:

   docker build -t mcp-synaptic .
docker run -p 8000:8000 mcp-synaptic

Create a .env file in the project root (use .env.example as template):


SERVER_HOST=localhost
SERVER_PORT=8000
DEBUG=false
LOG_LEVEL=INFO

SQLITE_DATABASE_PATH=./data/synaptic.db
CHROMADB_PERSIST_DIRECTORY=./data/chroma

DEFAULT_MEMORY_TTL_SECONDS=3600
MAX_MEMORY_ENTRIES=10000
MEMORY_CLEANUP_INTERVAL_SECONDS=300

EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_PROVIDER=api
EMBEDDING_API_BASE=http://localhost:4000
EMBEDDING_API_KEY=your-api-key-here
MAX_RAG_RESULTS=10
RAG_SIMILARITY_THRESHOLD=0.7

API-based Embeddings (Recommended)
- Lightweight deployment without PyTorch dependencies
- Works with LiteLLM, OpenAI API, or any OpenAI-compatible endpoint
- Set EMBEDDING_PROVIDER=api and configure EMBEDDING_API_BASE

Local Embeddings
- Includes full PyTorch and sentence-transformers
- No external API dependency but much larger container
- Set EMBEDDING_PROVIDER=local and install with --extra local-embeddings

bash

uv run mcp-synaptic server --host 0.0.0.0 --port 9000 --debug


uv sync --group dev

pre-commit install

bash

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp synaptic": {
            "mcp-synaptic": {
                "command": "uv",
                "args": [
                    "sync"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-synaptic": {
        "command": "uv",
        "args": [
            "sync"
        ]
    }
}

A memory-enhanced MCP (Model Context Protocol) server with local RAG (Retrieval-Augmented Generation) database and expiring memory capabilities.

Features

🧠 Memory Management

- Expiring Memories: Store temporary memories with configurable TTL (Time To Live) - Memory Types: Support for different memory categories (short-term, long-term, ephemeral) - Automatic Cleanup: Background processes to remove expired memories - Redis Integration: Optional Redis backend for distributed memory storage

📚 RAG Database

- Local Vector Storage: ChromaDB-based vector database for document storage - Embedding Models: Built-in support for sentence-transformers models - Semantic Search: Similarity-based document retrieval - Document Management: Add, update, and delete documents with versioning

🔄 Real-time Communication

- Server-Sent Events (SSE): Real-time updates for memory and RAG operations - MCP Protocol: Full Model Context Protocol implementation - WebSocket Support: Alternative real-time communication channel - Event Streaming: Live updates for memory expiration and document changes

🐳 Docker Ready

- Containerized Deployment: Ready-to-use Docker containers - Docker Compose: Multi-service orchestration with Redis and database - Environment Configuration: Flexible configuration through environment variables

Quick Start

Prerequisites

- Python 3.11 or higher
- UV package manager
- Docker (optional, for containerized deployment)

Installation

1. Clone the repository:

   git clone https://github.com/your-org/mcp-synaptic.git
cd mcp-synaptic

2. Install dependencies:

   # For API-based embeddings (recommended - lightweight)
uv sync

# For local embeddings (includes PyTorch - heavy)
uv sync --extra local-embeddings

3. Initialize the project:

   uv run mcp-synaptic init

4. Start the server:

   uv run mcp-synaptic server

The server will start on http://localhost:8000 by default.

Docker Deployment

1. Build and run with Docker Compose:

   docker-compose up --build

2. Or run individual container:

   docker build -t mcp-synaptic .
docker run -p 8000:8000 mcp-synaptic

Configuration

Environment Variables

Create a .env file in the project root (use .env.example as template):

```env

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.