npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

watashi-db

v0.0.7

Published

わたしDB - User-owned personal context database as an MCP server for AI tools

Readme

watashi-db (わたしDB)

User-owned personal context database as an MCP server. Each AI tool connects with permission — reversing vendor lock-in.

[!NOTE] v0.x は開発初期段階です。 APIやデータ構造に破壊的変更が入る可能性があります。 データはすべてローカル(~/.watashi-db/watashi.db)に保存され、外部送信は一切ありません。


概要

わたしDB は、ユーザーが自分の情報(好み・スキル・価値観・意思決定)を所有し、各社のAIツールがMCP(Model Context Protocol)を通じて接続・利用する「パーソナルコンテキストデータベース」です。

従来、AIツールごとにユーザー情報がサイロ化していた問題を解決し、ベンダーロックインの逆転 を実現します。

特徴

  • SPO三つ組モデル: Subject-Predicate-Object 形式でユーザー知識を構造的に記録
  • MCP準拠: Model Context Protocol サーバーとして動作、あらゆるMCPクライアントから接続可能
  • SQLite + FTS5: ローカルファイルDB、全文検索対応、ゼロ依存のインフラ
  • 変更履歴保持: Claimの更新は全て履歴に記録、削除ではなく撤回(retract)モデル
  • 監査ログ: 全操作に「誰が・何を・なぜ」を自動記録
  • Provenance自動付与: 接続元AIの情報をサーバー側で自動記録(自己申告に依存しない)
  • L2推論基盤: Claim間の関係(推論グラフ)、構造化根拠参照、検証ログ

セットアップ

前提条件

  • Node.js >= 18
  • MCP対応のAIクライアント(Claude Code, Claude Desktop 等)

インストール

npm install -g watashi-db

Claude Code での設定

claude mcp add watashi-db -- npx watashi-db

または ~/.claude.json に直接記述:

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

Claude Desktop での設定

claude_desktop_config.json に追加:

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

Claude Code Cowork プラグイン

Releases から watashi-db-cowork-plugin.zip をダウンロードし、Cowork UI の「プラグインをアップロード」からインストールできます。

プラグインには以下のスキルが含まれます:

| スキル | 説明 | |--------|------| | /session-start | セッション開始時にプロファイルとコンテキストを自動読み込み | | /remember <内容> | ユーザーの好み・スキル・知識をわたしDBに記録 | | /reflect [トピック] | エピソード・意思決定の振り返りとパターン分析 |


使い方

ユーザー情報の登録

AIとの会話中に自然に情報が登録されます。

# Claimとして登録(SPO三つ組)
watashi_store_claim:
  subject: "user"
  predicate: "prefers"
  object: "日本語コメント"
  category: "preference"

# 好みの簡易登録
watashi_store_preference:
  preference: "ダークモードのエディタ"

情報の取得

# プロファイル全体像(セッション開始時に推奨)
watashi_get_profile_summary

# トピック関連のコンテキスト検索
watashi_query_context:
  topic: "TypeScript"

# 条件検索
watashi_search_claims:
  category: "skill"
  status: "active"

意思決定の記録

watashi_log_decision:
  title: "MIT LICENSEを採用"
  description: "オープンソースライセンスの選定"
  reasoning: "最も自由度が高く、個人プロジェクトに適切"
  alternatives: ["Apache 2.0", "GPL v3"]

アーキテクチャ

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Claude Code   │    │ Claude Desktop  │    │  Other AI Tool  │
│  (MCP Client)   │    │  (MCP Client)   │    │  (MCP Client)   │
└────────┬────────┘    └────────┬────────┘    └────────┬────────┘
         │ MCP                  │ MCP                  │ MCP
         └──────────────────────┼──────────────────────┘
                                │
                    ┌───────────▼───────────┐
                    │     watashi-db        │
                    │   (MCP Server)        │
                    │                       │
                    │  ┌─────────────────┐  │
                    │  │   Tools (17)    │  │
                    │  │  Resources (2)  │  │
                    │  │  Prompts (1)    │  │
                    │  └────────┬────────┘  │
                    │           │           │
                    │  ┌────────▼────────┐  │
                    │  │   SQLite + FTS5 │  │
                    │  │  (~/.watashi-db │  │
                    │  │   /watashi.db)  │  │
                    │  └─────────────────┘  │
                    └───────────────────────┘

データモデル

| テーブル | 説明 | |---------|------| | claims | SPO三つ組の知識断片(主語・述語・目的語) | | claims_fts | FTS5全文検索インデックス | | claim_history | Claimの変更履歴 | | claim_relations | Claim間の推論関係(7種: supports, contradicts, derives, ...) | | claim_evidence | 構造化根拠参照(7種: url, file, claim, ...) | | claim_checks | 検証ログ(7種 x 4結果) | | decisions | 意思決定ログ | | decisions_fts | Decisions用FTS5全文検索インデックス | | episodes | 思考パターン・意思決定エピソード(文脈→問題→欲求→決定→結果→原則) | | episodes_fts | Episodes用FTS5全文検索インデックス | | audit_log | 全操作の監査ログ |

MCPツール一覧

| ツール | 説明 | |--------|------| | watashi_store_claim | SPO三つ組でユーザー知識を記録 | | watashi_update_claim | 既存Claimを更新(履歴付き) | | watashi_retract_claim | Claimを撤回(削除ではない) | | watashi_supersede_claim | Claimを新しいClaimで置き換え | | watashi_get_claim | Claim詳細 + 変更履歴を取得 | | watashi_search_claims | 条件検索(カテゴリ・スコープ・テキスト) | | watashi_query_context | FTS5全文検索でコンテキスト取得 | | watashi_log_decision | 意思決定を構造的に記録 | | watashi_list_decisions | 意思決定ログの検索・一覧 | | watashi_update_decision_status | 意思決定のステータス遷移 | | watashi_get_profile_summary | プロファイル全体像をMarkdownで取得 | | watashi_store_preference | 好みの簡易登録ショートカット | | watashi_log_episode | 思考パターン・意思決定エピソードを構造的に記録 | | watashi_list_episodes | エピソードの検索・一覧(FTS5・タグ対応) | | watashi_get_episode | エピソード詳細を取得 | | watashi_backup_db | SQLiteファイルのバックアップ | | watashi_export_json | 全データのJSONエクスポート |


背景思想

わたしDBは L1/L2言語構想 から派生したプロジェクトです。

  • L2(AI内部思考言語): AIが内部で使う構造化された中間表現
  • L1(人間向け監査言語): 人間が読める形でAIの思考を説明する言語

わたしDBはまず「パーソナルコンテキストストア」としての完成を目指し、将来的にL2推論基盤としての発展を構想しています。


開発

# ビルド
npm run build

# テスト
npm test

# 開発モード(ファイル監視)
npm run dev

DBファイルの場所

~/.watashi-db/watashi.db

ライセンス

MIT