Skip to content

voidus/hoogle-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hoogle-mcp

⚠️ AI SLOP WARNING ⚠️ This project was generated by an AI assistant. The code has not been thoroughly reviewed or tested in production. Use at your own risk.

MCP server that exposes Hoogle (Haskell documentation search) as a tool for AI agents.

Usage

Build the server:

nix build

The executable will be at ./result/bin/hoogle-mcp.

Integration with Claude Code

Global Configuration

Add to ~/.config/claude-code/mcp_settings.json:

{
  "mcpServers": {
    "hoogle": {
      "command": "hoogle-mcp"
    }
  }
}

Project-Specific Configuration

Alternatively, add to .mcp.json in your project root:

{
  "mcpServers": {
    "hoogle": {
      "command": "hoogle-mcp"
    }
  }
}

This assumes hoogle-mcp is in your PATH. You can make it available via:

  • nix shell or nix run
  • Adding to your NixOS system packages
  • Adding to home-manager configuration
  • Using nix profile install

Alternatively, use the absolute path: "/absolute/path/to/hoogle-mcp/result/bin/hoogle-mcp"

MCP Tools

The server provides two tools for searching Haskell documentation:

hoogle_search

Simple text-based search returning human-readable results.

Parameters:

  • query (string, required): Search query for functions, types, modules, or packages

Returns: Plain text search results from Hoogle

Example queries:

  • "map" - Search for the map function
  • "[a] -> [a]" - Search by type signature
  • "Data.List" - Search for a module

hoogle_docs

Structured JSON documentation with full Haddock details and URLs.

Parameters:

  • query (string, required): Name of function, type, module, or package
  • count (integer, optional): Maximum number of results to return (default: 10)

Returns: JSON array with structured documentation including:

  • docs: Full documentation text (HTML format)
  • item: Type signature or declaration
  • module: Module name and URL
  • package: Package name and URL
  • url: Direct link to Haddock documentation
  • type: Result type (e.g., "module" for modules)

Example queries:

  • "fmap" - Get documentation for a function
  • "Data.List" - Get module documentation and overview
  • "Functor" - Get typeclass documentation

Use cases:

  • Access full Haddock documentation for symbols
  • Get URLs to browse detailed HTML documentation
  • Retrieve module and package information
  • Find documentation for types, functions, and typeclasses

The server communicates via JSON-RPC over stdio following the Model Context Protocol specification.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors