Skip to main content
Glama
README.md
# Hoogle MCP Server

A Model Context Protocol (MCP) server for searching Hoogle API, the Haskell documentation search engine.

## Installation

Using [uv](https://github.com/astral-sh/uv):

```bash
# Install dependencies
uv sync

# Or install globally
uv pip install -e .
```

## Usage

### Running the MCP Server

```bash
uv run hoogle-mcp
```

### Configuration for Claude Desktop

Add to your Claude Desktop configuration file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "hoogle": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/hoogle-mcp",
        "hoogle-mcp"
      ]
    }
  }
}
```

### Available Tools

#### `search_hoogle`

Search Hoogle for Haskell packages, functions, and types.

**Parameters:**
- `query` (required): Search query (e.g., "scotty", "map", "Maybe")
- `scope` (optional): Search scope (default: "set:stackage")

**Example:**
```
Search for "scotty" in Hoogle
```

## Development

```bash
# Run with uv
uv run hoogle-mcp

# Run tests (if added)
uv run pytest

# Format code
uv run black hoogle_mcp.py
```

## License

MIT