Hackage Documentation MCP
About
An MCP server to give Claude easy access to pulling docs
Details
- Author
- apenugon
- GitHub stars
- 11
- Downloads
- 217
- Categories
- Knowledge Base
Jump to
- Retrieve documentation for specific modules from any Hackage package
- Specify exact package versions to ensure accuracy
- Clean, text‑based output easily consumable by AI assistants
- Requires only an internet connection and Python 3.7+
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
Install Python 3.7+, then pip install httpx beautifulsoup4 fastmcp. Run python main.py to start the server with stdio transport. Use any MCP‑compatible AI assistant to call the tool get_docs(package, version, module) with a Hackage package name, exact version string, and module name (e.g., get_docs("lens", "5.0.0", "Control.Lens")).
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"
]
}
}
Hackage Documentation MCP
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.


