# MCP server for Hackage

**URL:** https://discourse.haskell.org/t/mcp-server-for-hackage/14043
**Category:** Uncategorized
**Created:** [May 6, 2026, 7:59pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043 "2026-05-06T19:59:36Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![tusharad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tusharad/32/5133_2.png) [@tusharad](https://discourse.haskell.org/u/tusharad)
#### Post date: [May 6, 2026, 7:59pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/1 "2026-05-06T19:59:36Z")

</div>

I’ve built an MCP server that lets AI agents use Hackage. The MCP server is entirely written in Haskell.

It lets LLMs:

1. perform Hoogle searches.

2. List package modules

3. 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](https://github.com/tusharad/hackage-doc-mcp)

---

<div class="post-metadata">

### Author: ![f-a](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/f-a/32/2740_2.png) [@f-a](https://discourse.haskell.org/u/f-a)
#### Post date: [May 6, 2026, 8:06pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/2 "2026-05-06T20:06:49Z")

</div>

I tried to follow the link, but I get to a 404 page.

---

<div class="post-metadata">

### Author: ![mchav](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mchav/32/5143_2.png) [@mchav](https://discourse.haskell.org/u/mchav)
#### Post date: [May 6, 2026, 8:07pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/3 "2026-05-06T20:07:29Z")

</div>

Won’t this clobber hackage?

Edit: this is probably good long term but also feels tone deaf right now. Idk. Does it cache things at all?

---

<div class="post-metadata">

### Author: ![tusharad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tusharad/32/5133_2.png) [@tusharad](https://discourse.haskell.org/u/tusharad)
#### Post date: [May 6, 2026, 8:08pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/4 "2026-05-06T20:08:42Z")

</div>

My bad. Repo was private

---

<div class="post-metadata">

### Author: ![tusharad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tusharad/32/5133_2.png) [@tusharad](https://discourse.haskell.org/u/tusharad)
#### Post date: [May 6, 2026, 8:12pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/5 "2026-05-06T20:12:50Z")

</div>

I’ll add caching soon

---

<div class="post-metadata">

### Author: ![wiz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/wiz/32/2408_2.png) [@wiz](https://discourse.haskell.org/u/wiz)
#### Post date: [May 6, 2026, 9:42pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/6 "2026-05-06T21:42:46Z")

</div>

You shouldn’t have been scraping Hackage in the first place. It is already struggling to fend off all kinds of this traffic.

Teach it to build local hoogle and haddock, then use that instead.

---

<div class="post-metadata">

### Author: ![Jappie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jappie/32/5394_2.png) [@Jappie](https://discourse.haskell.org/u/Jappie)
#### Post date: [May 21, 2026, 12:40pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/7 "2026-05-21T12:40:53Z")

</div>

this one does hoogle right [GitHub - jappeace/mcp-hoogle: a local hoogle as an mcp server, makes the agent be able to query local hoogle betterly · GitHub](https://github.com/jappeace/mcp-hoogle)

I don’t get why you’d query upstream hoogle anyway, for a local package dev you get a lot better result just using local dependencies. You’d also get access to private dependencies.  
Although you’d have to built the index, which takes time.

I didn’t do haddocks, that’s a different problem.  
Hmm, I wasn’t aware this existed otherwise I’d probably just repair this project.  
idk if @tusharad is interested in using a local hoogle instead, I’d be happy to archive my version and submit local support to their version?

---

<div class="post-metadata">

### Author: ![tusharad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tusharad/32/5133_2.png) [@tusharad](https://discourse.haskell.org/u/tusharad)
#### Post date: [May 23, 2026, 8:24am UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/8 "2026-05-23T08:24:46Z")

</div>

> [@Jappie](#):
>
> wasn’t aware this existed otherwise I’d probably just repair this project.

Please feel free to send patches!

> [@Jappie](#):
>
> I’d be happy to archive my version and submit local support to their version?

No need to archive; nothing wrong with having multiple tools that are doing the same thing 🙂

---

<div class="post-metadata">

### Author: ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)
#### Post date: [May 25, 2026, 6:22am UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/9 "2026-05-25T06:22:13Z")

</div>

My opinion is that the right thing is to start an ecosystem project that uses LLMs sustainably and responsibly:

- keep blocking all the scrapers and bots
- train our own open weight model on haskell and hackage
- make sure it isn’t optimized for “engagement” (optimally, an LLM for search would be able to recognize when you’re in “mindless prompting” mode and tell you to go read the docs of package XY)
- optimize it for search and small code snippets (“how do I do XY?”)
- give LICENSE warnings/summaries on non-trivial codesnippets

It’s kinda hard to use LLMs in a way that actually enables learning, but maybe someone has to try.

---

<div class="post-metadata">

### Author: ![philh](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@philh](https://discourse.haskell.org/u/philh)
#### Post date: [May 31, 2026, 7:03pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/10 "2026-05-31T19:03:11Z")

</div>

> [@Jappie](#):
>
> I don’t get why you’d query upstream hoogle anyway, for a local package dev you get a lot better result just using local dependencies. You’d also get access to private dependencies.

A local-only package index wouldn’t be able to suggest functions from packages you don’t currently have installed, right? That seems significantly limiting.

---

<div class="post-metadata">

### Author: ![Jappie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jappie/32/5394_2.png) [@Jappie](https://discourse.haskell.org/u/Jappie)
#### Post date: [May 31, 2026, 7:16pm UTC](https://discourse.haskell.org/t/mcp-server-for-hackage/14043/11 "2026-05-31T19:16:51Z")

</div>

hoogle only indexes stackage though, most commercial projects have much more dependencies then what’s just in stackage.  
besides dependencies don’t change all that much (usually).

This isn’t a particular new idea, I think the standard hpkgs nix shell environment already provides a withHoogle option
