Skip to main content
Glama
MCP Hacker News

MCP Hacker News

by paabloLC

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"]
    }
  }
}

Demo: Claude using MCP Hacker News

Related MCP server: Paws-on-MCP

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

mcp-inspector

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.
Other types of stories (Ask HN, Show HN, Jobs, etc.) and item-specific lookups are available as tools (see below), allowing for flexible querying with custom parameters.

Tools

The following tools are available for advanced or parameterized queries. These allow you to fetch other Hacker News content beyond the fixed resources above:

Tool Name

Description

getTopStories

Fetch top stories (customizable limit)

getBestStories

Fetch best stories (customizable limit)

getNewStories

Fetch newest stories (customizable limit)

getAskHNStories

Fetch "Ask HN" posts

getShowHNStories

Fetch "Show HN" posts

getJobStories

Fetch job postings

getItem

Retrieve a specific item (story, comment, etc.)

getUser

Retrieve a user profile by username

getComments

Fetch comments for a specific item

getMaxItemId

Get the current maximum item ID

getUpdates

Fetch recently updated items and profiles

Check the code or inline documentation for supported arguments and usage examples for each tool.


Tip:
Make sure you have pnpm installed for development setup.
You can substitute npm or yarn if you prefer, but pnpm is recommended for consistency.

Available Tools

11 tools
getAskHNStoriesC

Get Ask HN stories

Inputs: limit.

getBestStoriesB

Get best stories from Hacker News (algorithmically ranked)

Inputs: limit.

getCommentsC

Get comments for a specific item

Inputs: id (required), depth.

getItemC

Get a specific item (story, comment, job, etc.) by ID

Inputs: id (required).

getJobStoriesC

Get job postings from Hacker News

Inputs: limit.

getMaxItemIdB

Get the current maximum item ID

Inputs: no named parameters.

getNewStoriesB

Get newest stories from Hacker News

Inputs: limit.

getShowHNStoriesC

Get Show HN stories

Inputs: limit.

getTopStoriesC

Get top stories from Hacker News (up to 500 available)

Inputs: limit.

getUpdatesB

Get recently updated items and profiles

Inputs: no named parameters.

getUserC

Get user profile information

Inputs: username (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Hacker News resources: different story types (Ask HN, Best, New, Show HN, Top, Job), comments, items by ID, max item ID, updates, and user profiles. There is no overlap in functionality that would cause confusion.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with 'get' as the verb and descriptive nouns (e.g., getAskHNStories, getComments, getUser). The naming is uniform throughout the set, using camelCase consistently without any deviations.

    Tool Count5/5

    With 11 tools, the server is well-scoped for accessing Hacker News data. Each tool serves a specific and necessary function, covering various story categories, comments, items, updates, and user profiles without being excessive or insufficient.

    Completeness5/5

    The tool set provides comprehensive coverage for reading Hacker News data, including all major story types, comments, items, updates, and user profiles. There are no obvious gaps for a read-only API, and agents can fully navigate the Hacker News ecosystem without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    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
    • F
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol (MCP) server implementing the latest MCP specification with tools, resources, prompts, and enhanced sampling capabilities that features HackerNews and GitHub API integrations for AI-powered analysis.
      326
      -
    • 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
      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