Skip to main content
Glama

ライセンス: AGPL v3PyPIバージョン Python 3.12以上 テスト ラフ 鍛冶屋のバッジ

基本的なメモリ

Basic Memory を使用すると、Claude のような大規模言語モデル (LLM) との自然な会話を通じて永続的な知識を構築できます。その際、すべての情報はシンプルな Markdown ファイルとしてコンピュータ上に保存されます。Model Context Protocol (MCP) を使用することで、互換性のある LLM からローカル知識ベースの読み書きが可能になります。

中断したところから会話を再開しましょう

  • AIアシスタントは新しい会話でローカルファイルからコンテキストを読み込むことができる

  • メモはリアルタイムでMarkdownファイルとしてローカルに保存されます

  • プロジェクトの知識や特別な指示は必要ありません

https://github.com/user-attachments/assets/a55d8238-8dd0-454a-be4c-8860dbbd0ddc

Related MCP server: memora

クイックスタート

# Install with uv (recommended)
uv tool install basic-memory

# Configure Claude Desktop (edit ~/Library/Application Support/Claude/claude_desktop_config.json)
# Add this to your config:
{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory",
        "mcp"
      ]
    }
  }
}
# Now in Claude Desktop, you can:
# - Write notes with "Create a note about coffee brewing methods"
# - Read notes with "What do I know about pour over coffee?"
# - Search with "Find information about Ethiopian beans"

~/basic-memory (デフォルトのディレクトリの場所) 内のファイルを介して共有コンテキストを表示できます。

Smithery経由の代替インストール

Smitheryを使用すると、Claude Desktop の基本メモリを自動的に構成できます。

npx -y @smithery/cli install @basicmachines-co/basic-memory --client claude

これにより、Claude Desktop の設定ファイルを手動で編集することなく、Basic Memory をインストールおよび設定できます。Smithery サーバーは MCP サーバーコンポーネントをホストし、データは Markdown ファイルとしてローカルに保存されたままになります。

グラマ.ai

なぜ基本メモリなのか?

LLMでのやり取りのほとんどは一時的なものです。質問をして答えを得ると、すべて忘れ去られてしまいます。それぞれの会話は、以前の文脈や知識を持たずに、全く新しいものから始まります。現在の回避策には限界があります。

  • チャット履歴は会話を記録しますが、構造化された知識ではありません

  • RAGシステムはドキュメントを照会できるが、LLMに書き戻すことはできない。

  • ベクターデータベースは複雑な設定が必要で、クラウド上に保存されることが多い

  • ナレッジグラフを維持するには、通常、特別なツールが必要です。

Basic Memoryは、人間とLLMの両方が読み書きできる構造化されたMarkdownファイルというシンプルなアプローチでこれらの問題に対処します。主な利点は以下のとおりです。

  • **ローカルファースト:**すべての知識はあなたが管理するファイルに保存されます

  • **双方向:**ユーザーと LLM の両方が同じファイルを読み書きします

  • **構造化されながらもシンプル:**使い慣れたMarkdownとセマンティックパターンを使用

  • トラバース可能な知識グラフ: LLMはトピック間のリンクをたどることができる

  • 標準フォーマット: Obsidianなどの既存のエディタで動作します

  • **軽量インフラストラクチャ:**ローカル SQLite データベースにインデックスされたローカルファイルのみ

基本メモリを使用すると、次のことが可能になります。

  • 過去の知識に基づいた会話をする

  • 自然な会話の中で構造化されたメモを作成する

  • 以前話し合った内容を覚えている法学修士と会話をする

  • 知識グラフを意味的にナビゲートする

  • すべてをローカルで管理

  • Obsidianなどの使い慣れたツールを使用してメモを表示および編集します

  • 時間の経過とともに成長する個人の知識ベースを構築する

実際の仕組み

コーヒーの淹れ方を研究していて、その知識を記録したいとしましょう。その仕組みは以下のとおりです。

  1. 通常通りチャットを始めましょう:

I've been experimenting with different coffee brewing methods. Key things I've learned:

- Pour over gives more clarity in flavor than French press
- Water temperature is critical - around 205°F seems best
- Freshly ground beans make a huge difference

...会話を続けます。

  1. この知識を体系化するために LLM に協力を求めてください。

"Let's write a note about coffee brewing methods."

LLM はシステム上に新しい Markdown ファイルを作成します (Obsidian またはエディターですぐに確認できます)。

---
title: Coffee Brewing Methods
permalink: coffee-brewing-methods
tags:
- coffee
- brewing
---

# Coffee Brewing Methods

## Observations

