Skip to main content
Glama

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/mdq

2. Start Meilisearch

docker run -d -p 7700:7700 \
  -v ~/.meilisearch/data:/meili_data \
  getmeili/meilisearch:latest
mdq index --path ~/docs
mdq search "query"

Related MCP server: docs-rag-mcp

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 token               Generate API tokens for Bearer authentication
mdq oauth               Manage OAuth 2.1 authentication
mdq mcp [sources...]    Start MCP server

Run 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)
mdq token generate  # Generate and save the token
export MDQ_MCP_API_KEY="<your-token>"
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 mcp

Documentation

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.

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
      D
      maintenance
      Provides semantic search over markdown documentation using RAG, allowing natural language queries and integration with MCP clients.
      1
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Searches local markdown files using TF-IDF retrieval and serves full documents as resources.
      1
      -
    • A
      license
      B
      quality
      B
      maintenance
      Provides local hybrid search over files by combining semantic vector and full-text BM25 retrieval, with MCP stdio/HTTP support, OAuth 2.1 authentication, and tools for reading and converting documents to Markdown.
      23
      MIT