一个用于使用Claude总结Hacker News讨论的模型上下文协议(MCP)。该项目从Hacker News获取并处理讨论,将其转化为Claude适用的格式,从而生成高质量的讨论摘要。
这个MCP从Hacker News获取并处理讨论,将其格式化为Claude可以使用的格式,以生成高质量的摘要。它处理评论的层次结构及其元数据(分数、反对票等),帮助Claude理解不同评论的相对重要性和关系。
要通过Smithery自动安装Claude桌面版的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
示例:
node index.js 43448075
# 或者
node index.js https://news.ycombinator.com/item?id=43448075
启动服务器:
npm start
发送请求:
curl -X POST http://localhost:3000/api/summarize \
-H "Content-Type: application/json" \
-d '{"input": "https://news.ycombinator.com/item?id=43448075"}'
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": ["/hn-companion-mcp/server.js" ]
}
}
MIT