- [method] Pour over provides more clarity and highlights subtle flavors
- [technique] Water temperature at 205°F (96°C) extracts optimal compounds
- [principle] Freshly ground beans preserve aromatics and flavor

## Relations

- relates_to [[Coffee Bean Origins]]
- requires [[Proper Grinding Technique]]
- affects [[Flavor Extraction]]

メモには、シンプルな Markdown 形式を使用して、セマンティック コンテンツと他のトピックへのリンクが埋め込まれます。

  1. このファイルは、コンピューターの現在のプロジェクト ディレクトリ (デフォルトでは~/$HOME/basic-memory ) にリアルタイムで表示されます。

  • リアルタイム同期はv0.12.0バージョンでデフォルトで有効になっています

  1. LLM とのチャットでは、次のトピックを参照できます。

Look at `coffee-brewing-methods` for context about pour over coffee

LLMはナレッジグラフから豊富なコンテキストを構築できるようになりました。例えば:

Following relation 'relates_to [[Coffee Bean Origins]]':
- Found information about Ethiopian Yirgacheffe
- Notes on Colombian beans' nutty profile
- Altitude effects on bean characteristics

Following relation 'requires [[Proper Grinding Technique]]':
- Burr vs. blade grinder comparisons
- Grind size recommendations for different methods
- Impact of consistent particle size on extraction

関連する各ドキュメントにより、より多くのコンテキストが得られ、知識ベースの豊富な意味的理解が構築されます。

これにより、次の双方向フローが作成されます。

  • 人間がMarkdownファイルを作成し編集する

  • LLMはMCPプロトコルを介して読み書きします

  • 同期により一貫性が保たれます

  • すべての知識はローカル ファイルに保存されます。

技術的実装

内部の基本メモリ:

  1. すべてをMarkdownファイルに保存する

  2. 検索とインデックス作成にSQLiteデータベースを使用する

  3. シンプルなマークダウンパターンから意味を抽出します

    • ファイルはEntityオブジェクトになる

    • 各Entity 、 Observations 、つまりそれに関連付けられた事実を持つことができます。

    • Relationsエンティティを結び付けて知識グラフを形成する

  4. ファイルから得られたローカル知識グラフを維持する

  5. ファイルとナレッジグラフ間の双方向同期を提供します

  6. AI統合のためのモデルコンテキストプロトコル(MCP)を実装

  7. AIアシスタントが知識グラフを横断して操作できるようにするツールを公開する

  8. ツールや会話全体でエンティティを参照するために、memory:// URL を使用します。

ファイル形式は、単純なマークアップがいくつか付いた Markdown です。

各 Markdown ファイルには次の内容が含まれます。

前書き

title: <Entity title>
type: <The type of Entity> (e.g. note)
permalink: <a uri slug>

- <optional metadata> (such as tags) 

観察

観察とは、あるトピックに関する事実です。観察は、 category 、"#" 文字を使ったtags 、そしてオプションのcontextを参照できる特別な形式の Markdown リストを作成することで追加できます。

観察マークダウン形式:

- [category] content #tag (optional context)

観察例:

- [method] Pour over extracts more floral notes than French press
- [tip] Grind size should be medium-fine for pour over #brewing
- [preference] Ethiopian beans have bright, fruity flavors (especially from Yirgacheffe)
- [fact] Lighter roasts generally contain more caffeine than dark roasts
- [experiment] Tried 1:15 coffee-to-water ratio with good results
- [resource] James Hoffman's V60 technique on YouTube is excellent
- [question] Does water temperature affect extraction of different compounds differently?
- [note] My favorite local shop uses a 30-second bloom time

関係

リレーションは他のトピックへのリンクです。ナレッジグラフ内でエンティティがどのように接続されるかを定義します。

マークダウン形式:

- relation_type [[WikiLink]] (optional context)

関係の例:

- pairs_well_with [[Chocolate Desserts]]
- grown_in [[Ethiopia]]
- contrasts_with [[Tea Brewing Methods]]
- requires [[Burr Grinder]]
- improves_with [[Fresh Beans]]
- relates_to [[Morning Routine]]
- inspired_by [[Japanese Coffee Culture]]
- documented_in [[Coffee Journal]]

VS Codeでの使用

ワンクリックでインストールするには、以下のいずれかのインストールボタンをクリックしてください...

VS CodeでUVを使ってインストールする VS Code Insiders で UV を使用してインストールする

VS CodeでBasic Memoryを使用すると、コーディング中に情報を簡単に取得・保存できます。上記のインストールボタンをクリックしてワンクリックでセットアップするか、以下の手動インストール手順に従ってください。

手動インストール

