@aaronshaf/mdq
v0.6.27
Published
CLI tool for indexing and searching local markdown files via Meilisearch
Readme
mdq
CLI for indexing and searching local markdown files via Meilisearch with MCP server support.
Quick Start
1. Install
curl -fsSL https://bun.sh/install | bash
bun install -g @aaronshaf/mdq2. Start Meilisearch
docker run -d -p 7700:7700 \
-v ~/.meilisearch/data:/meili_data \
getmeili/meilisearch:latest3. Index and Search
mdq index --path ~/docs
mdq search "query"Commands
mdq status Check if Meilisearch is running
mdq search <query> Search indexed content
mdq index Build/rebuild index
mdq embed Generate embeddings for semantic search
mdq source Manage registered sources for MCP server
mdq oauth Manage OAuth 2.1 authentication
mdq mcp [sources...] Start MCP serverRun mdq <command> --help for command-specific options.
MCP Server
# Register sources (one-time setup)
mdq source add -s ~/docs -d "Documentation"
mdq source add -s ~/wiki -d "Team wiki"
mdq source list
# Start MCP server (uses registered sources)
mdq mcp
# Or specify sources directly (overrides registered)
mdq mcp -s ~/docs -d "Documentation"
# HTTP mode with Bearer token (simple)
export MDQ_MCP_API_KEY="$(openssl rand -hex 32)"
mdq mcp --http
# Or use OAuth 2.1 (recommended for production)
mdq oauth setup --client-id claude --name "Claude"
mdq mcp --http --oauth --cert ./cert.pem --key ./key.pem
# Add to Claude Code
claude mcp add kb -- mdq mcpDocumentation
See docs/ for comprehensive documentation:
- Getting Started - Full setup guide
- PRD - Product requirements and specifications
- ADR - Architecture decision records
See Also
- qmd - Similar tool with opposite tradeoffs: qmd does LLM work at query time (reranking, query expansion), while mdq does LLM work at index time (embeddings) for fast queries.
