mcp-hoogle: MCP server exposing Hoogle search over local project dependencies

[ development, ide, library, mit, program ] [ Propose Tags ] [ Report a vulnerability ]

An MCP (Model Context Protocol) server that exposes Hoogle search over your project's local Haskell dependencies. Run from within a nix-shell to give AI assistants type-aware search across all packages.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
werror

Enable -Werror during development

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.2.0
Change log Changelog.md
Dependencies base (>=4.9.1.0 && <4.22), directory (>=1.3 && <1.4), hoogle (>=5.0 && <5.1), mcp-hoogle, mcp-server (>=0.1.0.17 && <0.2), optparse-applicative (>=0.16 && <0.19), stm (>=2.5 && <2.6), text (>=1.2 && <2.2), time (>=1.9 && <1.15) [details]
License MIT
Copyright 2025 Jappie Klooster
Author Jappie Klooster
Maintainer hi@jappie.me
Uploaded by Jappie at 2026-05-18T12:49:04Z
Category Development, IDE
Home page https://github.com/jappeace/mcp-hoogle#readme
Bug tracker https://github.com/jappeace/mcp-hoogle/issues
Source repo head: git clone https://github.com/jappeace/mcp-hoogle
Distributions
Executables mcp-hoogle
Downloads 4 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-05-18 [all 1 reports]

Readme for mcp-hoogle-0.2.0

[back to package description]

Github actions build status

Give me a type signature and I shall move the world.

mcp-hoogle

An MCP (Model Context Protocol) server that exposes Hoogle search over your project's local Haskell dependencies. Run it from within your project's nix-shell to give AI assistants type-aware search across all your project's packages.

Usage

1. Generate a Hoogle database from your project

From within your project's nix-shell (where all dependencies are available):

mcp-hoogle generate

This indexes all packages in your local GHC package database.

2. Run the MCP server

mcp-hoogle serve

Or with a specific database path:

mcp-hoogle serve /path/to/database.hoo

3. Configure Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "hoogle": {
      "command": "mcp-hoogle",
      "args": ["serve"]
    }
  }
}

MCP Tools

The server exposes four tools:

  • search — Search by function name, type signature, or keyword
  • search_type — Search specifically by type signature (e.g. [a] -> Int)
  • lookup_module — Browse exports of a module (e.g. Data.Map)
  • regenerate_database — Re-index packages and reload without restarting the server

Building

nix-shell
cabal build

Or via nix:

nix-build

How it works

  1. mcp-hoogle generate calls hoogle generate --local which indexes all packages registered in the current GHC package database
  2. mcp-hoogle serve loads the generated Hoogle database and exposes it via MCP stdio transport
  3. AI assistants connect via MCP and can search for types, functions, and modules