VS Codeのユーザー設定(JSON)ファイルに、以下のJSONブロックを追加します。Ctrl Ctrl + Shift + Pを押してPreferences: Open User Settings (JSON)と入力することで実行できます。

{
  "mcp": {
    "servers": {
      "basic-memory": {
        "command": "uvx",
        "args": ["basic-memory", "mcp"]
      }
    }
  }
}

オプションとして、ワークスペース内の.vscode/mcp.jsonというファイルに追加することもできます。これにより、他のユーザーと設定を共有できるようになります。

{
  "servers": {
    "basic-memory": {
      "command": "uvx",
      "args": ["basic-memory", "mcp"]
    }
  }
}

Claude Desktopでの使用

Basic Memory は MCP (Model Context Protocol) を使用して構築され、Claude デスクトップ アプリ ( https://claude.ai/ ) で動作します。

  1. 基本メモリを使用するようにClaude Desktopを構成します。

MCP 構成ファイルを編集します (通常、OS X の場合は~/Library/Application Support/Claude/claude_desktop_config.jsonにあります)。

{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory",
        "mcp"
      ]
    }
  }
}

特定のプロジェクトを使用する場合は (複数のプロジェクトを参照)、Claude Desktop の設定を更新します。

{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory",
        "--project",
        "your-project-name",
        "mcp"
      ]
    }
  }
}
  1. 知識を同期する:

手動で編集すると、Basic Memory はプロジェクト内のファイルをリアルタイムで同期します。

  1. Claude Desktop では、LLM は次のツールを使用できるようになりました。

write_note(title, content, folder, tags) - Create or update notes
read_note(identifier, page, page_size) - Read notes by title or permalink
build_context(url, depth, timeframe) - Navigate knowledge graph via memory:// URLs
search_notes(query, page, page_size) - Search across your knowledge base
recent_activity(type, depth, timeframe) - Find recently updated information
canvas(nodes, edges, title, folder) - Generate knowledge visualizations
  1. 試すプロンプトの例:

"Create a note about our project architecture decisions"
"Find information about JWT authentication in my notes"
"Create a canvas visualization of my project components"
"Read my notes on the authentication system"
"What have I been working on in the past week?"

詳細情報

詳細については、以下のドキュメントを参照してください。

ライセンス

AGPL-3.0

貢献を歓迎します。ローカル環境でプロジェクトを立ち上げ、プルリクエストを送信する方法については、貢献ガイドをご覧ください。

スターの歴史

Basic Machines によって ♥️ で構築されました

Available Tools

12 tools
bm_contextBuild contextA
Read-onlyIdempotent

Follow the Basic Memory knowledge graph from a note: the note, its observations, and the notes its relations reach, up to depth hops (1-5). identifier is a path, permalink, memory:// URL, or a pattern such as 'specs/*'. since limits related results to recent changes. compact returns the graph without note bodies; read chosen notes with bm_read.

Inputs: project (required), identifier (required), page, depth, +5 more. Returns: result

bm_deleteDelete noteA
DestructiveIdempotent

Delete a Basic Memory note (identifier) or a directory (path). A directory delete removes every file under it and needs recursive=true. Pass expected_checksum (from bm_read) to delete a note only if it is still the revision you read. A note that does not exist is an error. This cannot be undone.

Inputs: project (required), path, recursive, identifier, +2 more. Returns: result

bm_editEdit noteA
Destructive

Change part of an existing Basic Memory note. command: append or prepend content; find_replace find_text with content (exact text, which must occur expected_replacements times, default 1); replace_section, insert_before_section or insert_after_section for a section heading ('Decisions', 'Auth/Decisions', 'Decisions[1]', as bm_read takes it); set_metadata to merge metadata into the frontmatter without touching the body. metadata also merges with any other command. Pass expected_checksum (from bm_read) to edit only the revision you read. A missing note is an error; create notes with bm_write.

Inputs: command (required), project (required), identifier (required), content, +7 more. Returns: result

bm_findFind filesA
Read-onlyIdempotent

Find files in a Basic Memory project, recursively. With name, match file names against a glob ('meeting'). With filters, match notes by frontmatter, e.g. {"status": "active"} or {"priority": {"$in": ["high"]}}, and with fields return just those frontmatter values per note. path limits the search to a folder. For ranked text or meaning search, use bm_search.

Inputs: project (required), name, page, path, +5 more. Returns: result

bm_listList folderA
Read-onlyIdempotent

List one folder of a Basic Memory project: its subfolders, then its files with title, date and id. project is required; '/' lists its root. Discover projects with bm_project(command='list'). Filter files with glob and order them with sort. For a recursive search by name or frontmatter, use bm_find.

Inputs: project (required), glob, page, path, +3 more. Returns: result

bm_manManualA
Read-onlyIdempotent

Read the Basic Memory manual. With no arguments, the index of every page. page reads one page: 'bm-search(3)' for an MCP tool, 'grep(1)' for a shell command; a tool name such as 'bm_search' works too. query lists the pages that mention every word given, like man -k.

Inputs: page, query, output_format. Returns: result

bm_moveMove noteA

Move or rename a Basic Memory note (identifier) or a directory (path) within its project. destination is the new project-relative path; ending it with '/' moves into that folder under the current name ('archive/'). A note keeps its file extension ('.markdown' may become '.md'). Pass expected_checksum (from bm_read) to move a note only if it is still the revision you read. Moving into another project is refused: bm_read, bm_write there, then bm_delete.

Inputs: project (required), destination (required), path, identifier, +2 more. Returns: result

bm_projectProjectsB

Basic Memory projects. command: list (projects, grouped by workspace); create (name, path, optional set_default, workspace); recent (what changed lately in the required project: since, items, paging).

Inputs: command (required), name, page, path, +7 more. Returns: result

bm_readRead noteA
Read-onlyIdempotent

Read a Basic Memory note or file by path, permalink, memory:// URL or exact title. Slice a long note with section (a heading), start_line/end_line or max_tokens; line numbers count the whole file, frontmatter included. A text file such as .txt takes start_line/end_line too. include_content=false returns only the metadata and the checksum that bm_write and bm_edit take as expected_checksum. Images come back as images and other binary files as documents. A missing note is an error: find notes with bm_search.

Inputs: project (required), identifier (required), section, end_line, +5 more.

bm_schemaNote schemasA
Read-onlyIdempotent

Basic Memory note schemas (Picoschema). command: validate notes against their schema (one note_type, one note by identifier, or every type that has a schema); infer a schema from the notes of a note_type; diff a note_type's notes against its schema to find drift. A schema is a note with type: schema whose entity field names the note type it describes.

Inputs: command (required), project (required), note_type, threshold, +2 more. Returns: result

bm_writeWrite noteA
Destructive

Create or replace a Basic Memory note. Give a file path as identifier ('notes/plan.md'), or title plus directory. With a path the file lands exactly there and the title comes from the content's frontmatter, then title, then the file name. An existing note is an error unless overwrite=true; pass expected_checksum (from bm_read) to replace only the revision you read. To change part of a note use bm_edit. Content may hold frontmatter, observations ('- [category] fact #tag') and relations ('- relation_type [[Other Note]]').

Inputs: content (required), project (required), tags, title, +7 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 12 tools

    Disambiguation4/5

    There is real overlap among three retrieval tools (bm_find, bm_list, bm_search), but the descriptions explicitly route the agent: bm_list for one folder, bm_find for recursive name/frontmatter matching, bm_search for ranked text/semantic search. Similarly bm_read (one note body) is distinguished from bm_context (graph traversal) and bm_write (full replace) from bm_edit (partial change). Only a small chance of misselection remains for an agent skimming names.

    Naming Consistency4/5

    All 12 tools follow a single predictable bm_<word> snake_case pattern with no style mixing. Most suffixes are verbs (find, list, read, write, edit, move, delete, search), but a few are nouns/commands (bm_context, bm_schema, bm_project, bm_man), which is a minor deviation rather than an inconsistency.

    Tool Count5/5

    Twelve tools sit comfortably in the well-scoped range and each maps to a distinct capability: directory listing, find, search, read, write, edit, move, delete, graph context, schema ops, project ops, and docs. None look like padding, and the surface is not so thin that agents would have to chain workarounds.

    Completeness4/5

    Note lifecycle is fully covered (create/replace, read, partial edit, move, delete, plus graph context and search), and bm_schema and bm_project cover schema and project management. Minor gaps: bm_project only supports list/create/recent (no rename or delete of projects), and there is no copy/duplicate operation, though the description notes the read+write+delete workaround.

    Maintenance

    ActivityActive
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides persistent memory functionality for AI conversations by creating, managing and querying entities and relationships in a knowledge graph. Features SQLite storage, advanced search capabilities, and Windows auto-start integration for long-term AI memory retention.
      34 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides persistent memory for AI tools by building a local knowledge graph from conversations, enabling cross-session recall and context awareness without cloud dependencies.
      9
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to share persistent, self-improving memory by ingesting, classifying, synthesizing, and retrieving knowledge from Obsidian vaults, code, documents, transcripts, bookmarks, and sessions through MCP and REST interfaces with token-optimized search.
      10 npm
      MIT