HexpmMcp.HexDocs (hexpm_mcp v0.3.2)

Copy Markdown View Source

Client for fetching and parsing hexdocs.pm content.

HexDocs has no structured API. This module:

  1. Fetches the search-data JSON (used by the docs JS search)
  2. Falls back to scraping the sidebar HTML for module listings
  3. Converts individual module pages from HTML to markdown

Summary

Functions

Get documentation for a specific module or function.

Get the module listing for a package (table of contents).

Get the README content for a package, converted to markdown.

Convert HTML content to a simplified markdown representation.

Search within a package's documentation by name.

Functions

get_doc_item(name, module, version \\ nil)

Get documentation for a specific module or function.

get_modules(name, version \\ nil)

Get the module listing for a package (table of contents).

get_readme(name, version \\ nil)

Get the README content for a package, converted to markdown.

html_to_markdown(html)

Convert HTML content to a simplified markdown representation.

Targets the #content area of hexdocs pages and strips navigation, search, and footer chrome.

search_docs(name, query, version \\ nil)

Search within a package's documentation by name.