Skip to main content
Glama
Sky-Memory MCP

Sky-Memory MCP

by ziditun

Sky-Memory MCP

Persistent, local-first memory for AI assistants. Sky-Memory exposes a shared memory system through the Model Context Protocol (MCP), so supported assistants can use the same SQLite database across sessions and projects.

Node.js MCP License: MIT

Release status: The repository is currently private and the npm package has not been published. Installation currently requires Git access to this repository.

What it does

Sky-Memory gives MCP-compatible assistants a persistent memory layer without requiring a separate memory service.

  • Persistent memory: Store facts, preferences, decisions and project knowledge in SQLite.

  • Relevant recall: Search with SQLite FTS5, relevance ranking and graph relationships.

  • Optional semantic recall: Add embeddings through an explicitly configured Ollama or OpenAI-compatible endpoint. FTS5 remains the fallback.

  • Memory evolution: Review and resolve duplicates, contradictions, corrections and temporal changes.

  • Working and project context: Keep temporary session notes and structured project state.

  • Procedural memory: Capture workflows as skills and validate them before promotion.

  • History: Inspect revisions, provenance, decisions and explicitly recorded session events.

  • Privacy controls: Consent-gated memory creation and updates, opt-in session history, and configurable secret redaction (enabled by default).

Related MCP server: ctx-memory

Architecture

MCP clients
  Claude Desktop · Claude Code · Codex · OpenCode · Cursor
                         │
                         │ MCP over stdio
                         ▼
                Sky-Memory MCP server
                         │
        ┌────────────────┼─────────────────┐
        ▼                ▼                 ▼
   Memory & recall   Evolution       Working / skills
        │                │                 │
        └────────────────┼─────────────────┘
                         ▼
                 SQLite + FTS5
            revisions · events · edges
                  optional vectors

The database is local to the machine running Sky-Memory. If a remote embedding endpoint is configured, memory text and recall queries are sent to that provider for embedding generation. Local storage does not make remote model processing local.

Requirements

  • Node.js 20.11 or newer

  • npm

  • Git

  • Native build tools for better-sqlite3 when a prebuilt binary is unavailable:

    • Linux: compiler toolchain and Python (for example, build-essential)

    • macOS: Xcode Command Line Tools

    • Windows: Visual Studio C++ Build Tools and Python

The automated CI workflow currently runs on Ubuntu Linux. Windows and macOS installer behavior has not been verified end-to-end in CI.

Install

The repository is private at present, so the GitHub account used to clone it must have access.

git clone https://github.com/ziditun/sky-memory-mcp.git
cd sky-memory-mcp
node install.js

The installer:

  1. Checks the platform, Node.js and npm versions.

  2. Installs the locked dependencies and builds the native SQLite module.

  3. Compiles the TypeScript MCP server.

  4. Creates the data directory and initializes the database without replacing an existing database.

  5. Installs the project prompts and hooks.

  6. Detects supported harness configuration directories and registers the MCP server, backing up existing configuration files before editing them.

  7. Runs database and MCP startup diagnostics.

Restart the relevant assistant after installation. The installer configures detected harnesses; it does not install the assistant applications themselves.

Data location

Default data directory:

~/.sky-memory/
├── config.json
├── data/default/mnemon.db
├── hooks/
└── prompt/

To use another directory:

# macOS / Linux
export MNEMON_DATA_DIR="$HOME/my-sky-memory"
node install.js

# Windows PowerShell
$env:MNEMON_DATA_DIR = "$HOME\my-sky-memory"
node install.js

The runtime also supports SKY_MEMORY_DB_PATH for an explicit database path.

Verify or diagnose

Run the read-only installer diagnostics:

node install.js --diagnose-only

To run the MCP server manually after building:

npm run mcp

MCP tools

The server exposes these tools to connected assistants:

Tool

Purpose

memory_context

Build prompt-relevant context within a token budget

memory_recall

Search stored memories

memory_remember

Store a memory

memory_evolve

