PM

paablolc/mcp-hacker-news

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

34 stars 4 forks 质量 55 趋势 12

该MCP服务器作为官方黑客新闻API与支持模型上下文协议(Model Context Protocol)的AI驱动工具(如Claude和Cursor)之间的桥梁。

概览

一款基于TypeScript构建的Hacker News模型上下文协议(MCP)服务器。 该MCP服务器作为官方黑客新闻API与支持模型上下文协议(Model Context Protocol)的AI驱动工具(如Claude和Cursor)之间的桥梁。 它使这些工具能够通过标准化的MCP端点获取并交互实时黑客新闻数据(帖子、评论、用户)。 添加到你的Claude桌面配置(claude_desktop_config.json)或光标配置文件(mcp.json): - 与官方 Hacker News API 集成,用于获取帖子、评论和用户信息。- 公开标准模型上下文协议端点,实现与 Claude、Cursor 及其他基于大型语言模型的工具的无缝集成。- 获取最新的 Hacker News 数据,用于 AI 和自动化工作流程。 - 需要Node.js。- NPM或PNPM作为包管理器。 ⚠️ 如果你不确定自己的Node.js版本,可以在终端里运行node --version。确保它显示的是v18.x.x或更高版本。如何升级Node。

概述(AI 翻译)

一款基于TypeScript构建的Hacker News模型上下文协议(MCP)服务器。

该MCP服务器作为官方黑客新闻API与支持模型上下文协议(Model Context Protocol)的AI驱动工具(如Claude和Cursor)之间的桥梁。

它使这些工具能够通过标准化的MCP端点获取并交互实时黑客新闻数据(帖子、评论、用户)。

使用 Claude 桌面或光标

添加到你的Claude桌面配置(claude_desktop_config.json)或光标配置文件(mcp.json):

特色

  • 与官方黑客新闻API集成,用于获取帖子、评论和用户信息。
  • 公开标准模型上下文协议端点,实现与 Claude、光标及其他基于大型语言模型的工具的无缝集成。
  • 获取最新的黑客新闻数据,用于人工智能和自动化工作流程。

要求

  • Node.js 版本18或更高
  • NPM或PNPM作为包管理器。

⚠️ 如果你不确定Node.js版本,可以在终端中运行node --version。 确保显示为v18.x.x或更高。 如何升级Node.js


想贡献吗?只需按照以下步骤操作

克隆仓库并安装依赖:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

mcp-hacker-news

A Model Context Protocol (MCP) server for Hacker News built with TypeScript.

This MCP server acts as a bridge between the official Hacker News API and AI-powered tools that support the Model Context Protocol, such as Claude and Cursor.

It enables these tools to fetch and interact with live Hacker News data (posts, comments, users) via standardized MCP endpoints.

Using with Claude Desktop or Cursor

Add to your Claude desktop config (claude_desktop_config.json) or your Cursor config file (mcp.json) :

{
  "mcpServers": {
    "mcp-hacker-news": {
      "command": "npx",
      "args": ["-y", "mcp-hacker-news"]
    }
  }
}

Features

  • Integrates with the official Hacker News API to fetch posts, comments, and user information.
  • Exposes standard Model Context Protocol endpoints for seamless integration with Claude, Cursor, and other LLM-based tools.
  • Fetches the latest Hacker News data for AI and automation workflows.

Requirements

  • Node.js version 18 or higher is required.
  • npm or pnpm as a package manager.

⚠️ If you are unsure about your Node.js version, run node --version in your terminal. Make sure it shows v18.x.x or higher.
How to upgrade Node.js


Want to contribute? Just follow the steps below

Clone the repository and install dependencies:
git clone https://github.com/paablolc/mcp-hacker-news.git
cd mcp-hacker-news
pnpm install
pnpm build
  • To test the server with the MCP Inspector:
pnpm inspector
  • or, if running from the source:
npx @modelcontextprotocol/inspector node dist/index.js

Resources

This MCP server exposes the following fixed resources, each corresponding to a core Hacker News endpoint:

Resource URI Description Hacker News API Endpoint
hackernews://top Top stories /v0/topstories
hackernews://new Newest stories /v0/newstories
hackernews://best Best (algorithmic) stories /v0/beststories

These three collections match the main list endpoints officially provided by the Hacker News API.

在 GitHub 查看完整 README

安装

npx -y mcp-hacker-news
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp-hacker-news": { "command": "npx", "args": ["-y", "mcp-hacker-news"] } } }