Purpose
Zettelkasten MCP is a Model Context Protocol (MCP) server for implementing the Zettelkasten knowledge management methodology. It allows users to create, link, explore, and synthesize atomic notes through Claude and other MCP-compatible clients. The Zettelkasten method was developed by German sociologist Niklas Luhmann, who used it to complete more than 70 books and hundreds of articles. Its core principles include: atomicity (each note contains only one idea and is a discrete unit of knowledge), connectivity (notes link to each other to form a knowledge network, with meaningful relationships between ideas), and emergence (as the network grows, new patterns and insights emerge).
The power of this tool lies in its support for multiple ways of exploration: vertical exploration, which means going deeper into a specific topic by following connections within a subject area; and horizontal exploration, which means discovering unexpected relationships between different fields through cross-domain links. This structure encourages serendipity when following trains of thought between notes, while keeping each piece of information easily accessible through unique identifiers. Luhmann called his system a "second brain" or "communication partner," and this digital implementation aims to provide similar benefits through modern technology.
Main Capabilities
- Create atomic notes with unique timestamp-based IDs
- Bidirectionally link notes to build a knowledge graph
- Add tags to notes for classification and organization
- Search notes by content, tags, or links
- Use Markdown format for easy human reading and editing
- Integrate with Claude through MCP for AI-assisted knowledge management
- Dual-storage architecture (see below)
- Synchronous operation model for a simplified architecture
The server supports different types of notes and uses a comprehensive semantic linking system to create meaningful connections between notes. Each link type represents a specific relationship, thereby forming a rich, multidimensional knowledge graph.
Usage
To ensure maximum effectiveness, it is recommended to use the system prompt ("project instructions"), project knowledge, and appropriate chat prompts when asking an LLM to process information or to explore and synthesize Zettelkasten notes. The docs directory in the repository contains the following getting-started files:
- System prompts: system-prompt.md, system-prompt-with-protocol.md
- Project knowledge: zettelkasten-methodology-technical.md, link-types-in-zettelkasten-mcp-server.md (and more information related to the project)
- Chat prompts: chat-prompt-knowledge-creation.md, chat-prompt-knowledge-creation-batch.md, chat-prompt-knowledge-exploration.md, chat-prompt-knowledge-synthesis.md
- Project knowledge (development): Example - A simple MCP server.md, MCP Python SDK-README.md
Note: Source code can optionally be included via tools such as repomix.
Storage Architecture
The system uses a dual-storage approach:
- Markdown files: All notes are stored as human-readable Markdown files with YAML frontmatter metadata. These files are the source of truth and can: be edited directly in any text editor; be placed under version control (Git, etc.); be backed up using standard file backup programs; be shared or transferred like other text files.
- SQLite database: Serves as an index layer, with features including: facilitating efficient query and search operations; enabling Claude to quickly traverse the knowledge graph; maintaining relationship information to accelerate link traversal; automatically rebuilding from Markdown files when needed.
If Markdown files are edited directly outside the system, the zk_rebuild_index tool needs to be run to update the database. The database itself can be deleted at any time, and it will be regenerated from the Markdown files.
Configuration and Startup
In the project root directory, create a .env file by copying the example file, then edit that file to configure connection parameters. The server can be started using the default method, or with explicit configuration.
To connect to Claude Desktop, add the corresponding configuration to Claude Desktop.
Available MCP Tools
All tools are prefixed with zk_ for better organization.
Applicable Scenarios
- Personal knowledge management: Build an atomic, interconnected network of notes
- AI-assisted research: Explore and synthesize knowledge through Claude
- Cross-domain discovery: Use horizontal exploration todiscover unexpected connections between different domains
- In-depth topic study: Use vertical exploration to delve deeply into a specific topic
- Version control and backup: Markdown files can be included in version control such as Git
Limitations
⚠️ Use at your own risk: This software is an experimental project, provided "as is," without warranties of any kind. Although efforts have been made to ensure data integrity, it may contain bugs that could lead to data loss or corruption. Always back up your notes regularly, and use caution when testing with important information.
Project Structure
Includes a comprehensive test suite covering all layers of the application, from models to the MCP server implementation. How to run tests: run the corresponding command from the project root directory.
Acknowledgements
This MCP server was built with the assistance of Claude, which helped organize the project's atomic ideas into a coherent knowledge graph. Like a good Zettelkasten system, Claude connected ideas that might otherwise have remained isolated. However, unlike Luhmann's paper system, Claude does not need 90,000 index cards to be effective.