
bradleygolden/hexdocs-mcp 是从 https://github.com/bradleygolden/hexdocs-mcp. 导入的 MCP 服务器候选服务器。
概览
bradleygolden/hexdocs-mcp 是从 https://github.com/bradleygolden/hexdocs-mcp. 导入的 MCP 服务器候选服务器。
概述(AI 翻译)
HexDocs MCP 是一个为 Hex 包文档提供语义搜索功能的项目,专为 AI 应用设计。它由两个主要组成部分组成:
- 一个Elixir二进制文件,可下载、处理并生成Hex包文档中的嵌入
- 一个实现模型上下文协议(MCP)的TypeScript服务器,调用Elixir二进制文件来获取和搜索文档
[!注意] 本文档反映了主分支当前的开发状态。 有关最新稳定版的文档,请参见最新发布页面和最新发布分支。
安装
MCP 客户端配置
TypeScript MCP 服务器实现了模型上下文协议(MCP),设计用于兼容 MCP 的客户端,如 Cursor、Claude Desktop App、Continue 等。该服务器提供十六进制文档的语义搜索工具。有关所有兼容 MCP 客户端的完整列表,请参见 MCP 客户端文档。
把这个添加到你客户端的MCP json配置里:
该命令会自动将灵药二进制文件下载到文档fetch_docs和搜索文档中。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
HexDocs MCP
HexDocs MCP is a project that provides semantic search capabilities for Hex package documentation, designed specifically for AI applications. It consists of two main components:
- An Elixir binary that downloads, processes, and generates embeddings from Hex package documentation
- A TypeScript server implementing the Model Context Protocol (MCP) that calls the Elixir binary to fetch and search documentation
[!CAUTION] This documentation reflects the current development state on the main branch. For documentation on the latest stable release, please see the latest release page and the latest release branch.
Installation
MCP Client Configuration
The TypeScript MCP server implements the Model Context Protocol (MCP) and is designed to be used by MCP-compatible clients such as Cursor, Claude Desktop App, Continue, and others. The server provides tools for semantic search of Hex documentation. For a complete list of MCP-compatible clients, see the MCP Clients documentation.
Add this to your client’s MCP json config:
{
"mcpServers": {
"hexdocs-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}
This command will automatically download the elixir binaries to both fetch_docs and search documentation. While the server handles downloading the binaries, you still need Elixir and Mix installed on your system for the HexDocs fetching functionality to work properly.
Smithery
Alternatively, you can use Smithery to automatically add the MCP server to your client config.
For example, for Cursor, you can use the following command:
npx -y @smithery/cli@latest install @bradleygolden/hexdocs-mcp --client cursor
Elixir Package
Alternatively, you can add the hexdocs_mcp package to your project if you don’t want to use the MCP server.
{:hexdocs_mcp, "~> 0.5.0", only: :dev, runtime: false}
And if you use floki or any other dependencies that are marked as only available in
another environment, update them to be available in the :dev environment as well.
For example floki is commonly used in :test:
{:floki, ">= 0.30.0", only: :test}
But you can update it to be available in the :dev environment:
{:floki, ">= 0.30.0", only: [:dev, :test]}
Requirements
- Ollama - Required for generating embeddings
- Run
ollama pull mxbai-embed-largeto download the recommended embedding model - Ensure Ollama is running before using the embedding features
- Run
- Elixir 1.16+ and Erlang/OTP 26+
- Installed automatically in CI environments
- Required locally for development
安装
npx -y [email protected]配置
{
"mcpServers": {
"hexdocs-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}