Skip to main content
Glama
Hacker News MCP Server

Hacker News MCP Server

by devabdultech

黑客新闻 MCP 服务器

铁匠徽章官方 Hacker News MCP 服务器 - 为 Cursor、Claude 及其他 LLM 客户端添加强大的 Hacker News 集成。通过模型上下文协议 (MCP) 访问文章、评论、用户资料和搜索功能。

特征

  • 使用 Algolia 的 HN Search API 搜索故事和评论

  • 按类型获取故事(热门、新、最佳、询问、展示、工作)

  • 获取带有评论的个别故事

  • 获取评论树和用户讨论

  • 获取用户个人资料和提交内容

  • 实时访问 Hacker News 数据

Related MCP server: HackerNews-Search

设置

在 Claude Desktop 上运行

将其添加到您的claude_desktop_config.json中:

{
  "mcpServers": {
    "hackernews": {
      "command": "npx",
      "args": ["-y", "@devabdultech/hn-mcp-server"]
    }
  }
}

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Hacker News MCP 服务器:

npx -y @smithery/cli install @devabdultech/hn-mcp --client claude

工具

  1. search

    • 使用 Algolia 的搜索 API 搜索 Hacker News 上的故事和评论

    • 输入:* query (字符串):搜索查询* type (可选字符串):按类型过滤(“故事”或“评论”)* page (可选数字):分页的页码* hitsPerPage (可选数字):每页结果数(最多 100 条)

    • 返回:带有故事和评论的搜索结果

  2. getStories

    • 按类型获取多个故事(热门、新、最佳、询问、展示、工作)

    • 输入:* type (字符串):要获取的故事类型('top'、'new'、'best'、'ask'、'show'、'job')* limit (可选数字):要获取的故事数量(最多 100 个)

    • 返回:故事对象数组

  3. getStoryWithComments

    • 获取故事及其评论线索

    • 输入:* id (数字):故事 ID

    • 返回:带有嵌套评论的故事详细信息

  4. getCommentTree

    • 获取故事的完整评论树

    • 输入:* storyId (数字):故事的 ID

    • 返回:分层评论树结构

  5. getUser

    • 获取用户的个人资料信息

    • 输入:* id (字符串):用户名

    • 返回:用户个人资料详细信息,包括业力、创建日期和关于文本

  6. getUserSubmissions

    • 获取用户的提交内容(故事和评论)

    • 输入:* id (字符串):用户名

    • 返回:用户提交的故事和评论的数组

贡献

  1. 分叉存储库

  2. 创建你的功能分支

  3. 提交你的更改

  4. 推送到分支

  5. 创建新的 Pull 请求

执照

此 MCP 服务器采用 MIT 许可证。详情请参阅许可证文件。

关于

该 MCP 服务器由devabdultech构建和维护。它使用官方 Hacker News API 和 Algolia Search API,通过模型上下文协议 (MCP) 提供对 Hacker News 数据的全面访问。

Available Tools

9 tools
getCommentA

Get a single comment by ID

Inputs: id (required).

getCommentsC

Get comments for a story

Inputs: storyId (required), limit.

getCommentTreeC

Get a comment tree for a story

Inputs: storyId (required).

getStoriesA

Get multiple stories by type (top, new, best, ask, show, job)

Inputs: type (required), limit.

getStoryA

Get a single story by ID

Inputs: id (required).

getStoryWithCommentsB

Get a story with its comments

Inputs: id (required).

getUserA

Get a user profile by ID

Inputs: id (required).

getUserSubmissionsC

Get a user's submissions

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some overlap between getComments, getCommentTree, and getStoryWithComments, which all retrieve comments for stories in slightly different formats. This could cause confusion for an agent about which to use for a given scenario, though the descriptions clarify the differences.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with camelCase (e.g., getComment, getStories, search). The naming is predictable and readable throughout the set, with no deviations in style or convention.

    Tool Count5/5

    With 9 tools, this server is well-scoped for interacting with Hacker News, covering core resources like stories, comments, and users. Each tool has a clear role, and the count is neither too sparse nor bloated for the domain.

    Completeness4/5

    The toolset provides comprehensive read-only coverage for Hacker News, including stories, comments, users, and search. However, it lacks write operations (e.g., posting stories or comments), which might be expected for a full API but are not essential for basic interaction, leaving a minor gap.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A server that enables AI assistants to access, analyze, and understand HackerNews content through standardized Model Context Protocol interfaces, providing tools for searching posts, analyzing users, and tracking trending topics.
      5
      8
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A service that provides HackerNews content search, retrieval and analysis through the Model Context Protocol, suitable for AI agents and developers.
      5
      1
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents and developers to search, retrieve, and analyze HackerNews content including advanced post search, front page access, full comment trees, and user profile lookups through the Model Context Protocol.
      4
      MIT