Engram MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add engram-mcp -- npx -y @cartisien/engram-mcp
README.md

Persistent semantic memory for AI agents

@cartisien/engram-mcp

Persistent semantic memory for AI agents — MCP server powered by @cartisien/engram

Give any MCP-compatible AI client (Claude Desktop, Cursor, Windsurf) persistent memory that survives across sessions.

npx -y @cartisien/engram-mcp

What it does

Exposes 5 tools to any MCP client:

Tool Description
remember Store a memory with automatic embedding
recall Semantic search across stored memories
history Recent conversation history
forget Delete one memory, a session, or entries before a date
stats Memory statistics for a session

Memories are stored in SQLite. Semantic search uses local Ollama embeddings (nomic-embed-text) — no API key, no cloud. Falls back to keyword search if Ollama isn't available.


Quick Start

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "engram": {
      "command": "npx",
      "args": ["-y", "@cartisien/engram-mcp"],
      "env": {
        "ENGRAM_DB": "~/.engram/memory.db"
      }
    }
  }
}

Restart Claude Desktop. You'll see remember, recall, history, forget, and stats available as tools.

Cursor / Windsurf

Add to your MCP config:

{
  "mcpServers": {
    "engram": {
      "command": "npx",
      "args": ["-y", "@cartisien/engram-mcp"]
    }
  }
}

Configuration

Env Var Default Description
ENGRAM_DB ~/.engram/memory.db SQLite database path
ENGRAM_EMBEDDING_URL http://localhost:11434 Ollama base URL for embeddings

Local Embeddings (Recommended)

Install Ollama and pull the embedding model:

ollama pull nomic-embed-text

Semantic search activates automatically. Without Ollama, keyword search is used.


Example Usage

Once connected, your agent can:

remember(sessionId="myagent", content="User prefers TypeScript over JavaScript", role="user")

recall(sessionId="myagent", query="what are the user's coding preferences?", limit=5)
# Returns: [{ content: "User prefers TypeScript...", similarity: 0.82 }, ...]

history(sessionId="myagent", limit=10)

stats(sessionId="myagent")
# { total: 42, byRole: { user: 20, assistant: 22 }, withEmbeddings: 42 }

Part of the Cartisien Memory Suite

  • `@cartisien/engram` — core memory SDK
  • @cartisien/engram-mcp — this package, MCP server
  • @cartisien/extensa — vector infrastructure (coming soon)
  • @cartisien/cogito — agent identity & lifecycle (coming soon)

MIT © Cartisien Interactive

Tools (5)

rememberStore a memory with automatic embedding
recallSemantic search across stored memories
historyRecent conversation history
forgetDelete one memory, a session, or entries before a date
statsMemory statistics for a session

Environment Variables

ENGRAM_DBSQLite database path
ENGRAM_EMBEDDING_URLOllama base URL for embeddings

Configuration

claude_desktop_config.json
{"mcpServers": {"engram": {"command": "npx", "args": ["-y", "@cartisien/engram-mcp"], "env": {"ENGRAM_DB": "~/.engram/memory.db"}}}}

Try it

Remember that I prefer using TypeScript for all my new projects.
Recall what I told you earlier about my coding preferences.
Show me the history of our conversation for the current session.
What are the memory statistics for my current agent session?
Forget the memory entry regarding my old project configuration.

Frequently Asked Questions

What are the key features of Engram MCP?

Persistent memory that survives across AI agent sessions. Semantic search powered by local Ollama embeddings. SQLite-backed storage for reliability. Keyword search fallback when Ollama is unavailable. Comprehensive memory management tools including history and stats.

What can I use Engram MCP for?

Maintaining long-term context about user preferences across different coding sessions. Storing project-specific knowledge that needs to be retrieved by an AI agent later. Managing agent identity and conversation history for complex, multi-step tasks. Building local-first AI applications that do not rely on cloud-based memory services.

How do I install Engram MCP?

Install Engram MCP by running: npx -y @cartisien/engram-mcp

What MCP clients work with Engram MCP?

Engram MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Engram MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare