watashi-db

watashi-db

Provides a local, persistent context database for AI tools via MCP, enabling them to recall user preferences, decisions, and experiences across sessions. It is fully local with optional sync, and works with any MCP client.

Category
访问服务器

README

watashi-db

Personal context database you own. AI tools connect to it — not the other way around.

日本語版 README

[!NOTE] v0.x is early-stage. APIs and data structures may have breaking changes. All data is stored locally (~/.watashi-db/default.db). Nothing is sent externally (unless you explicitly opt in to the OpenAI embedding provider, which sends record summaries to the embedding API).


What is watashi-db?

Every time you start a new AI session, you start from zero — re-explaining your preferences, your tech stack, your past decisions. The AI is smart but knows nothing about you.

watashi-db fixes this. It's a local database that accumulates your preferences, decisions, and experiences, then serves them to any MCP-compatible AI tool at session start.

The AI stays stateless. You gain continuity.

Before / After

Before After
Session start "I use TypeScript, prefer Japanese comments, and…" (every time) AI loads your profile automatically via watashi_get(profile)
Past decisions "I think we decided on X last week…" (from memory) /recall DB design pulls up the exact Decision with reasoning
Lessons learned Lost between sessions Episodes distill into reusable Insights over time
Multi-tool Each AI tool has its own silo One database, any MCP client

Who is this for?

Developers who use MCP-compatible AI tools (Claude Code, Codex CLI, Antigravity, Claude Desktop, etc.) daily and want their AI to remember context across sessions — without handing their data to a vendor.


Key Features

  • Zero-effort recording — AI records your preferences, decisions, and experiences in the background during normal conversation. You don't write anything manually.
  • Experience distillation — Raw episodes are refined into reusable Insights, Models, and Theories over time (/groom). Not just a memo database.
  • Fully local — SQLite + FTS5. No cloud, no external calls by default (the optional OpenAI embedding provider is opt-in). Your data stays on your machine.
  • Vendor-neutral — Any MCP client can connect. Switch AI tools without losing context.
  • Auditable — Every write is logged (who, what, why). Changes are retracted, never deleted.
  • Multi-device sync — Optional snapshot sync via Google Drive or any cloud storage.

Quick Start

Step 1: Register the MCP server

# Claude Code
claude mcp add --scope user watashi-db -- npx -y watashi-db@latest

# Codex CLI
codex mcp add watashi-db -- npx -y watashi-db@latest

<details> <summary>Antigravity</summary>

Add to Antigravity's mcp_config.json (CLI: ~/.gemini/antigravity-cli/mcp_config.json, IDE: ~/.gemini/antigravity/mcp_config.json — open via Manage MCP Servers → View raw config):

{
  "mcpServers": {
    "watashi-db": {
      "command": "npx",
      "args": ["-y", "watashi-db@latest"]
    }
  }
}

</details>

<details> <summary>Claude Desktop</summary>

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "watashi-db": {
      "command": "npx",
      "args": ["-y", "watashi-db@latest"]
    }
  }
}

</details>

Step 2: Set up hooks and skills (Claude Code)

npx watashi-db setup

Restart Claude Code. That's it.

  • Hooks auto-remind the AI to record decisions and experiences during conversation
  • @nolog prefix on any prompt skips recording for that message
  • /recall searches your past decisions, preferences, and experiences

Alternative: Plugin Marketplace (Claude Code)

If you use Claude Code, you can install everything (MCP server, hooks, skills, agents) in one step via the plugin marketplace — with automatic updates:

/plugin marketplace add bareforge/watashi-db
/plugin install watashi-db@watashi-db

This is equivalent to Steps 1-2 above but uses Anthropic's plugin system.

[!TIP] @latest ensures the latest version is used on every client restart.

For detailed setup (multi-device sync, Codex CLI policies, Cowork plugin, building from source), see the Setup Guide.


How It Works

┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐
│ Claude Code  │  │ Codex CLI   │  │ Antigravity │  │ Any MCP     │
│ (MCP Client) │  │ (MCP Client)│  │ (MCP Client)│  │   Client    │
└──────┬───────┘  └──────┬──────┘  └──────┬──────┘  └──────┬──────┘
       └─────────────────┼─────────────────┘
                         │ MCP (stdio)
               ┌─────────▼─────────┐
               │    watashi-db      │
               │   (MCP Server)     │
               │                    │
               │  SQLite + FTS5     │
               │  ~/.watashi-db/    │
               └────────────────────┘
  1. You work normally. AI records your preferences, decisions, and experiences in the background.
  2. Old records fade. Entries naturally lose search priority over time — no manual cleanup needed.
  3. You run /groom occasionally. This distills recurring patterns into lasting Insights, so valuable lessons survive while noise disappears.

That's it. No entity types to learn, no manual tagging. Just use your AI tools and let watashi-db build your context over time.


How is this different?

Approach Limitation watashi-db's answer
CLAUDE.md / .cursorrules Static instructions, manually maintained Dynamic experience memory, auto-recorded by AI
ChatGPT Memory / Claude Projects Vendor-locked, opaque, no export You own the SQLite file. Any MCP client can read it
Obsidian + MCP General-purpose notes, no structured experience model Purpose-built for decisions, episodes, and distillation
Mem0 / Zep Cloud-dependent memory layers Fully local, zero external dependencies

watashi-db is complementary to CLAUDE.md — static rules go in CLAUDE.md, evolving experience goes in watashi-db.


Documentation

Document Description
Setup Guide Installation, multi-device sync, Cowork plugin
Config Guide All config.json options
Why watashi-db Philosophy: the statelessness problem in AI collaboration

<details> <summary>For contributors / deep-dive</summary>

Document Description
Entity Taxonomy How data is classified (Claim → Episode → Insight → Model)
Design Principles Architectural decisions and review criteria (Japanese)
L1/L2 Theory Theoretical foundation: structured reasoning languages (Japanese)
Runtime Schema / ER Diagram Source Data model; canonical logical names are in the A5:SQL Mk-2 file (not viewable on GitHub; requires A5:SQL Mk-2)

</details>


Development

git clone https://github.com/bareforge/watashi-db.git && cd watashi-db
npm install && npm run build
npm test

License

Business Source License 1.1

  • Personal / non-commercial / educational / evaluation use: Always free
  • Commercial use: License required (bareforge.license@outlook.jp)
  • Change Date: After 2029-03-16, automatically converts to Apache License 2.0

[!NOTE] Versions v0.0.12 and earlier were published under MIT License. If you obtained an MIT-licensed version, you may continue using that version under MIT terms.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选