zettelkasten-go-mcp

nii236/zettelkasten-go-mcp

3.2

If you are the rightful owner of zettelkasten-go-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A Model Context Protocol (MCP) server for managing a Zettelkasten note-taking system, built in Go.

Tools
7
Resources
0
Prompts
0

Zettelkasten Go MCP

A Model Context Protocol (MCP) server for managing a Zettelkasten note-taking system, built in Go.

Overview

This project implements an MCP server that provides tools for creating, managing, and searching notes in a Zettelkasten system. It stores notes as Markdown files with YAML frontmatter and provides a structured approach to knowledge management through interconnected notes.

Features

  • Note Management: Create, read, update, and delete notes
  • Multiple Note Types: Support for permanent notes, literature notes, fleeting notes, and index notes
  • Search Functionality: Full-text search across note content and metadata
  • Tag System: Organize notes with tags
  • Markdown Storage: Notes stored as standard Markdown files with YAML frontmatter
  • MCP Integration: Seamless integration with MCP-compatible clients

Installation

Prerequisites

  • Go 1.23.6 or later

Build from Source

git clone <repository-url>
cd zettelkasten-go-mcp
go mod download
go build -o bin/zettelkasten-mcp cmd/server/main.go

Configuration

The server can be configured using environment variables or command-line flags:

Environment Variables

# Base directory for your zettelkasten
export ZETTELKASTEN_BASE_DIR="/path/to/your/zettelkasten"

# Directory for notes (relative to base directory)
export ZETTELKASTEN_NOTES_DIR="notes"

# Server identification
export ZETTELKASTEN_SERVER_NAME="my-zettelkasten"

# Optional: Custom note template
export ZETTELKASTEN_TEMPLATE_FILE="/path/to/template.md"

# Timeouts
export ZETTELKASTEN_READ_TIMEOUT="60s"
export ZETTELKASTEN_WRITE_TIMEOUT="60s"

# Enable verbose logging
export ZETTELKASTEN_VERBOSE="true"

# Port for future HTTP interface
export ZETTELKASTEN_PORT="8080"

You can also use the provided example-config.env file as a template:

cp example-config.env .env
# Edit .env with your settings
source .env

Usage

Starting the Server

./bin/zettelkasten-mcp

Command Line Options

./bin/zettelkasten-mcp --help

MCP Tools

The server provides the following MCP tools:

Note Management

  • create_note - Create a new note
  • get_note - Retrieve a note by ID
  • update_note - Update an existing note
  • delete_note - Delete a note
  • list_notes - List all notes with optional filtering

Search

  • search_notes - Search notes by content, title, or tags
  • get_backlinks - Find notes that link to a specific note

Note Types

The system supports four types of notes:

  1. Permanent Notes (permanent) - Main knowledge notes
  2. Literature Notes (literature) - Notes about sources and references
  3. Fleeting Notes (fleeting) - Quick temporary notes
  4. Index Notes (index) - Overview and navigation notes

File Structure

zettelkasten-go-mcp/
├── cmd/server/           # Main application entry point
├── internal/
│   ├── config/          # Configuration management
│   ├── models/          # Data models and types
│   ├── mcp/            # MCP server implementation
│   ├── repository/     # Data access layer
│   ├── services/       # Business logic
│   └── storage/        # File storage implementation
├── backlog/            # Project management
└── bin/               # Compiled binaries

Development

Running Tests

go test ./...

Running with Verbose Logging

ZETTELKASTEN_VERBOSE=true ./bin/zettelkasten-mcp

Contributing

This project uses a structured task management system. See the backlog/ directory for current tasks and project documentation.

License

[Add license information here]

Dependencies