claude-diary-mcp-server

robhicks/claude-diary-mcp-server

3.1

If you are the rightful owner of claude-diary-mcp-server 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.

Claude Diary MCP Server is a fast, memory-safe server written in Rust that allows users to query their diary entries stored in an SQLite database.

Tools
4
Resources
0
Prompts
0

Claude Diary MCP Server

A fast, memory-safe MCP (Model Context Protocol) server written in Rust that provides tools to query your Claude diary entries stored in SQLite.

Features

  • get_today_diary: Get diary entries for today
  • get_yesterday_diary: Get diary entries for yesterday
  • get_diary_by_date: Get diary entries for a specific date (YYYY-MM-DD format)
  • get_recent_sessions: Get recent diary sessions (configurable limit)

Prerequisites

  • Rust (1.75 or later)
  • SQLite database with diary entries (created by the Claude diary hook)

Setup

  1. Clone and build:

    git clone https://github.com/robhicks/claude-diary-mcp-server
    cd claude-diary-mcp-server
    cargo build --release
    
  2. Configure Claude Code: Add this MCP server to your Claude Code configuration:

    {
      "mcpServers": {
        "diary": {
          "command": "/path/to/claude-diary-mcp-server/target/release/claude-diary-mcp-server"
        }
      }
    }
    

    Or use the MCP configuration directly:

    claude --mcp-config /path/to/claude-diary-mcp-server/mcp-config.json
    

Usage

Once configured, you can use these tools in Claude Code:

Get Today's Entries

Use the get_today_diary tool to see what I worked on today

Get Yesterday's Entries

Use the get_yesterday_diary tool to see what I worked on yesterday

Get Specific Date

Use the get_diary_by_date tool to see what I worked on 2025-08-25

Get Recent Sessions

Use the get_recent_sessions tool to show my last 10 sessions

Database Schema

The server reads from the SQLite database created by the diary hook:

  • sessions: Main session records with timing
  • accomplishments: What was accomplished in each session
  • objectives: Session goals inferred from user prompts
  • issues: Problems encountered during sessions
  • tool_usage: Which Claude Code tools were used

Development

Build for development:

cargo build

Run the server:

cargo run

Run tests:

cargo test

Performance

This Rust implementation provides:

  • ⚡ Fast startup times
  • 🔒 Memory safety without garbage collection
  • 📦 Single statically-linked binary
  • 🚀 Concurrent query processing with async/await

Output Format

The tools return formatted markdown with:

  • Session timestamps and durations
  • Accomplishments grouped by category
  • Session objectives
  • Issues encountered
  • Tool usage statistics

Perfect for getting context on your recent work or reviewing progress!