mix hex.docs.mcp (HexDocs MCP v0.1.0)
View SourceFetches Hex docs for a package, converts HTML to markdown, creates semantic chunks, and generates embeddings by default.
Usage
$ mix hex.docs.mcp COMMAND [options] PACKAGE [VERSION]
COMMAND
- Eitherfetch
orsearch
(required)PACKAGE
- Hex package name to work with (required for fetch/search)VERSION
- Package version to work with (optional, defaults to latest)
Options
--model MODEL - Ollama model to use for embeddings (default: nomic-embed-text)
--query QUERY - Query string for search command
Examples
$ mix hex.docs.mcp fetch phoenix # Download, chunk docs and generate embeddings
$ mix hex.docs.mcp fetch --model all-minilm phoenix # Use custom model for embeddings
$ mix hex.docs.mcp search --query "channels" phoenix # Search in existing embeddings
The fetch command:
- Downloads docs using mix hex.docs
- Converts HTML to a single markdown file
- Chunks the markdown text for embedding in vector databases
- Generates embeddings using Ollama
- Automatically creates the database if it doesn't exist
The search command:
- Looks up existing embeddings for the specified package
- Performs a similarity search using the query
- Returns the most relevant results
Summary
Functions
Callback implementation for Mix.Task.run/1
.
Functions
Callback implementation for Mix.Task.run/1
.