Skip to main content
Glama
Hacker News MCP Server

Hacker News MCP Server

by devabdultech

Hacker News MCP Server

Official Hacker News MCP Server - Adds powerful Hacker News integration to Cursor, Claude, and any other LLM clients. Access stories, comments, user profiles, and search functionality through the Model Context Protocol.

Features

  • Search stories and comments using Algolia's HN Search API

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

  • Get individual stories with comments

  • Get comment trees and user discussions

  • Get user profiles and submissions

  • Real-time access to Hacker News data

Related MCP server: HackerNews-Search

Set Up

Running on Claude Desktop

Add this to your claude_desktop_config.json:

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

Installing via Smithery

To install Hacker News MCP Server for Claude Desktop automatically via Smithery:

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

Tools

  1. search

    • Search for stories and comments on Hacker News using Algolia's search API

    • Inputs: * query (string): Search query * type (optional string): Filter by type ('story' or 'comment') * page (optional number): Page number for pagination * hitsPerPage (optional number): Results per page (max 100)

    • Returns: Search results with stories and comments

  2. getStories

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

    • Inputs: * type (string): Type of stories to fetch ('top', 'new', 'best', 'ask', 'show', 'job') * limit (optional number): Number of stories to fetch (max 100)

    • Returns: Array of story objects

  3. getStoryWithComments

    • Get a story along with its comment thread

    • Inputs: * id (number): Story ID

    • Returns: Story details with nested comments

  4. getCommentTree

    • Get the full comment tree for a story

    • Inputs: * storyId (number): ID of the story

    • Returns: Hierarchical comment tree structure

  5. getUser

    • Get a user's profile information

    • Inputs: * id (string): Username

    • Returns: User profile details including karma, created date, and about text

  6. getUserSubmissions

    • Get a user's submissions (stories and comments)

    • Inputs: * id (string): Username

    • Returns: Array of user's submitted stories and comments

Contributing

  1. Fork the repository

  2. Create your feature branch

  3. Commit your changes

  4. Push to the branch

  5. Create a new Pull Request

License

This MCP server is licensed under the MIT License. See the LICENSE file for details.

About

This MCP server is built and maintained by devabdultech. It uses the official Hacker News API and Algolia Search API to provide comprehensive access to Hacker News data through the Model Context Protocol.

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
      60 npm
      MIT