Skip to main content
Glama

MCPSaver

Local MCP server for persistent, searchable agent memory.

Python MCP SQLite License

Full landing page: cpntodd.github.io/MCPSaver

MCPSaver replaces flat MEMORY.md files with a SQLite database behind a Model Context Protocol (MCP) server. It provides full-text search (FTS5), workspace context caching, and code symbol indexing -- all running locally over stdio.

Why

Flat Markdown memory files force the agent to read the entire file to find one relevant lesson, burning thousands of tokens on irrelevant history. MCPSaver gives the agent queryable long-term memory with selective retrieval:

Operation

Flat MEMORY.md

MCPSaver

Find a past lesson

Read entire file (~2000 tokens)

search_memory("pytest fixture") (~50 tokens)

Load project context

Run git status, read manifests (~500 tokens)

get_workspace_context() (~30 tokens)

Record a new lesson

Append to MEMORY.md manually

record_lesson(...) (indexed, timestamped)

Check prior art

Grep codebase (~300 tokens)

find_prior_art(symbol="...") (~20 tokens)

Related MCP server: agent-memory

Install

git clone https://github.com/cpntodd/MCPSaver.git
cd MCPSaver
uv sync

Requires Python >= 3.13.

VS Code Configuration

Add to your VS Code mcp.json (User or Workspace settings):

{
    "servers": {
        "mcpsaver": {
            "type": "stdio",
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/MCPSaver",
                "run",
                "mcpsaver"
            ]
        }
    }
}

Or use the Claude Desktop / Cursor equivalent for your MCP client.

Tools

record_lesson

Store a lesson, convention, or correction into persistent memory.

record_lesson(
    lesson_type: "convention" | "self_correction" | "human_correction" | "api_fact" | "decision" | "pattern",
    context: string,
    correction: string,
    mistake?: string,
    pattern?: string,
    tags?: string[],
    workspace?: string
)

search_memory

Full-text search across all lessons using SQLite FTS5 with porter stemming.

search_memory(
    query: string,
    limit?: int (default 10),
    tags?: string[]
)

get_workspace_context / set_workspace_context

Cache and retrieve project metadata (stack, linter, formatter, file tree).

get_workspace_context(workspace: string)
set_workspace_context(
    workspace: string,
    stack?: string[],
    linter?: string,
    formatter?: string,
    test_runner?: string,
    file_tree?: string,
    conventions?: object
)

find_prior_art / index_symbols

Search indexed code symbols to find prior usage of functions, classes, or patterns.

find_prior_art(
    workspace: string,
    symbol?: string,
    kind?: string,
    limit?: int
)

index_symbols(
    workspace: string,
    symbols: [{symbol, kind?, file_path, line?, snippet?}],
    clear_first?: bool
)

list_lessons

List recent lessons with optional type/workspace filters.

get_stats

Return summary statistics about the memory database.

import_memory_md

Import existing MEMORY.md flat files into the SQLite database.

Architecture

~/.local/share/mcpsaver/memory.db   <-- SQLite database (auto-created)
    |
    +-- lessons           <-- Core lessons table (all memory entries)
    +-- lessons_fts       <-- FTS5 full-text index (porter stemming)
    +-- workspace_context <-- Cached project metadata per workspace
    +-- code_symbols      <-- Indexed code symbols per workspace

Storage

All data lives in ~/.local/share/mcpsaver/memory.db. Nothing leaves the machine. The MCP server communicates exclusively over stdio with no network access.

License

GPL-3.0-or-later


(c) 2026 cpntodd

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    MCP server providing persistent memory management for AI agents using SQLite and FTS5, enabling storage, full-text search, and recall of memories with namespace isolation.
    Last updated
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A local-first MCP server for durable agent memory using SQLite and FTS5, enabling knowledge graph storage, search, and recall for AI agents.
    Last updated
    20
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.

  • Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cpntodd/MCPSaver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server