黑客新闻公司MCP
](https://smithery.ai/server/@georgeck/hn-companion-mcp)
使用Claude总结黑客新闻讨论的模型上下文协议(MCP)。
概述
此MCP获取并处理黑客新闻讨论,以克劳德可以用来生成高质量摘要的格式进行准备。它处理评论的层次结构及其元数据(分数、投票等),以帮助Claude理解不同评论的相对重要性和关系。
特性
- 处理黑客新闻URL或帖子ID
- 从HN下载并分析评论结构
- 根据社区参与度对评论进行评分
- 为克劳德的摘要优化数据格式
安装
通过Smithery安装
通过以下方式自动安装克劳德桌面版黑客新闻伴侣 史密瑟里:
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
例子:
node index.js 43448075
# or
node index.js https://news.ycombinator.com/item?id=43448075API服务器
启动服务器:
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
}
}与Claude整合
本MCP旨在为Claude总结准备数据。当用户要求Claude总结黑客新闻讨论时, Claude可以调用此MCP来获取格式化数据,然后根据提供的系统和用户提示生成摘要。
"hn-companion": {
"command": "node",
"args": ["/hn-companion-mcp/server.js"]
}
}许可证
麻省理工学院
