Skip to main content
Glama

Mini Docs MCP

CI Python 3.11+ License: MIT

A Model Context Protocol (MCP) server that transforms your local Markdown files into an intelligent, searchable knowledge base with semantic search and bidirectional linking.

Features

  • Hybrid Search: Combines semantic (vector) search with metadata filtering

  • Backlink Graph: Automatic bidirectional link detection and navigation

  • Active Writing: AI agents can create, update, and link documents

  • Real-time Sync: Watchdog-based file monitoring for instant updates

  • Local-First: All data stays on your machine (SQLite + LanceDB)

Related MCP server: repository-runtime

Quick Start

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/mini-docs-mcp.git
cd mini-docs-mcp

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .

Running the Server

# Using uv
uv run python -m mini_docs_mcp.server

# Or directly
python -m mini_docs_mcp.server

# With custom vault path
VAULT_PATH=/path/to/your/vault python -m mini_docs_mcp.server

Docker Deployment

The server supports SSE (Server-Sent Events) transport mode for HTTP access, perfect for Docker deployments:

  1. Create a .env file (copy from .env.example):

    cp .env.example .env
  2. Configure your settings in .env:

    # Transport mode: stdio or sse
    MCP_TRANSPORT=sse
    
    # SSE server configuration
    MCP_HOST=0.0.0.0
    MCP_PORT=8000
  3. Start the server:

    docker-compose up -d
  4. Change port (edit .env and restart):

    # In .env file
    MCP_PORT=9000
    
    # Restart container
    docker-compose down
    docker-compose up -d

The SSE server will be accessible at http://localhost:8000 (or your configured port).

Claude Desktop Integration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "mini-docs": {
      "command": "python",
      "args": ["-m", "mini_docs_mcp.server"],
      "env": {
        "VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

MCP Tools

Tool

Description

search_vault

Semantic + metadata hybrid search

read_note

Read note with backlinks and related docs

write_note

Create or overwrite a note

patch_note

Update a specific section

link_notes

Create backlinks between notes

list_notes

List notes with filters

find_similar

Find semantically similar documents

suggest_links

Get link suggestions

find_broken_links

Detect broken backlinks

get_note_graph

Get graph context around a note

sync_status

Check/force vault synchronization

MCP Resources

URI

Description

vault://graph/summary

Knowledge base health report

vault://note/recent

Recently modified notes

vault://tags/all

All tags with counts

vault://orphans

Documents with no links

Document Format

Documents use standard Markdown with YAML frontmatter:

---
id: my-document
title: My Document Title
type: concept
tags: [tag1, tag2]
status: draft
---

# My Document Title

Content here with [[backlinks]] to other documents.

## Related Notes

- [[another-document]]

Document Types

  • concept - Explanatory documents

  • task - Action items and todos

  • ref - Reference material

  • log - Meeting notes, journals

  • idea - Brainstorming and drafts

Development

# Install dev dependencies
uv sync --all-extras

# Run tests
uv run pytest

# Run with coverage
uv run pytest --cov=mini_docs_mcp

# Lint
uv run ruff check .

# Format
uv run ruff format .

Architecture

┌─────────────────────────────────────────────────────────┐
│                    MCP Server (FastMCP)                  │
├─────────────────────────────────────────────────────────┤
│  Tools: search, read, write, patch, link, sync, ...     │
│  Resources: graph/summary, note/recent, tags/all, ...   │
├─────────────────────────────────────────────────────────┤
│                     Engine Layer                         │
│  SearchEngine │ ReadEngine │ WriteEngine │ LinkEngine   │
├─────────────────────────────────────────────────────────┤
│                    Storage Layer                         │
│  SQLite (metadata, edges) │ LanceDB (vectors)           │
├─────────────────────────────────────────────────────────┤
│                    File System                           │
│  Markdown Files │ Watchdog (real-time sync)             │
└─────────────────────────────────────────────────────────┘

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to search, read, and traverse a local knowledge base of Markdown files using full-text search and relationship graph, reducing token usage.
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables agents to run hybrid dense and BM25 search over a local folder of Markdown files, read and write notes, and trigger reindexing as the folder changes. It also injects the most relevant sections into each prompt automatically and runs entirely locally with a bundled embedding model.
      12
      -