Skip to main content
Glama
Hacker News MCP Server

Hacker News MCP Server

by fritzprix

Hacker News MCP Server

A Model Context Protocol (MCP) server for Hacker News, enabling LLMs to browse stories, inspect items, and look up user profiles via the official HN Firebase API.

Features

  • Story Feeds: Fetch Top, New, Best, Ask HN, Show HN, and Job stories.

  • Detailed Inspection: Get full details for any item (story, comment, job, poll) and user profiles.

  • Live Updates: Access recently changed items and the current max item ID.

  • Optimized for LLMs:

    • Responses formatted in clear Markdown (or JSON when needed).

    • Built-in character limit to prevent context overflow.

    • Pagination (limit / offset) on all list-based tools.

  • Modern Stack: TypeScript + official MCP SDK + Zod schema validation.

Related MCP server: mcp-virustotal

Available Tools

Tool

Description

hn_get_top_stories

Top stories (paginated)

hn_get_new_stories

Newest stories (paginated)

hn_get_best_stories

Best stories (paginated)

hn_get_ask_stories

Ask HN stories (paginated)

hn_get_show_stories

Show HN stories (paginated)

hn_get_job_stories

Job stories (paginated)

hn_get_item

Full details for a specific item ID

hn_get_user

User profile by username

hn_get_updates

Recently updated item & profile IDs

hn_get_max_item

Current largest item ID on HN

All list tools accept limit (1–500, default 20), offset (default 0), and response_format (markdown or json).

Getting Started

Prerequisites

  • Node.js 18+ or Bun

Quick Run (no install)

# npx
npx -y @fritzprix/hn-mcp

# bunx
bunx @fritzprix/hn-mcp

Global Install

npm install -g @fritzprix/hn-mcp
hn-mcp

From Source

git clone https://github.com/fritzprix/hn-mcp.git
cd hn-mcp
npm install
npm run build
npm start

MCP Client Configuration

Claude Desktop

Add to claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

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

Other MCP Clients (Cursor, Windsurf, etc.)

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

Development

npm run dev    # run with tsx (no build needed)
npm run build  # compile TypeScript → dist/
npm run watch  # watch mode

License

MIT

Available Tools

10 tools
hn_get_ask_storiesGet Ask HN StoriesA
Read-onlyIdempotent

Retrieve IDs of the latest Ask HN stories.

Inputs: limit, offset, response_format.

hn_get_best_storiesGet Best StoriesA
Read-onlyIdempotent

Retrieve IDs of the best stories on Hacker News.

Inputs: limit, offset, response_format.

hn_get_itemGet Item DetailsA
Read-onlyIdempotent

Get detailed information about a single Hacker News item (story, comment, job, poll, etc.) by its ID.

Inputs: id (required), response_format.

hn_get_job_storiesGet Job StoriesA
Read-onlyIdempotent

Retrieve IDs of the latest Job stories.

Inputs: limit, offset, response_format.

hn_get_max_itemGet Max Item IDA
Read-onlyIdempotent

Get the current largest item ID on Hacker News.

Inputs: no named parameters.

hn_get_new_storiesGet New StoriesA
Read-onlyIdempotent

Retrieve IDs of the newest stories on Hacker News.

Inputs: limit, offset, response_format.

hn_get_show_storiesGet Show HN StoriesA
Read-onlyIdempotent

Retrieve IDs of the latest Show HN stories.

Inputs: limit, offset, response_format.

hn_get_top_storiesGet Top StoriesA
Read-onlyIdempotent

Retrieve IDs of the current top stories on Hacker News.

Inputs: limit, offset, response_format.

hn_get_updatesGet UpdatesB
Read-onlyIdempotent

Retrieve recently updated item and profile IDs.

Inputs: response_format.

hn_get_userGet User DetailsB
Read-onlyIdempotent

Retrieve details for a Hacker News user profile by username.

Inputs: id (required), response_format.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct data source: different story lists (top, new, best, ask, show, job), item details, user profiles, updates, and max item ID. No two tools have overlapping purposes.

    Naming Consistency5/5

    All tools follow a consistent 'hn_get_<resource>' pattern, making it easy to predict tool names. No mixing of naming conventions.

    Tool Count5/5

    With 10 tools, the set covers the main read operations of the Hacker News API without being bloated. Each tool serves a clear purpose.

    Completeness4/5

    The tool set covers major read operations (stories, items, users, updates) but lacks search or submission capabilities. For a typical agent use case, it is mostly complete.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Gives AI agents access to the VirusTotal v3 API so they can pull detection reports for files, URLs, IPs, and domains, then pivot through relationships like contacted hosts, dropped files, resolutions, and threat actors with cursor pagination. It also supports corpus search with VTI-style modifiers, sandbox behaviour summaries, and cached URL lookups to conserve API quota.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to look up files, URLs, IPs, and domains through the VirusTotal v3 API, returning detection reports along with pivotable relationships such as contacted hosts, dropped files, resolutions, and threat actors. Also supports corpus search, sandbox behaviour summaries, and cursor-paginated relationship queries over either stdio or HTTP streaming transport.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to query the VirusTotal v3 API for detection reports and relationship data on files, URLs, IPs, and domains, including contacted hosts, dropped files, resolutions, and threat actors. Supports corpus search, sandbox behaviour summaries, paginated relationship lookups, and both stdio and HTTP streaming transports.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to query the VirusTotal v3 API for detection reports on files, URLs, IPs, and domains, along with relationship pivots like contacted hosts, dropped files, resolutions, and threat actors. Also supports corpus search, sandbox behaviour summaries, and paginated relationship lookups over stdio or HTTP.
      MIT