Hackage Documentation MCP
About
An MCP server to give Claude easy access to pulling docs
Details
- License
- MIT
Explore
- Retrieve documentation for specific modules from any package on Hackage
- Specify exact package versions to ensure accuracy
- Clean, text-based output that's easily consumable by AI assistants
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Hackage Documentation MCPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
1. Ensure you have Python 3.7+ installed
2. Install the required dependencies:
pip install httpx beautifulsoup4 fastmcp
python main.py
This will start the MCP server using stdio transport.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"hackage documentation mcp": {
"haskell-hackage-mcp": {
"command": "python",
"args": [
"main.py"
]
}
}
}
}
McpServers
{
"haskell-hackage-mcp": {
"command": "python",
"args": [
"main.py"
]
}
}
Overview
This Machine-Controlled Program (MCP) provides an interface for AI assistants to access Haskell documentation from Hackage. It allows AI models to retrieve precise, up-to-date documentation for specific Haskell modules, improving the AI's ability to assist with Haskell programming despite limited training data in this domain.
Problem Statement
AI language models often have insufficient training data on Haskell compared to more mainstream programming languages. This results in:
- Less accurate code generation for Haskell
- Difficulty understanding Haskell's unique features and abstractions
- Inaccurate or outdated information about Haskell libraries and modules
This tool bridges that gap by enabling AI to retrieve authoritative documentation from Hackage in real-time.
Features
- Retrieve documentation for specific modules from any package on Hackage
- Specify exact package versions to ensure accuracy
- Clean, text-based output that's easily consumable by AI assistants
Installation
1. Ensure you have Python 3.7+ installed
2. Install the required dependencies:
pip install httpx beautifulsoup4 fastmcp
Usage
You can use this MCP with any AI assistant that supports the MCP protocol.
Running the Server
python main.py
This will start the MCP server using stdio transport.
API
The MCP exposes the following tool:
get_docs(package, version, module)
Retrieves documentation for a specific Haskell module.
Parameters:
- package (string): The Hackage package name (e.g., "lens", "yesod-persistent")
- version (string): The package version (e.g., "5.0.0", "2.10.0")
- module (string): The module name to look up (e.g., "Control.Lens", "Database.Persist")
Returns:
- The extracted documentation text for the specified module, or an error message if retrieval fails
Examples:
```python
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



