<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/claude-db-a-database-for-claude-that-saves-your-tokens-pvadkkycv" -->

---
title: claude-db: A Database for Claude That Saves Your Tokens
description: A new open-source tool called claude-db aims to give Claude Code persistent memory by storing project context, decisions, fixes, and patterns outside the...
canonical: https://daily.dev/posts/claude-db-a-database-for-claude-that-saves-your-tokens-pvadkkycv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: claude-db: A Database for Claude That Saves Your Tokens | daily.dev
og:description: A new open-source tool called claude-db aims to give Claude Code persistent memory by storing project context, decisions, fixes, and patterns outside the...
og:url: https://daily.dev/posts/claude-db-a-database-for-claude-that-saves-your-tokens-pvadkkycv
og:image: https://api.daily.dev/og/posts/Pvadkkycv.png
og:image:alt: claude-db: A Database for Claude That Saves Your Tokens
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# claude-db: A Database for Claude That Saves Your Tokens

**[Avijit Dey](https://daily.dev/sources/ullwwn37zsilljprgbshi)** · [@avijit07x](https://daily.dev/avijit07x) · 1 min read · 185 upvotes · 44 comments

## Summary

A new open-source tool called claude-db aims to give Claude Code persistent memory by storing project context, decisions, fixes, and patterns outside the model's context window. It retrieves only relevant information when needed, reducing repeated explanations and freeing up tokens for actual coding. The tool supports SQLite, MongoDB, or PostgreSQL as a backend and is free with no subscription required.

## Content

Claude Code forgets after every session.

So I built **claude-db** to keep the important context outside the context window.

It remembers your previous decisions, fixes, patterns, and project knowledge, then brings back only what matters.

Less re-explaining. Less repeated context. More useful tokens for actual coding.

And you can use your own SQLite, MongoDB, or PostgreSQL database.

Free. Open source. No subscription.

[https://github.com/Avijit07x/claude-db](https://github.com/Avijit07x/claude-db)

## Community discussion

Top comments from developers on daily.dev.

**@snazzie** · 6 upvotes

> did you look at whats currently available before you went and vibe coded another ai memory.

**@devhasibulislam** · 6 upvotes

> Don't you think [**Graphify**](https://graphifylabs.ai/) or [**Obsidian**](https://obsidian.md) is enough to solve this?

**@phatdangminh** · 3 upvotes

> Many thanks

**@agustinbarrientos** · 3 upvotes

> SQLite should come first here, and Postgres can wait until the memory has to move machines

**@bummywatermoon** · 3 upvotes

> How does it compare with [claude-mem](https://github.com/thedotmack/claude-mem) ? It seems that they cover similar use cases 🤔

---

Tags: [#open-source](https://daily.dev/tags/open-source), [#postgresql](https://daily.dev/tags/postgresql), [#claude-code](https://daily.dev/tags/claude-code), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/claude-db-a-database-for-claude-that-saves-your-tokens-pvadkkycv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/claude-db-a-database-for-claude-that-saves-your-tokens-pvadkkycv","headline":"claude-db: A Database for Claude That Saves Your Tokens","text":"A new open-source tool called claude-db aims to give Claude Code persistent memory by storing project context, decisions, fixes, and patterns outside the model's context window. It retrieves only relevant information when needed, reducing repeated explanations and freeing up tokens for actual coding. The tool supports SQLite, MongoDB, or PostgreSQL as a backend and is free with no subscription required.","url":"https://daily.dev/posts/claude-db-a-database-for-claude-that-saves-your-tokens-pvadkkycv","datePublished":"2026-08-16T16:07:39.272Z","dateModified":"2026-08-16T16:11:38.873Z","author":{"@type":"Person","name":"Avijit Dey","url":"https://daily.dev/avijit07x","image":"https://media.daily.dev/image/upload/s--zvM20pRl--/f_auto/v1769233995/avatars/avatar_uLLwwN37zSiLLjpRGbshI?_a=BAMAMiiu0","description":"Web Dev Enthusiast | React | Next.js | Python | Freelancer","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":3780}},"image":"https://media.daily.dev/image/upload/s--UBq-FpFD--/f_auto/v1786896485/posts/Pvadkkycv?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":185},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":44}],"comment":[{"@type":"Comment","text":"did you look at whats currently available before you went and vibe coded another ai memory.","datePublished":"2026-08-17T09:24:16.995Z","url":"https://daily.dev/posts/Pvadkkycv#c-hrKUg4nOT","author":{"@type":"Person","name":"aaron cooper","url":"https://daily.dev/snazzie","image":"https://avatars.githubusercontent.com/u/19627023?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"Don’t you think Graphify or Obsidian is enough to solve this?","datePublished":"2026-08-17T08:31:31.291Z","url":"https://daily.dev/posts/Pvadkkycv#c-XPTOliWGi","author":{"@type":"Person","name":"Hasibul Islam","url":"https://daily.dev/devhasibulislam","image":"https://media.daily.dev/image/upload/s--8y40yD3d--/f_auto/v1759889530/avatars/avatar_5wsOgfIfQiovnOo4FusOT?_a=BAMAK+ZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6}},{"@type":"Comment","text":"Many thanks","datePublished":"2026-08-17T08:30:27.745Z","url":"https://daily.dev/posts/Pvadkkycv#c-TzU8djkGL","author":{"@type":"Person","name":"Phat Dang Minh","url":"https://daily.dev/phatdangminh","image":"https://media.daily.dev/image/upload/s--uEe-dzLM--/f_auto/v1747452091/avatars/avatar_U9YNpHvqD7jM3IxMsDTsP?_a=BAMClqUq0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"SQLite should come first here, and Postgres can wait until the memory has to move machines","datePublished":"2026-08-18T02:36:39.301Z","url":"https://daily.dev/posts/Pvadkkycv#c-TkkUmN1WW","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"How does it compare with claude-mem ? It seems that they cover similar use cases 🤔","datePublished":"2026-08-17T14:34:33.784Z","url":"https://daily.dev/posts/Pvadkkycv#c-ujeWgZRGu","author":{"@type":"Person","name":"bummy","url":"https://daily.dev/bummywatermoon","image":"https://avatars.githubusercontent.com/u/16755668?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/ullwwn37zsilljprgbshi","name":"Avijit Dey"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Avijit Dey","item":"https://daily.dev/sources/ullwwn37zsilljprgbshi"},{"@type":"ListItem","position":3,"name":"claude-db: A Database for Claude That Saves Your Tokens"}]}
```

