Forgetful is a storage and retrieval tool for AI Agents. Designed as a Model Context Protocol (MCP) server built using the FastMCP framework.
$ npx -y skills add ScottRBK/forgetful --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
Repo: ScottRBK/forgetful
What's inside
Forgetful is a storage and retrieval tool for AI Agents. Designed as a Model Context Protocol (MCP) server built using the FastMCP framework. Once connected to this service, MCP clients such as Coding Agents, Chat Bots or your own custom built Agents can store and retrieve information from the same knowledge base.

A lot of us are using AI Agents now, especially in the realm of software development. The pace at which work and decisions are made can make it difficult for you to keep up from a notes and context persistence perspective.
So if you are following something like the BMAD Method for example and you want to take your brain storming session you've just had with Claude on your desktop/mobile and use it for the basis of your next Claude Code session, then having a shared knowledge base across the two agents can help with this.
This is just one example use case to illustrate the point, more and more agentic applications are going to surface and the use cases for sharing data across them is going to increase.
Knowledge bases are going to become a key infrastructure component for your interactions with AIs. There are many excellent knowledge base solutions available (many for free on github) and I would encourage you to check them out and find one that works for you (even if Forgetful doesn't) as I found from personal experience that interactions with my agents got easier and more rewarding once they knew more about me, my work and previous interactions that I had had with them or other AI systems.
What makes Forgetful different from other Memory based MCP services is that it is a rather opinionated view on how AI Agents such store and retrieve data.
Forgetful imposes the Zettelkasten principle when clients wish to record memories, that is each memory must be atomic (one concept per note). Along with the note (title and content), we also ask the client / agent to provide context around what it was doing when creating the note, along with keywords and tags. With this information we create semantic embeddings and store these to aid with later retrieval and in addition to this we also automatically link the memory to existing memories that have a particular similarity score, allowing for the automatic construction of a knowledge graph.
In this sense Forgetful becomes a little bit like Obsidian for AI Agents, where the auto linking nudges them in building up a graph of the knowledge.
We find, as do others (A-MEM: Agentic Memory or LLM Agents), all this helps in ensuring that when the agent requires relevant information from the memory system later, the correct information is returned.
In addition to just memories, Forgetful also has the concept of entities (think organisation, people, products), projects, documents, code artifacts, skills (procedural knowledge following the Agent Skills standard), and plans with tasks for multi-agent coordination, all of which can be associated with one or more memories.

For the complete roadmap, see Features Roadmap.
# Run directly with uvx (no installation needed)
uvx forgetful-ai
# Or install globally
uv tool install forgetful-ai
forgetful
Data stored in platform-appropriate locations (~/.local/share/forgetful on Linux/Mac, AppData on Windows).
By default, runs with stdio transport for MCP clients. For HTTP:
uvx forgetful-ai --transport http --port 8020
git clone https://github.com/ScottRBK/forgetful.git
cd forgetful
# Install dependencies with uv
uv sync
# Run the server (uses SQLite by default)
uv run main.py
The server starts with stdio transport. For HTTP: uv run main.py --transport http
Forgetful provides two Docker deployment options:
cd docker
cp .env.example .env
# Edit .env: Set DATABASE=SQLite and SQLITE_PATH=data/forgetful.db
docker compose -f docker-compose.sqlite.yml up -d
The SQLite database persists in the ./data directory on the host.
See docker-compose.postgres.yml and .env.example
cd docker
cp .env.example .env
# Edit .env: Set DATABASE=Postgres and configure POSTGRES_* settings
docker compose -f docker-compose.postgres.yml up -d
Note: If no .env file exists, the application uses defaults from app/config/settings.py.
For all configuration options, see Configuration Guide.
For detailed connection guides (Claude Code, Claude Desktop, other clients that support MCP), see Connectivity Guide.
Add Forgetful to your MCP client configuration:
stdio transport (recommended for local use):
{
"mcpServers": {
"forgetful": {
"type": "stdio",
"command": "uvx",
"args": ["forgetful-ai"]
}
}
}
HTTP transport (for Docker/remote):
{
"mcpServers": {
"forgetful": {
"type": "http",
"url": "http://localhost:8020/mcp"
}
}
}
The forgetful command is also a full terminal client over the same tool registry the
MCP meta-tools use - against your local database by default, or a remote deployment
after auth login.
uv tool install forgetful-ai
# Curated verbs for daily use
forgetful memory save "Set generateResolvConf false to fix WSL2 DNS" \
--title "WSL2 DNS fix" --importance 7
forgetful memory search "wsl dns" -c "wsl networking" -n 5
forgetful memory get 812
forgetful memory recent -n 10 -p my-project
forgetful project list
# Generic passthrough to any available tool
forgetful tools list --category memory
forgetful tools info query_memory
forgetful call create_project --args '{"name": "Homelab", "description": "...", "project_type": "personal"}'
# Remote deployment (browser OAuth; saves FORGETFUL_SERVER to ~/.config/forgetful/.env)
forgetful auth login --server https://forgetful.example.com
forgetful auth status
forgetful memory search "wsl dns" -c "wsl networking" # now runs remotely
forgetful memory search "wsl dns" -c "wsl networking" --local # force local mode per invocation
# Scripting: --json emits machine-readable output
forgetful memory search "wsl dns" -c "wsl networking" --json | jq '.primary_memories[0].id'
forgetful serve is the canonical way to run the MCP server (forgetful serve --transport http --port 8020); the bare forgetful / uvx forgetful-ai invocation and
the legacy --transport/--re-embed flags keep working indefinitely, so existing MCP
client configurations are unaffected. Headless environments can set FORGETFUL_TOKEN
(bearer) instead of the OAuth flow. See the
Configuration Guide for precedence rules, or walk
through the forgetful-cli-setup skill for install,
auth, and verification steps end-to-end.
Forgetful exposes only 3 meta-tools to MCP clients. The tools available through
execute_forgetful_tool depend on the enabled feature flags. Use
discover_forgetful_tools for the current runtime catalog.
Create a memory linked to a project for better organization and scoped retrieval.
# Create project for organizing related knowledge
project = execute_forgetful_tool(
"create_project",
{
"name": "E-Commerce Platform Redesign",
"project_type": "work",
"status": "active"
}
)
# Create memory linked to project
memory = execute_forgetful_tool(
"create_memory",
{
"title": "Payment gateway: Stripe chosen over PayPal",
"content": "Selected Stripe for its API, fees, and fraud detection.",
"context": "Choosing the payment provider for the redesign",
"keywords": ["payment", "stripe", "paypal"],
"tags": ["payment", "decision"],
"importance": 9,
"project_ids": [project["id"]]
}
)
# Later, query within project scope
results = execute_forgetful_tool(
"query_memory",
{
"query": "payment processing implementation",
"query_context": "Implementing payments for the redesign",
"project_ids": [project["id"]]
}
)
# Returns: Stripe decision + auto-linked related memories
Track people, organizations, and relationships - perfect for team and infrastructure management.
# New engineer joins your company
new_hire = execute_forgetful_tool(
"create_entity",
{
"name": "Jordan Taylor",
"entity_type": "Individual",
"description": "Backend Engineer - Payments Team",
"tags": ["engineering", "backend", "payments"]
}
)
# Get company entity (create if needed)
company = execute_forgetful_tool(
"create_entity",
{
"name": "TechFlow Systems",
"entity_type": "Organization",
"description": "SaaS platform company"
}
)
# Create employment relationship
execute_forgetful_tool(
"create_entity_relationship",
{
"from_entity_id": new_hire["id"],
"to_entity_id": company["id"],
"relationship_type": "works_for",
"metadata": {
"role": "Backend Engineer II",
"department": "Payments",
"start_date": "2025-01-20"
}
}
)
# Create memory about hiring
hire_memory = execute_forgetful_tool(
"create_memory",
{
"title": "Jordan Taylor hired - payments focus",
"content": "Jordan joins to build the Stripe integration and handle PCI compliance.",
"context": "Recording ownership and experience for the payments work",
"keywords": ["jordan", "stripe", "payments", "pci"],
"tags": ["team", "hiring", "payments"],
"importance": 7
}
)
# Link person to memory
execute_forgetful_tool(
"link_entity_to_memory",
{
"entity_id": new_hire["id"],
"memory_id": hire_memory["id"]
}
)
# Query Jordan's related knowledge
results = execute_forgetful_tool(
"query_memory",
{
"query": "Jordan payment implementation",
"query_context": "Finding ownership and experience for payments work"
}
)
# Returns: Hiring memory + linked entity + relationship context
The core catalog covers users, memories, projects, entities, code artifacts, and documents. Skills, files, plans, and tasks appear when their feature flags are enabled.
For complete documentation with extensive examples, see Complete Tool Reference.
Inspired by Zettelkasten, each memory stores one concept in ~300-400 words:
For detailed content, use Documents and extract 3-7 atomic memories that link to the parent document.
When you create a memory:
Entities represent concrete, real-world things (people, organizations, teams, devices) that can be linked to memories:
Use entities for concrete things (Sarah Chen, TechFlow Systems, Cache Server 01) and memories for abstract concepts (architectural patterns, decisions, learnings).
Prevents context window overflow:
This ensures agents get the most relevant context without overwhelming the LLM.
For deep dive on search architecture (dense β sparse β RRF β cross-encoder), see Search Documentation.
No configuration required β Forgetful uses sensible defaults out of the box.
MEMORY_TOKEN_BUDGET β Max tokens for query results (default: 8000)EMBEDDING_MODEL β Embedding model (default: BAAI/bge-small-en-v1.5)MEMORY_NUM_AUTO_LINK β Auto-link count (default: 3, set 0 to disable)SERVER_PORT β HTTP server port (default: 8020)MAX_GRAPH_LIMIT β Upper bound for /api/v1/graph ?limit and /api/v1/graph/subgraph ?max_nodes (default: 2000)For all 40+ environment variables with detailed explanations, see Configuration Guide.
We welcome contributions! Forgetful uses integration + E2E testing with Docker Compose orchestration.
See Contributors Guide for:
MIT License - see LICENSE for details.
.dockerignore
.github/
workflows/
build.yml
ci.yml
e2e.yml
publish.yml
.gitignore
.python-version
AGENTS.md
alembic/
alembic.ini
_db_helpers/
__init__.py
db_postgres_impl.py
db_sqlite_impl.py
env.py
README
script.py.mako
versions/
0c7b964dd1e7_initial_schema_with_entity_many_to_many.py
20251216143413_add_aka_to_entities.py
20260106_add_activity_log_table.py
20260106_add_provenance_tracking_to_memories.py
20260312_add_plans_tasks_criteria_dependencies.py
20260315_add_files_table.py
20260321_add_skills_table.py
20260408_add_provenance_to_all_object_types.py
20260704_add_memory_usage_tracking.py
app/
__init__.py
bootstrap.py
config/
__init__.py
auth.py
logging_config.py
settings.py
events/
__init__.py
event_bus.py
exceptions.py
middleware/
auth.py
logging_middleware.py
models/
__init__.py
activity_models.py
code_artifact_models.py
document_models.py
entity_models.py
file_models.py
graph_models.py
memory_models.py
models.py
plan_models.py
project_models.py
skill_models.py
tool_registry_models.py
user_models.py
protocols/
__init__.py
activity_protocol.py
code_artifact_protocol.py
document_protocol.py
entity_protocol.py
executor.py
file_protocol.py
memory_protocol.py
plan_protocol.py
project_protocol.py
skill_protocol.py
task_protocol.py
user_protocol.py
repositories/
__init__.py
embeddings/
__init__.py
embedding_adapter.py
fastembed_offline.py
reranker_adapter.py
helpers.py
postgres/
__init__.py
activity_repository.py
code_artifact_repository.py
document_repository.py
entity_repository.py
file_repository.py
memory_repository.py
plan_repository.py
postgres_adapter.py
postgres_tables.py
project_repository.py
skill_repository.py
task_repository.py
user_repository.py
sqlite/
activity_repository.py
code_artifact_repository.py
document_repository.py
entity_repository.py
file_repository.py
memory_repository.py
plan_repository.py
project_repository.py
skill_repository.py
sqlite_adapter.py
sqlite_tables.py
task_repository.py
user_repository.py
routes/
__init__.py
api/
__init__.py
activity.py
auth.py
code_artifacts.py
documents.py
entities.py
files.py
graph.py
health.py
memories.py
plans.py
projects.py
skills.py
tasks.py
cli/
__init__.py
auth_commands.py
context.py
local_executor.py
parser.py
paths.py
remote_executor.py
render.py
verbs.py
mcp/
__init__.py
code_artifact_tools.py
document_tools.py
entity_tools.py
memory_tools.py
meta_tools.py
pagination.py
project_tools.py
scope_resolver.py
skill_tools.py
tool_adapters.py
tool_metadata_registry.py
tool_registry.py
user_tools.py
services/
__init__.py
activity_service.py
backup_service.py
code_artifact_service.py
document_service.py
entity_service.py
file_service.py
graph_service.py
memory_service.py
plan_service.py
project_service.py
re_embedding_service.py
skill_service.py
task_service.py
user_service.py
utils/
provenance.py
pydantic_helper.py
token_counter.py
version.py
CLAUDE.md
docker/
.env.example
docker-compose.postgres.yml
docker-compose.sqlite.yml
docker-compose.yml
Dockerfile
docs/
api_reference.md
concepts.md
configuration.md
connectivity_guide.md
contributors.md
copilot-cli/
agents/
forgetful-memory.agent.md
knowledge-explorer.agent.md
memory-curator.agent.md
README.md
skills/
README.md
dev/
cli_plan.md
embedding_migration.md
features_roadmap.md
gemini-cli/
commands/
encode-repo.toml
forgetful-setup.toml
memory-explore.toml
memory-list.toml
memory-save.toml
memory-search.toml
README.md
images/
avatar.png
Forgetful Architecture.drawio_transparent.png
Forgetful Architecture.drawio.png
hero_banner.png
layers.png
Memory Autolinking.drawio.png
OFFLINE_SETUP.md
opencode/
commands/
encode-repo.md
forgetful-setup.md
memory-explore.md
memory-list.md
memory-save.md
memory-search.md
README.md
skills/
README.md
prompts/
comprehensive_project_understanding_prompt.md
custom_agent_integration.md
example_system_prompt.md
knowledge_base_bootstrap_prompt.md
prompts_overview.md
rapid_project_scan_prompt.md
search.md
self-hosting-guide.md
tool_reference.md
forgetful.mycelium.json
GEMINI.md
LICENCE.md
main.py
org_knowledge_proposal.md
pyproject.toml
pytest.ini
README.md
ruff.toml
skills/
forgetful-cli-setup/
SKILL.md
forgetful-context-gather/
SKILL.md
forgetful-encode-repo/
SKILL.md
forgetful-entities/
SKILL.md
forgetful-explore/
SKILL.md
forgetful-files/
SKILL.md
forgetful-mcp-setup/
SKILL.md
forgetful-procedures/
SKILL.md
forgetful-recall/
SKILL.md
forgetful-remember/
SKILL.md
README.md
test_harness/
__init__.py
__main__.py
config.py
container.py
docker/
Dockerfile
opencode.json
runner.py
prompts.py
README.md
report.py
server.py
walkthrough.py
tests/
e2e/
e2e_sqlite/
conftest.py
test_api_activity_sqlite.py
test_api_auth.py
test_api_code_artifacts.py
test_api_documents.py
test_api_entities.py
test_api_files.py
test_api_graph_limit_settings.py
test_api_graph.py
test_api_memories.py
test_api_projects.py
test_api_skills.py
test_auth_cache_sqlite.py
test_auth_sqlite.py
test_cli_passthrough.py
test_cli_remote.py
test_cli_verbs.py
test_code_artifact_tools_sqlite.py
test_document_tools_sqlite.py
test_entity_tools_sqlite.py
test_feature_flags_sqlite.py
test_file_tools_sqlite.py
test_harness_server.py
test_health_sqlite.py
test_link_memories_no_autolink_sqlite.py
test_memory_tools_sqlite.py
test_meta_tools_sqlite.py
test_plan_tools_sqlite.py
test_project_tools_sqlite.py
test_provenance_sqlite.py
test_re_embedding_sqlite.py
test_reranking_sqlite.py
test_scoped_permissions_sqlite.py
test_skill_tools_sqlite.py
test_task_tools_sqlite.py
test_user_tools_sqlite.py
conftest.py
test_api_activity.py
test_auth_e2e.py
test_cli_postgres_e2e.py
test_code_artifact_tools_e2e.py
test_document_tools_e2e.py
test_entity_tools_e2e.py
test_file_tools_e2e.py
test_graph_e2e.py
test_health_e2e.py
test_link_memories_no_autolink_e2e.py
test_memory_tools_e2e.py
test_memory_usage_e2e.py
test_memory_usage_tracking_disabled_e2e.py
test_meta_tools_e2e.py
test_plan_tools_e2e.py
test_project_tools_e2e.py
test_provenance_e2e.py
test_re_embedding_e2e.py
test_reranking_e2e.py
test_skill_tools_e2e.py
test_task_tools_e2e.py
test_user_tools_e2e.py
test_zz_backup_restore_e2e.py
integration/
conftest.py
test_auth_cache.py
test_auth_factory.py
test_auth_info.py
test_auth.py
test_backup_service.py
test_bootstrap.py
test_cli_dispatch.py
test_cli_local_executor.py
test_cli_remote_executor.py
test_cli_verbs_mapping.py
test_code_artifact_service.py
test_config_precedence.py
test_document_service.py
test_entity_service.py
test_event_bus.py
test_fastembed_offline.py
test_file_service.py
test_graph_service_plan_task.py
test_harness_cli.py
test_harness_config.py
test_harness_container.py
test_harness_report.py
test_harness_walkthrough.py
test_http_reranker_adapter.py
test_memory_service.py
test_memory_usage_tracking.py
test_meta_tools_docstrings.py
test_ollama_embeddings_adapter.py
test_openai_embeddings_adapter.py
test_plan_service.py
test_project_service.py
test_provenance.py
test_re_embedding_service.py
test_rest_auth.py
test_scope_resolver.py
test_service_activity_events.py
test_skill_service.py
test_targeted_rebuild_sqlite.py
test_task_service.py
test_tool_registry.py
test_user_service.py
uv.lockFAQ
forgetful is a Claude Code plugin with 10 hand-picked skills for data work, indexed on Flowy. Install it with the command on its page. It includes forgetful-cli-setup, forgetful-context-gather, forgetful-encode-repo. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.