Skip to Content

Local MCP Server

Unforget provides a local MCP server that runs entirely on your machine with an embedded PostgreSQL database. No external server, API keys, or database setup required.

This is ideal for:

  • Claude Code / Claude Desktop — give Claude long-term memory across conversations
  • Cursor — remember project context, decisions, and preferences
  • VS Code Copilot — persistent memory across coding sessions
  • Any MCP client — standard MCP protocol over stdio or SSE

How It Works

Running unforget-mcp starts the full Unforget memory system locally:

  • Starts an embedded PostgreSQL (pgserver) automatically
  • Enables pgvector for semantic search
  • Loads local embedding model (all-MiniLM-L6-v2) — no API calls needed
  • Exposes 5 memory tools via MCP protocol
  • Data persists in ~/.unforget/mcp-data/ across restarts

No LLM calls on write. No API keys. No Docker. Everything runs locally.

Setup

1. Install the server

pipx install unforget-mcp

2. Connect your MCP client

Claude Code

claude mcp add unforget -- unforget-mcp

Or add to your project’s .mcp.json:

{ "mcpServers": { "unforget": { "command": "unforget-mcp", "args": [] } } }

Cursor

Add to Cursor settings → MCP Servers:

{ "mcpServers": { "unforget": { "command": "unforget-mcp", "args": [] } } }

VS Code (Copilot)

Add to .vscode/mcp.json:

{ "mcpServers": { "unforget": { "command": "unforget-mcp", "args": [] } } }

Claude Desktop

Add to claude_desktop_config.json:

{ "mcpServers": { "unforget": { "command": "unforget-mcp", "args": [] } } }

Available Tools

ToolDescription
memory_storeStore a fact, preference, or decision to long-term memory
memory_searchSearch memories using 4-channel hybrid retrieval (semantic + BM25 + entity + temporal)
memory_forgetDelete memories by search query or specific ID
memory_listBrowse all stored memories, optionally filtered by type
memory_updateUpdate a memory with new content, preserving the version history

Tool Details

memory_store

content: string — The fact or information to remember memory_type: string — "insight" (facts/preferences) or "event" (interactions) tags: string[] — Optional tags for categorization importance: float — 0.0 to 1.0 (default: 0.7)
query: string — Natural language search query limit: int — Max results (default: 5)

Uses 4-channel retrieval: semantic similarity, BM25 keyword matching, named entity overlap, and temporal recency. Results are fused with Reciprocal Rank Fusion and reranked with a cross-encoder.

memory_forget

query: string — Search query to find and delete matching memories memory_id: string — Or delete a specific memory by UUID

memory_list

memory_type: string — Filter: "insight", "event", or "raw" limit: int — Max results (default: 20)

memory_update

memory_id: string — UUID of the memory to update new_content: string — Updated content (old version preserved in history)

Environment Variables

VariableDefaultDescription
UNFORGET_DATABASE_URL(embedded)Override with external PostgreSQL URL

Options

# Embedded mode (default) unforget-mcp # External database unforget-mcp --database-url postgresql://user:pass@localhost/db # Custom scoping unforget-mcp --org-id myproject --agent-id claude # SSE transport (for HTTP-based MCP clients) unforget-mcp --transport sse --port 8767

Troubleshooting

Slow first startup

The first startup downloads the embedding model (~90MB) and initializes the database. Subsequent starts are much faster (under 10 seconds).

Port conflicts

If you’re running unforget-embed (for OpenClaw) on the default port, the MCP server uses a separate data directory (~/.unforget/mcp-data/) so they don’t conflict.

Last updated on
Apache 2.0 · Unforget