Hoogle MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hoogle MCP Server search Hoogle for the map function"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hoogle MCP Server
一个用于在AI助手(Cursor、Claude Desktop、Codebuddy等)中搜索Haskell文档的MCP(模型上下文协议)服务器。
📑 快速导航
文档 | 说明 |
新手从这里开始! 快速上手指南 | |
5分钟快速配置 | |
详细使用示例和技巧 | |
项目技术细节和架构 | |
项目完成度检查清单 |
Related MCP server: Google Photos MCP Server
功能特性
🔍 通过Hoogle API搜索Haskell函数、类型、模块和包
📚 支持函数名搜索、类型签名搜索和关键词搜索
🌐 可通过stdio或HTTP两种方式运行
🚀 完整的TypeScript类型支持
安装
npm install
npm run build使用方法
方式1:Stdio模式(推荐用于Claude Desktop、Codebuddy)
启动stdio服务器:
npm start方式2:HTTP模式(用于远程访问)
启动HTTP服务器:
npm run start:streamableHttp默认监听端口:3088
配置AI工具
Claude Desktop配置
编辑Claude Desktop配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{
"mcpServers": {
"hoogle": {
"command": "node",
"args": ["/path/to/Hoogle_MCP_Server/dist/index.js"]
}
}
}Codebuddy配置
在Codebuddy设置中添加MCP服务器,配置类似:
{
"mcpServers": {
"hoogle": {
"command": "node",
"args": ["/home/unixzhang/Hoogle_MCP_Server/dist/index.js"]
}
}
}Cursor配置
Cursor通常使用HTTP模式连接MCP服务器:
启动HTTP服务器:
npm run start:streamableHttp在Cursor设置中添加MCP端点:
http://localhost:3088/mcp
可用工具
search_hoogle
在Hoogle中搜索Haskell相关内容。
参数:
query(string, 必需): 搜索查询,可以是:函数名:
map类型签名:
(a -> b) -> [a] -> [b]关键词:
monad transformer
count(number, 可选): 返回结果数量(默认10,最大100)
示例:
在AI助手中,你可以这样使用:
请搜索Haskell中的map函数帮我查找类型为 a -> [a] 的函数在Hoogle中搜索 monad transformer,显示前5个结果开发
监视模式
开发时可以使用watch模式自动重新编译:
npm run watch项目结构
Hoogle_MCP_Server/
├── src/
│ ├── index.ts # Stdio入口
│ ├── server.ts # 核心MCP服务器逻辑(Hoogle搜索实现)
│ └── streamableHttp.ts # HTTP服务器入口
├── dist/ # 编译输出
├── package.json
├── tsconfig.json
└── README.md技术栈
MCP SDK:
@modelcontextprotocol/sdk- 模型上下文协议实现TypeScript: 类型安全的开发体验
Zod: 运行时类型验证
Express: HTTP服务器(可选)
Hoogle API: https://hoogle.haskell.org/
API接口说明
Hoogle MCP Server使用Hoogle官方JSON API:
GET https://hoogle.haskell.org/?mode=json&hoogle={query}&count={count}返回的结果包含:
函数/类型的完整签名
所属模块和包信息
文档链接
简短说明
许可证
MIT
Available Tools
1 toolsearch_hoogleB
在Hoogle中搜索Haskell函数、类型、模块或包。可以使用函数名、类型签名或关键词进行搜索。
Inputs: query (required), count.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of misselection; search_hoogle has one clear, unambiguous purpose (querying Hoogle).
The lone name follows a clean verb_noun snake_case pattern (search_hoogle) that fits MCP conventions, but a single name provides no pattern to verify against.
One tool is thin for a server surface, though it maps directly onto Hoogle's single search endpoint; users needing docs, module browsing, or package detail have no alternative entry point.
Search by name, type signature, or keyword covers the core Hoogle use case, but there are no companion operations such as fetching full haddock documentation, listing package modules, or resolving suggestions, leaving some queries as dead ends.
Maintenance
Related MCP Connectors
Search 16,000+ API operations and 95 built tools by need, then call any of them by name
Google Search, Shopping, Maps and AI Mode as data, plus a stealth cloud browser, for AI agents.
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
Search @imqueue docs and scaffold typed services & clients from your AI coding agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search documentation of packages and services to find implementation details, examples, and specifications.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search, browse, and retrieve metadata and images from your Google Photos library. It supports content-based filtering, album listing, and location extraction via STDIO and HTTP transports.61MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to execute Python functions and system commands via Streamable HTTP, including bash, Python code execution, file operations, and text searching.ISC
- FlicenseNot gradedqualityAmaintenanceEnables AI models to search and retrieve up-to-date technical documentation for popular agent frameworks via web search and page extraction. It supports both stdio and SSE transports.-