Zettelkasten AI 助手のロゴ

Zettelkasten AI 助手

コミュニティ
joshylchen

Comprehensive AI-powered knowledge management system implementing the Zettelkasten method. Features atomic note creation, full-text search, AI-powered CEQRC workflows (Capture→Explain→Question→Refine→Connect), intelligent link discovery, and multi-interface access (CLI, API, Web UI, MCP). Perfect for researchers, students, and knowledge workers.

公開者joshylchen
リポジトリzettelkasten
言語Python
フォーク
9
スター
39
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    Zettelkasten AI 助手は、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 利用可能なツール(0個)

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースプロジェクトの注目度

    リンク先のリポジトリには39件のスターと9件のフォークがあります。

🧠 Zettelkasten AI Assistant

A comprehensive, AI-powered Zettelkasten (slip-box) knowledge management system that helps you capture, refine, and connect atomic ideas. Built with modern Python and designed for both personal use and integration with AI systems via the Model Context Protocol (MCP).

Created by JoshChen

🎯 Problem & Solution Scope

The Knowledge Management Challenge

Managing knowledge effectively is hard when our brains are constrained by limited working memory and high cognitive load. Traditional note-taking or Zettelkasten tools often become just dumping grounds for information, adding extraneous cognitive load (effort spent managing the tool itself) on top of the intrinsic load (the difficulty of the content). This leaves little room for germane load – the actual learning and schema-building that leads to understanding. The result is lots of notes but little insight, as the user is overwhelmed by organizing mechanics instead of focusing on knowledge processing.

Our Solution: An Active Conversational Partner

Zettelkasten LLM Assistant is designed as an active conversational partner rather than a passive note archive. It guides the user through capturing ideas, refining them (using the Feynman Technique), and integrating them into a knowledge network. By doing so, it:

  • Reduces extraneous load: The system automates organizing, linking, and summarizing
  • Maximizes germane load: Users spend effort on understanding and explaining concepts
  • Acts as a Socratic partner: The LLM plays a curious 12-year-old student, prompting clarity through questions
  • Transforms tacit to explicit knowledge: Converts intuitive understanding into clear, shareable notes
  • Builds your "second brain": Creates an external cognitive system that enhances your thinking

This approach shifts the cognitive burden from tool management to knowledge processing, enabling deeper learning and insight generation.

🎯 Core Philosophy

This system implements the Zettelkasten method digitally with AI assistance:

  • Atomic Notes: One idea per note, uniquely identified and timestamped
  • Bi-directional Linking: Typed relationships between notes create a knowledge graph
  • AI-Enhanced Workflow: Optional LLM assistance for refinement, summarization, and connections
  • Future-Proof Storage: Plain Markdown files with YAML frontmatter as the source of truth
  • MCP Integration: Expose your knowledge base to AI assistants and agents

✨ Key Features

📝 Note Management

  • Atomic Notes: Each note contains a single concept with unique ID, title, body, and summary
  • Smart Summaries: AI-generated summaries (280 char limit) for quick scanning
  • YAML Frontmatter: Rich metadata including tags, links, status, and timestamps
  • Multiple Interfaces: CLI, Web API, Streamlit UI, and MCP tools

🔍 Advanced Search

  • Full-Text Search: SQLite FTS5 searches across titles, bodies, and summaries
  • Semantic Queries: Support for proximity search (NEAR/N), phrase matching
  • Tag Filtering: Combine text search with tag-based filtering
  • Snippet Highlights: Search results show highlighted matching text

🤖 AI-Powered Workflows

  • CEQRC Pipeline: Capture → Explain → Question → Refine → Connect
  • Auto-Summarization: Generate concise summaries with configurable length limits
  • Metadata Suggestions: AI suggests better titles, tags, and relationships
  • Link Discovery: Automatic suggestion of connections between related notes

🌐 Multiple Interfaces

  • FastAPI REST API: Full CRUD operations with OpenAPI documentation
  • CLI Tools: Command-line interface for power users and automation
  • Streamlit Web UI: User-friendly interface with real-time features
  • MCP Server: Expose tools to AI assistants and agents

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • pip or conda

Installation

bash
# 1) Clone the repository
git clone https://github.com/joshylchen/zettelkasten
cd zettelkasten

# 2) Create and activate virtual environment
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate

# 3) Install dependencies
pip install -r requirements.txt

# 4) Configure environment
cp .env.example .env
# Edit .env with your preferences (API keys, paths, etc.)

# 5) Initialize data directories
mkdir -p data/notes data/db

Choose Your Interface

🌐 Web API (Recommended for integrations)

bash
python -m zettelkasten.server.api
# Access at: http://127.0.0.1:8088/docs

🖥️ Streamlit UI (Best for interactive use)

bash
streamlit run ui_streamlit.py
# Access at: http://localhost:8501

⌨️ Command Line

bash
# Create your first note
python -m zettelkasten.cli new "Machine Learning" \
  -c "The field of study focused on algorithms that improve through experience" \
  -t ai,learning,algorithms

# Search your notes
python -m zettelkasten.cli search "machine learning"

# See all commands
python -m zettelkasten.cli --help

Your First Note

Using the Streamlit UI:

  1. Open http://localhost:8501
  2. Go to "Create / Edit" tab
  3. Enter title: "My First Zettel"
  4. Add content and let AI generate a summary
  5. Add relevant tags
  6. Click "Create"

🏗️ Architecture Overview

Storage Layer

data/
├── notes/           # Markdown files (source of truth)
│   ├── 20250915064516.md
│   └── 20250915064517.md
└── db/
    └── zettelkasten.db  # SQLite index + FTS

Note Structure:

yaml
---
id: '20250915064516'
title: 'Machine Learning Fundamentals'  
summary: 'Core concepts of ML including supervised, unsupervised learning and model evaluation techniques'
tags: [ai, learning, algorithms]
links: 
  - {to: '20250915064517', type: 'supports'}
created_at: '2025-09-15T06:45:16Z'
updated_at: '2025-09-15T06:45:50Z'
status: 'PERMANENT'
---

# Machine Learning Fundamentals

Machine learning is a subset of artificial intelligence...

System Components

Database Schema

  • zettel: Core note data (id, title, body, summary, timestamps)
  • tag: Tag definitions
  • zettel_tag: Note-tag relationships
  • link: Typed relationships between notes
  • zettel_fts: Full-text search index (FTS5)

CEQRC Workflow

  1. Capture: Create seed notes with initial thoughts
  2. Explain: Add detailed explanations and context
  3. Question: AI generates probing questions (Feynman technique)
  4. Refine: Improve content based on questions
  5. Connect: Discover and create links to related notes

🔧 Configuration

Key environment variables in .env:

bash
# Paths
ZK_NOTES_DIR=./data/notes
ZK_DB_PATH=./data/db/zettelkasten.db

# Server
ZK_HOST=127.0.0.1
ZK_PORT=8088

# AI Integration
OPENAI_API_KEY=your_key_here
ZK_LLM_PROVIDER=openai  # or 'stub' for testing

# Summary Settings  
ZK_SUMMARY_MAX_LENGTH=280

# UI
ZK_STREAMLIT_PORT=8501

📚 API Reference

Core Endpoints

Notes

  • POST /notes - Create note (auto-generates summary if not provided)
  • GET /notes/{id} - Retrieve note with all metadata
  • PUT /notes/{id} - Update note (regenerates summary if body changed)
  • DELETE /notes/{id} - Delete note and relationships

Search & Discovery

  • GET /search?q={query}&tag={tag} - Full-text search across title, body, summary
  • GET /notes/{id}/backlinks - Find notes linking to this one
  • POST /generate-summary - Generate AI summary for text

Workflows

  • POST /notes/{id}/ceqrc - Run complete CEQRC workflow
  • POST /notes/{id}/links - Create typed relationship

Links

  • POST /notes/{source}/links - Create relationship
    json
    {"target_id": "20250915064517", "type": "supports", "description": "optional"}

Link Types

  • supports / supported_by - Evidence or justification
  • refines / refined_by - More specific version
  • extends / extended_by - Builds upon concept
  • contradicts / contradicted_by - Opposing viewpoint
  • is_example_of / has_example - Concrete instance
  • related - General association

🧪 Testing

bash
# Run all tests
pytest

# Run with coverage
pytest --cov=zettelkasten_assistant

# Run specific test file
pytest tests/test_notes.py

# Verbose output
pytest -v

Test coverage includes:

  • Note CRUD operations with summaries
  • Full-text search across all fields
  • API endpoint functionality
  • CEQRC workflow execution
  • Link relationship management

🤖 AI Integration

LLM Providers

  • OpenAI: Full AI features (requires API key)
  • Stub: Testing mode with deterministic responses

AI-Powered Features

  • Smart Summaries: Generate concise summaries within character limits
  • Metadata Suggestions: Improve titles, tags, and categorization
  • Content Refinement: Polish and improve note content
  • Link Discovery: Find relationships between notes
  • Feynman Probing: Generate questions to test understanding

MCP (Model Context Protocol) Integration

Expose your Zettelkasten to AI assistants like Claude Desktop:

Quick MCP Setup

bash
python setup_mcp.py  # Automated setup and config generation

Available MCP Tools

  • zk_create_note: Create atomic notes with AI summaries
  • zk_search_notes: Full-text search with FTS5 syntax
  • zk_get_note: Retrieve notes with metadata and backlinks
  • zk_run_ceqrc_workflow: Execute AI-powered learning workflow
  • zk_suggest_links: Discover connections between notes
  • zk_create_link: Create typed relationships (supports, refines, extends, etc.)
  • zk_generate_summary: Generate AI summaries for any text

Claude Desktop Configuration

json
{
  "mcpServers": {
    "zettelkasten": {
      "command": "python", 
      "args": ["path/to/mcp_server.py"],
      "env": {"OPENAI_API_KEY": "your_key_here"}
    }
  }
}

See docs/MCP_SETUP.md for complete integration guide.

🎯 Use Cases

Research & Learning

  • Capture research findings as atomic notes
  • Build concept maps through typed links
  • Use AI to generate study questions
  • Create summary views of complex topics

Content Creation

  • Organize ideas for articles, books, courses
  • Track sources and evidence
  • Build argument structures through links
  • Generate outlines from connected notes

Knowledge Management

  • Personal wiki with AI assistance
  • Meeting notes with automatic summaries
  • Documentation with smart cross-references
  • Project knowledge base

AI Assistant Integration

  • Let ChatGPT/Claude access your knowledge base
  • Automated note creation from conversations
  • AI-powered content suggestions
  • Intelligent information retrieval

📖 Documentation

DocumentDescription
docs/USER_GUIDE.mdComplete user manual with examples
docs/USE_CASES.mdReal-world usage scenarios
docs/DESIGN.mdArchitecture and design decisions
docs/MCP_INTEGRATION.mdAI assistant integration guide
docs/SPECS.mdTechnical specifications and API reference

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite (pytest)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

🔗 Related Projects

⚖️ License

MIT License - see LICENSE file for details.

Built with ❤️ for knowledge workers, researchers, and AI enthusiasts.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "joshylchen-zettelkasten": {
      "command": "",
      "args": []
    }
  }
}

Zettelkasten AI 助手のMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Zettelkasten AI 助手に接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」→「詳細設定」→「Model Context Protocol」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「Model Context Protocol」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Zettelkasten AI 助手をサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Zettelkasten AI 助手のMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタのステータスが「準備完了」のままか確認するには、画面を更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "joshylchen-zettelkasten": {
      "command": "npx",
      "args": [
        "-y",
        "zettelkasten"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてZettelkasten AI 助手のMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Zettelkasten AI 助手のMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Zettelkasten AI 助手を使ってこのタスクを手伝ってもらえますか?
Zettelkasten AI 助手
はい、読みました。
Zettelkasten AI 助手で調べた結果をお伝えします。

よくある質問

Zettelkasten AI 助手 MCPサーバーは何に使いますか?

Zettelkasten AI 助手は、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでは、複数のAIモデルでZettelkasten AI 助手 MCPを利用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでZettelkasten AI 助手を利用できます。

TypingMindでZettelkasten AI 助手 MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けのトップクラスのフロントエンドです。Zettelkasten AI 助手を接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Zettelkasten AI 助手 MCPをTypingMindに接続するにはどうすればよいですか?

Zettelkasten AI 助手はTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでZettelkasten AI 助手 MCPのどのようなツールを利用できますか?

Zettelkasten AI 助手はMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Zettelkasten AI 助手 MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Zettelkasten AI 助手で認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