# Forgetful

> Open-source MCP server that gives AI agents a shared, persistent memory and knowledge graph with semantic search.

Forgetful is an open-source memory storage and retrieval server for AI agents, built as a Model Context Protocol (MCP) server on the FastMCP framework. MCP clients such as coding agents, chat bots, or custom agents connect to it and read from and write to the same knowledge base. It is published on GitHub by ScottRBK under the MIT license.

## What It Is

Forgetful is a persistent memory layer for AI agents. A client stores notes and later retrieves them with natural-language queries, so context from one session or agent, such as a brainstorming chat in Claude Desktop, can carry over into another, such as a Claude Code session. Beyond memories, it also manages entities (people, organizations, products), projects, documents, code artifacts, skills in the Agent Skills format, and plans with tasks for multi-agent coordination, all linkable to memories.

## How Memory Works

Forgetful takes an opinionated approach based on the Zettelkasten principle: each memory is atomic, covering one concept. The agent supplies a title, content, the context in which it was written, and keywords and tags. Forgetful generates semantic embeddings with FastEmbed, finds similar existing memories above a configurable similarity threshold, and automatically links them, building a knowledge graph. Queries return primary matches plus one-hop linked memories, constrained by a configurable token budget and memory count, with optional cross-encoder reranking.

## Deployment and Interfaces

It runs over stdio or HTTP transport and stores data in SQLite by default or PostgreSQL for larger deployments. Embedding and reranking can run locally without cloud calls. Install options are PyPI (`uvx forgetful-ai`), from source, or Docker Compose. Only three meta-tools are exposed to clients, to preserve context window. The `forgetful` command also works as a terminal client for saving and searching memories, running locally or against a remote deployment after OAuth login. Connection guides cover Claude Code, VS Code, Copilot CLI, Cursor, Codex, Gemini CLI, and Opencode.

## Features
- MCP server with stdio or HTTP transport
- Atomic Zettelkasten-style memories with context, keywords and tags
- Semantic vector search from natural-language queries
- Automatic linking of similar memories into a knowledge graph
- Cross-encoder reranking
- Local embeddings via FastEmbed with no cloud calls required
- SQLite (default) or PostgreSQL storage
- Meta-tool discovery exposing only three tools to preserve context window
- Entities, projects, documents, and code artifacts
- Plans and tasks for multi-agent coordination
- Skills with import/export in Agent Skills SKILL.md format
- Token budget management for query results
- Terminal CLI client with local and remote modes and JSON output
- Docker Compose deployment

## Integrations
Claude Code, Claude Desktop, VS Code, Copilot CLI, Cursor, Codex, Gemini CLI, Opencode, FastMCP, FastEmbed, PostgreSQL, pgvector, SQLite

## Platforms
WINDOWS, MACOS, LINUX, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Version
v0.5.5

## Links
- Website: https://github.com/ScottRBK/forgetful
- Documentation: https://github.com/ScottRBK/forgetful/tree/main/docs
- Repository: https://github.com/ScottRBK/forgetful
- EveryDev.ai: https://www.everydev.ai/tools/forgetful
