黑客新闻伴侣 MCP
使用 Claude 总结 Hacker News 讨论的模型上下文协议 (MCP)。
概述
该 MCP 负责抓取并处理 Hacker News 的讨论,并将其转换为 Claude 可用来生成高质量摘要的格式。它处理评论的层级结构及其元数据(评分、踩点等),以帮助 Claude 理解不同评论之间的相对重要性和相互关系。
Related MCP server: Headline Vibes Analysis MCP Server
特征
处理 Hacker News URL 或帖子 ID
从 HN 下载并分析评论结构
根据社区参与度对评论进行评分
针对 Claude 摘要优化的格式数据
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Hacker News Companion:
npx -y @smithery/cli install @georgeck/hn-companion-mcp --client claude
手动安装
克隆存储库:
git clone https://github.com/yourusername/hn-companion-mcp.git cd hn-companion-mcp安装依赖项:
npm install
用法
命令行界面
node index.js <post-id-or-url>
例子:
node index.js 43448075
# or
node index.js https://news.ycombinator.com/item?id=43448075
API 服务器
启动服务器:
npm start
提出请求:
curl -X POST http://localhost:3000/api/summarize \
-H "Content-Type: application/json" \
-d '{"input": "https://news.ycombinator.com/item?id=43448075"}'
API 参考
POST /api/summarize
请求正文:
{
"input": "https://news.ycombinator.com/item?id=43448075"
}
回复:
{
"status": "success",
"data": {
"systemPrompt": "...",
"userPrompt": "...",
"commentPathIdMapping": { ... },
"postTitle": "...",
"postId": "...",
"commentCount": 123
}
}
与克劳德的整合
此 MCP 旨在为 Claude 准备数据以供其进行汇总。当用户要求 Claude 对 Hacker News 讨论进行汇总时,Claude 可以调用此 MCP 获取格式化的数据,然后根据系统提供的提示和用户提示生成摘要。
"hn-companion": {
"command": "node",
"args": ["<full path to src>/hn-companion-mcp/server.js"]
}
}
执照
麻省理工学院