Resolve pending merges, contradictions and updates

memory_session

Record or inspect session history and decisions

memory_manage

List, inspect, update, delete, export and maintain memories

memory_working

Manage session scratchpad and project context

memory_skills

Manage procedural-memory skills

Memory creation and updates, session-history recording, working/project-memory changes and skill lifecycle changes require explicit consent. Session input/output history is opt-in and is not recorded merely because context is retrieved. Deletion and maintenance are separate, explicitly invoked tool actions.

Optional semantic retrieval

Semantic retrieval is disabled unless an embedding endpoint is configured. SQLite FTS5 works without an embedding provider.

Example using local Ollama:

export SKY_MEMORY_EMBEDDING_URL=http://localhost:11434/api/embed
export SKY_MEMORY_EMBEDDING_MODEL=nomic-embed-text

# Index existing memories; future writes are indexed automatically
sky-memory reindex-embeddings

For an OpenAI-compatible endpoint, set SKY_MEMORY_EMBEDDING_URL to the provider base URL or its /embeddings endpoint. Set SKY_MEMORY_EMBEDDING_API_KEY when required.

Privacy: A remote endpoint receives the text being embedded. Use a local endpoint when memory content must remain on-device. Provider errors fall back to lexical FTS5 recall.

Existing database secret scan

New writes and imports are redacted before persistence. To inspect an older database, run the read-only scan first:

sky-memory scrub-legacy

To apply redaction:

sky-memory scrub-legacy --apply

The apply operation creates a timestamped database backup and verifies the migration. Stop other Sky-Memory processes before applying it. Keep the backup secure because it may contain the original sensitive values.

Configuration

The runtime reads ~/.sky-memory/config.json (or the configured data directory). Common settings:

Setting

Default

Description

decayHalfLifeDays

30

Memory importance decay half-life

immunityImportanceThreshold

4

Importance at or above this level is decay-immune

defaultRecallLimit

10

Default recall result limit

workingMemoryDefaultTtl

3600

Working-memory TTL in seconds

skillPromotionThreshold

3

Independent successful sessions required for skill validation

maintenanceIntervalHours

24

Background maintenance interval

redactSecrets

true

Enable secret redaction

Environment variables can override runtime settings. See src/mcp/index.ts for the supported environment variables.

Supported integrations

Client

Integration

Claude Desktop

MCP over stdio

Claude Code

MCP over stdio

Codex

MCP over stdio

OpenCode

Local MCP server

Cursor

MCP over stdio

The installer writes MCP configuration for detected clients and copies the prompt and hook scripts into the data directory. It does not register those scripts with each host's native hook system. CI tests the server protocol and configuration logic; it does not launch and verify each desktop application.

Development

npm ci
npm run build
npm run lint
npm test
npm pack --dry-run

CI runs these checks on Ubuntu Linux.

Current limitations

  • No Sky-Memory-native web or graph UI is included.

  • The npm package is not published.

  • The repository is private.

  • Windows and macOS installation have not had end-to-end CI verification.

  • Cross-machine synchronization is not implemented.

  • Session history is opt-in and requires explicit consent.

Documentation

Credits and license

Sky-Memory maintains compatibility with the Mnemon database layout and acknowledges the Mnemon project.

Released under the MIT License.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent, searchable memory for AI agents across any MCP-compatible client, storing project context, user preferences, and session learnings locally in SQLite with tools to save, retrieve, search, and manage them.
      12
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables MCP-capable AI clients to share one local SQLite-backed memory of preferences, decisions, tasks, and handoffs across sessions and models. It supports saving, searching, recalling, exporting, and restoring context through tools like remember, recall, get_context, and save_handoff.
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP-compatible AI coding tools to store and recall persistent memories across sessions and projects, with keyword and semantic search backed by a local SQLite database.
      2,060 npm
      76
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP-compatible coding agents to store, search, and manage persistent local project memories across sessions, with context injection, feedback-driven reinforcement, analytics, and archiving.
      MIT