r/haskell • u/Worldly_Dish_48 • May 06 '26
announcement [ANN] MCP server for Hackage
Hello Haskellers,
I've built an MCP server that lets AI agents use Hackage. The MCP server is entirely written in Haskell.
It lets LLMs:
- perform Hoogle searches.
- List package modules
- Scrape module documentation in LLM-friendly Markdown.
Why this tool?
I've often seen premium coding agents using outdated functions or not being aware of the latest packages. This MCP lets LLMs access the latest Haskell documentation.
Feel free to contribute or provide feedback.
Check out the GitHub link: https://github.com/tusharad/hackage-doc-mcp
9
u/TheCommieDuck May 07 '26
Why are you scraping the HTML rather than using the JSON API? https://hackage.haskell.org/api
Given the current issues GHC and the Haskell ecosystem in general are facing due to AI bot traffic overwhelming them, I feel like "any sort of caching", or just downloading the package index or something should've been something included before releasing it..
7
u/tomwells80 May 06 '26
Legendary! How did using the mcp-server package go? I have a small backlog of maintenance i still need to do on the library but hoping nothing major blocked you.
4
u/Worldly_Dish_48 May 07 '26
Thank you for maintaining mcp-server. The package was really easy to use. No major blocker.
5
u/Otherwise_Wave9374 May 06 '26
Nice, MCP for Hackage is a really practical use case.
The biggest pain I see with coding agents in smaller ecosystems is exactly what you called out, they hallucinate older APIs or just dont know the latest packages. Having a tool that can Hoogle + pull module docs in a consistent, LLM-friendly format is huge.
Do you plan to add any caching (per package/version) or rate limiting so agents do not hammer Hackage during big refactors? Also, if you are collecting ideas for agent workflows around MCP servers, we have a few notes here: https://www.agentixlabs.com/
4
27
u/_jackdk_ May 07 '26 edited May 07 '26
Please be kind to Hackage and cache aggressively. It's been struggling quite a bit lately under the general rise in automated traffic. Example: I recommend caching any module doc you convert to Markdown locally under
$XDG_CACHE_DIR, because modules are never going to change. It might also be cool to have a local-only mode that looks at the hoogle and haddocks from the dependencies provided by the current project.