Usage
Transport Modes
Stdio (default)
Communicates via stdin/stdout. Used by:- Claude Desktop — Configure in
claude_desktop_config.json - Cline — Add to MCP servers list
- Other MCP clients — Any client supporting stdio transport
HTTP
Exposes MCP over HTTP/SSE. Useful for:- Web-based clients
- Custom integrations
- Remote access
http://localhost:8181/mcp
HTTP Daemon
Runs HTTP server in background:~/.cache/qmd/mcp.log
PID stored in ~/.cache/qmd/mcp.pid
Options
Use HTTP transport instead of stdio
Run as background daemon (requires
--http)HTTP port (requires
--http)MCP Tools Provided
The server exposes these tools to AI agents:search
Hybrid search with BM25 + vector + reranking. Parameters:query(string, required) — Search querycollection(string) — Filter by collectionlimit(number, default: 10) — Max resultsminScore(number, default: 0) — Min score threshold
vector_search
Vector semantic search only. Parameters:query(string, required) — Search querycollection(string) — Filter by collectionlimit(number, default: 10) — Max resultsminScore(number, default: 0.3) — Min similarity threshold
list_collections
List all indexed collections. Parameters: Noneget_document
Retrieve single document by path or docid. Parameters:path(string, required) — Virtual path, filesystem path, or docid
multi_get
Batch retrieve multiple documents. Parameters:pattern(string, required) — Glob pattern or comma-separated listmaxBytes(number, default: 10240) — Skip files larger than this
list_files
List files in a collection. Parameters:collection(string) — Collection name (omit to list collections)path(string) — Path prefix to filter by
Configuration
Claude Desktop
Add to~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Cline (VS Code)
Add to MCP servers configuration:Custom HTTP Client
Daemon Management
- Auto-restarts if parent process dies (detached)
- Writes logs to
~/.cache/qmd/mcp.log(truncated on each start) - Stores PID in
~/.cache/qmd/mcp.pid - Cleaned up automatically if process dies
Error Handling
Port already in use:--port to specify different port.
Daemon already running:
Examples
Security Notes
- Stdio: Secure (direct process communication)
- HTTP: No authentication — bind to localhost only
- Daemon: Accessible to all local processes on the port
Related Commands
qmd status
Check if MCP daemon is running
MCP integration guide
Set up MCP with AI agents
qmd query
Test search before exposing via MCP