MDDB Documentation
This directory contains the documentation for MDDB.
Published Site #
The documentation is published at: https://mddb.tradik.com/docs/readme/
Every .md file in this directory is rendered to a static page by the SSG
build (make docs-build) and deployed to Cloudflare Pages. A file's URL comes
from its front-matter slug โ e.g. QUICKSTART.md (slug: docs/quickstart)
is served at https://mddb.tradik.com/docs/quickstart/.
Welcome to the MDDB documentation! This guide will help you understand, deploy, and use MDDB effectively.
๐ Documentation Index #
Documentation Index #
- Quick Start Guide - Get up and running in 5 minutes
- Using MDDB from AI Agents - MCP toolsets and keys, agent instructions,
autoindex, passages, code symbols and graph, corpus packs, confirming destructive tools - MCP Server - Transports, API keys, OAuth 2.1, toolsets and the built-in tool catalogue
- Catalogue Listing Text - The one description MDDB uses in the MCP Registry, on Docker Hub and in directories, and the submissions log
- API Documentation - Complete HTTP/JSON API reference
- OpenAPI specification - Machine-readable API spec (OpenAPI 3.0)
- REST API reference - every endpoint and schema, with a Try it console
- Health Check Guide - Health checks for Docker, Kubernetes, and load balancers
- gRPC Documentation - High-performance gRPC API guide
- Usage Examples - Code examples and integration patterns
- Architecture Guide - System design and internals
- Deployment Guide - Production deployment instructions
- Error handling
- Data models
- Best practices
Guides #
-
Usage Examples - Practical examples and patterns
- Basic operations
- Advanced search queries
- Export and backup
- Shell scripts
- Client libraries (Node.js, Python, Go)
-
Architecture Guide - System design and internals
- High-level architecture
- Storage layer details
- Data flow diagrams
- Design decisions
- Performance characteristics
- Scalability considerations
-
Deployment Guide - Production deployment
- System requirements
- Systemd service setup
- Docker deployment
- Reverse proxy configuration
- Backup strategies
- Monitoring and troubleshooting
- Security hardening
- Scaling strategies
๐ Quick Links #
For New Users #
- Start with Quick Start Guide
- Try the examples in Usage Examples
- Read API Documentation for details
For Developers #
- Understand the Architecture
- Review API Documentation
- Check Usage Examples for integration patterns
For AI Agents #
- Connect and pick toolsets: Using MDDB from AI Agents
- Configure your client: LLM Connections
- Index a repository:
mddb-cli autoindex
For DevOps #
- Follow Deployment Guide
- Set up monitoring and backups
- Review security recommendations
๐ What is MDDB? #
MDDB (Markdown Database) is an AI-native embedded document database for markdown content. Single ~36MB binary, embedded BoltDB storage, zero external dependencies. Core capabilities at a glance (full list in FEATURES and the root README):
- Triple protocol โ HTTP/JSON REST, gRPC/Protobuf, GraphQL, all over TCP or Unix Domain Sockets
- Built-in MCP server โ 116 MCP tools, MCP 2026-07-28 and 2025-11-25 served side by side, stdio + Streamable HTTP + SSE transports for Claude / Cursor / Windsurf / ChatGPT / Ollama / DeepSeek
- Vector / semantic search โ 8 index algorithms (Flat / HNSW / IVF / PQ / OPQ / SQ / SQ4 / BQ), or
autoto let the server choose, with per-collection int8/int4 quantization; OpenAI / Ollama / Cohere / Voyage embeddings or the offline lexical provider - Reference coding โ index other projects' code as reference collections and ask how they solved it (
mddb-cli reference,reference_*MCP tools) - Code intelligence โ where a symbol is defined, who calls it, what implements it: heuristic symbols for 13 programming languages, and precise facts from gopls, basedpyright, phpactor, clangd and rust-analyzer with
autoindex --semantic - Full-text search โ TF-IDF / BM25 / BM25F / PMISparse, 8 modes (simple / boolean / phrase / wildcard / proximity / expression / range / fuzzy), 17-language stemming, typo tolerance
- Hybrid search โ sparse BM25 + dense vector via alpha blending or Reciprocal Rank Fusion
- Code search and code graph โ code indexed as code, chunked on brackets, and linked by calls, includes and references across C/C++, Go, Rust, Java, Python, Ruby, PHP, JS/TS, CSS/HTML, Terraform, Kubernetes, Kustomize and Ansible
- Geosearch โ R-tree + geohash radius / bounding-box queries, composable with FTS and vector
- Memory RAG โ conversational memory with session management and semantic recall
- Multi-format upload โ 20 file formats (
.md,.txt,.html,.pdf,.docx,.odt,.rtf,.tex,.yaml,.xlsx,.ods,.csv,.tsv,.pptx,.odp,.epub,.eml,.mboxand more) auto-converted to Markdown; URL import; synced sources (sitemap, URL list, S3 prefix); Wikipedia XML dump streaming - Authentication โ JWT, API keys, per-collection RBAC, per-protocol access modes
- TLS / mTLS โ built-in HTTPS with optional client certificate authentication
- Replication โ leader-follower binlog streaming for read scaling
- Backup, restore & repair โ consistent, integrity-checked backups;
mddbd -verify-dband-repair-dbfor a damaged database file - Corpus packs โ a collection built once and installed read-only anywhere, without re-embedding or reindexing
- Work Tracking for Agents - A read-only mirror of issues and pull requests, a plan and backlog collection, and session hand-over through the memory tools
- Model training โ collections exported as a training dataset, and the trainer commands your operator configured started as jobs, with trial runs and before/after evaluation; MDDB itself trains nothing. New to model files? The step-by-step guide
- Open WebUI engines โ Open WebUI's external web search, reranker and document loader settings pointed at MDDB (
/v1/web-search,/v1/rerank,/v1/extract), each a module that starts off - Elasticsearch-compatible subset โ Elasticsearch clients search and write MDDB under
/es(MDDB_ES_COMPAT=true), with every unsupported clause refused by name - Qdrant-compatible point query โ
qdrant-client'squery_points, and so Open WebUI's External Knowledge Source (Qdrant provider), searches a collection under/qdrant(MDDB_QDRANT_COMPAT=true) - Automation โ triggers, crons, webhooks, sentiment analysis, template variables
- Document TTL with auto-expiry, full revision history, schema validation, aggregations (facets + histograms)
- Web Admin Panel โ React UI for documents, users, search, geo, settings
๐ฏ Common Use Cases #
Content Management #
- Blog posts and articles
- Documentation systems
- Knowledge bases
- Static site generators
Multi-language Content #
- Internationalized websites
- Multi-region documentation
- Localized marketing content
Version Control #
- Content approval workflows
- Change tracking
- Audit trails
- Point-in-time recovery
๐ง Key Features #
The full feature matrix is maintained in FEATURES. Storage internals (buckets, data flow, design decisions) are in ARCHITECTURE. Don't duplicate them here.
๐ Performance #
Numbers, methodology and benchmarks live in their own document โ see BENCHMARK or run the bench suite under tools/bench/. This index intentionally does not pin throughput targets that would drift from reality.
๐ Security #
For the security model (the layers a request passes through, trust boundaries, what's deliberately out of scope) see the Security Model section in ARCHITECTURE.md. For practical setup:
- AUTHENTICATION โ JWT, API keys, RBAC, group permissions
- TLS โ HTTPS + mTLS setup, openssl recipes, deployment patterns
- config โ Unix Domain Socket transport
- DEPLOYMENT โ production hardening checklist
Version-by-version changes for any of these layers live in CHANGELOG, not here.
๐ ๏ธ Development #
Building from Source #
git clone <repository-url>
cd mddb
make build
Running Tests #
make test
make test-coverage
Development Mode #
make install-dev-tools
make dev
Code Quality #
make fmt # Format code
make lint # Run linter
make tidy # Tidy modules
๐ฆ Installation Methods #
Binary Release #
Download from releases page and run:
./mddbd
Build from Source #
make build
make run
Docker #
docker run -p 11023:11023 -v mddb-data:/data mddb:latest
Docker Compose #
docker-compose up -d
๐ค Contributing #
Contributions are welcome! Please:
- Read the Architecture Guide
- Follow Go best practices
- Add tests for new features
- Update documentation
- Update CHANGELOG
Standards & References #
This documentation follows industry standards:
-
RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in our documentation are to be interpreted as described in RFC 2119.
๐ License #
See LICENSE file for details.
๐ Links #
๐ก Support #
- Check documentation first
- Search existing issues
- Open new issue with details
- Include version and OS information
Happy documenting with MDDB! ๐