HN搜索工具
一个提供从Hacker News搜索和获取信息工具的模型上下文协议(MCP)服务器。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"mcp-hn": {
"args": [
"mcp-hn"
],
"command": "uvx"
}
}
}
可用工具 (4 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
get_stories 2 个参数
Get stories from Hacker News. The options are `top`, `new`, `ask_hn`, `show_hn` for types of stories. This doesn't include the comments. Use `get_story_info` to get the comments.
该工具无需必填参数,直接调用即可
get_user_info 2 个参数 需填 1 项
Get user info from Hacker News, including the stories they've submitted
必填参数:user_name
search_stories 3 个参数 需填 1 项
Search stories from Hacker News. It is generally recommended to use simpler queries to get a broader set of results (less than 5 words). Very targetted queries may not return any results.
必填参数:query
get_story_info 1 个参数
Get detailed story info from Hacker News, including the comments
该工具无需必填参数,直接调用即可
服务介绍
Hacker News MCP 服务器
一个提供从 Hacker News 获取信息工具的 Model Context Protocol (MCP) 服务器。
工具
get_stories获取(热门、最新、ask_hn、show_hn)故事get_story_info获取与某个故事相关的评论search_stories根据查询搜索故事get_user_info获取用户信息
使用示例
使用如下提示:
User: 获取今天的热门故事
Output: 使用 get_stories 工具并返回一篇关于 AI 的故事
User: 今天有关于 AI 未来的那篇故事的详细内容是什么?
Output: 基于前一个工具的结果,使用 get_story_info 工具
User: 用户 pg 最近在做什么?
Output: 使用 get_user_info 工具并返回该用户的活动摘要
User: Hacker News 上关于 AI 职业发展有什么讨论?
Output: 使用 search_stories 工具并返回评论摘要
一个更详细的 puppeteer MCP 服务器示例:
User: 今天的热门故事是什么?
Output: 使用 get_stories 工具并返回一篇关于 AI 的故事
User: 你能使用 puppeteer 工具阅读这篇关于 的文章,并且使用 hackernews 工具查看评论,然后给我总结一下主要评论的内容吗?
Output: 使用 puppeteer 工具阅读关于 AI 的文章,然后使用 get_story_info hn 工具获取评论并返回评论摘要
快速开始
Claude 桌面版:
更新以下内容:
在 MacOS 上:~/Library/Application\ Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
对于生产环境,使用以下配置:
json
{
"mcpServers": {
"mcp-hn": {
"command": "uvx",
"args": ["mcp-hn"]
}
}
}