greenfieldlabs-inc/savecontext

The operating layer for AI coding agents.

14 stars1 forksUpdated Jan 20, 2026
npx skills add greenfieldlabs-inc/savecontext

README

SaveContext

The OS for AI coding agents

npm version License: AGPL-3.0 MCP

WebsiteNPMChangelog


Overview

SaveContext is a Model Context Protocol (MCP) server that gives AI coding assistants persistent memory across sessions. It combines context management, issue tracking, and project planning into a single local-first tool that works with any MCP-compatible client.

Core capabilities:

  • Context & Memory — Save decisions, progress, and notes that persist across conversations
  • Issue Tracking — Manage tasks, bugs, and epics with dependencies and hierarchies
  • Plans & PRDs — Create specs and link them to implementation issues
  • Semantic Search — Find past decisions by meaning, not just keywords
  • Checkpoints — Snapshot and restore session state at any point

🛠️ Features

  • Local Semantic Search: AI-powered search using Ollama or Transformers.js for offline embedding generation
  • Multi-Agent Support: Run multiple CLI/IDE instances simultaneously with agent-scoped session tracking
  • Automatic Provider Detection: Detects 30+ MCP clients including coding tools (Claude Code, Cursor, Cline, VS Code, JetBrains, etc.) and desktop apps (Claude Desktop, Perplexity, ChatGPT, Raycast, etc.)
  • Session Lifecycle Management: Full session state management with pause, resume, end, switch, and delete operations
  • Multi-Path Sessions: Sessions can span multiple related directories (monorepos, frontend/backend, etc.)
  • Project Isolation: Automatically filters sessions by project path - only see sessions from your current repository
  • Auto-Resume: If an active session exists for your project, automatically resume it instead of creating duplicates
  • Session Management: Organize work by sessions with automatic channel detection from git branches
  • Checkpoints: Create named snapshots of session state with optional git status capture
  • Checkpoint Search: Lightweight keyword search across all checkpoints with project/session filtering to find historical decisions
  • Smart Compaction: Analyze priority items and generate restoration summaries when approaching context limits
  • Channel System: Automatically derive channels from git branches (e.g., feature/authfeature-auth)
  • Local Storage: SQLite database with WAL mode for fast, reliable persistence
  • Cross-Tool Compatible: Works with any MCP-compatible client (Claude Code, Cursor, Factory, Codex, Cline, etc.)
  • Fully Offline: No cloud account required, all data stays on your machine
  • Plans System: Create PRDs and specs, link issues to plans, track implementation progress
  • Dashboard UI: Local Next.js web interface for visual session, context, and issue management

📦 Installation

Prerequisites

Bun is required - SaveContext uses bun:sqlite for optimal performance:

# Install Bun (macOS, Linux, WSL)
curl -fsSL https://bun.sh/install | bash

Using bunx (Recommended)

bunx @savecontext/mcp

Global Install

bun install -g @savecontext/mcp

From source (Development)

git clone https://github.com/greenfieldlabs-inc/savecontext.git
cd savecontext/server
bun install
bun run build

⚡️ Quick Start

Get started with SaveContext in under a minute:

# 1. Install Bun (if not already installed)
curl -fsSL https://bun.sh/install | bash

# 2. Add to your AI tool's MCP config

Add this to your MCP configuration (Claude Code, Cursor, etc.):

{
  "mcpServers": {
    "savecontext": {
      "command": "bunx",
      "args": ["@savecontext/mcp"]
    }
  }
}

That's it! Your AI assistant now has persistent memory across sessions.

⚠️ Troubleshooting: MCP connection fails

"bunx not found" — GUI apps (Claude Desktop) and some terminals (Ghostty, tmux) don't inherit your shell's PATH.

Fix: Use the full path to bunx and include PATH in env:

{
  "mcpServers": {
    "savecontext": {
      "command": "/Users/YOUR_USERNAME/.bun/bin/bunx",
      "args": ["@savecontext/mcp"],
      "env": {
        "PATH": "/Users/YOUR_USERNAME/.bun/bin:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
      }
    }
  }
}

Find your bun path with: which bunx

Common locations:

  • macOS/Linux: ~/.bun/bin/bunx
  • Homebrew: /opt/homebrew/bin/bunx
  • npm global: /usr/local/bin/bunx

"Module not found" error — If you see Module not found "/opt/homebrew/bin/../dist/index.js" or simila

...

Read full README

Statistics

Stars14
Forks1
Open Issues0
LicenseGNU Affero General Public License v3.0
CreatedNov 2, 2025