Skip to main content
Glama
Hacker News MCP Server

Hacker News MCP Server

by joeswann

Hacker News MCP Server

A read-only MCP (Model Context Protocol) server for Hacker News. Enables Claude Desktop, Claude Code, and other MCP clients to browse stories, read comments, search posts, and view user profiles. No authentication required.

Features

  • Story Listings: Browse top, new, best, ask, show, and job stories

  • Comments: View full comment threads with nesting

  • Search: Full-text search via Algolia

  • User Profiles: View user info and submission history

Related MCP server: Hacker News MCP Server

Installation

Prerequisites

  • Node.js >= 18.0.0

From Source

  1. Clone this repository

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Configuration

Environment Variables

Variable

Required

Default

Description

HN_USERNAME

No

—

Optional HN username for context

HN_API_BASE_URL

No

https://hacker-news.firebaseio.com/v0

Firebase API endpoint

HN_ALGOLIA_BASE_URL

No

https://hn.algolia.com/api/v1

Algolia search endpoint

No credentials needed. All data is publicly accessible.

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "hackernews": {
      "command": "node",
      "args": ["/path/to/hackernews-mcp/build/index.js"]
    }
  }
}

Usage with Claude Code

claude mcp add hackernews -- node /path/to/hackernews-mcp/build/index.js

Available Tools

Tool

Description

list_stories

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

get_item

Get a specific item (story, comment, job)

get_comments

Get full comment thread with nesting

search

Full-text search via Algolia

get_user

View a user's profile

get_user_submissions

List a user's posts

Development

  • npm run dev — Watch mode with TypeScript compilation

  • npm run build — Build the project

  • npm start — Start the built server

License

MIT

Available Tools

6 tools
get_commentsA

Get threaded comments for a Hacker News story. Returns comments with indentation showing reply depth. Skips dead and deleted comments.

Inputs: story_id (required), depth, limit.

get_itemA

Get any Hacker News item by ID (story, comment, job, poll). Returns full details including text content.

Inputs: id (required).

get_userA

Get a Hacker News user profile by username. Returns karma, account age, about text, and submission count.

Inputs: username (required).

get_user_submissionsB

Get recent submissions from a Hacker News user. Can filter by stories or comments.

Inputs: username (required), type, limit.

list_storiesA

Browse Hacker News feeds (top, new, best, ask, show, job) with pagination. Returns titles, URLs, scores, and metadata.

Inputs: feed, limit, offset.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a distinct purpose: feeds, item retrieval, comment threads, search, user profiles, and user submissions. No overlapping functionality that would cause confusion.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern (list_stories, get_item, get_comments, get_user, get_user_submissions). The lone 'search' is a valid verb but lacks a noun, making it a slight deviation from the pattern.

    Tool Count5/5

    Six tools is well-scoped for a Hacker News reader, covering browsing, retrieval, search, and user-related queries without over-expanding the surface.

    Completeness4/5

    The read-only surface is solid, covering stories, items, comments, search, and user data. Minor gaps exist around fetching a comment thread directly from a comment ID and write operations, but these are reasonable omissions for a typical HN MCP.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that provides tools for searching and fetching information from Hacker News.
      4
      76
      MIT
    • A
      license
      D
      quality
      D
      maintenance
      An MCP server that enables AI assistants to access real-time Hacker News data including top stories, story details, comments, and search functionality.
      1
      42 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for Hacker News providing tools to fetch stories, threads, users, and search content via Firebase and Algolia APIs.
      245 npm
      7
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      The only MCP server that can write to Hacker News, enabling story submission, commenting, and submissions checking via natural language.
      5
      29 npm
      MIT