You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mcp-hacker-news

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcp-hacker-news

Hacker News MCP Server

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
557
31.99%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Usage with Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "mcp-hacker-news": {
      "command": "npx",
      "args": ["-y", "mcp-hacker-news"]
    }
  }
}

Demo: Claude using MCP Hacker News

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 URIDescriptionHacker News API Endpoint
hackernews://topTop stories/v0/topstories
hackernews://newNewest stories/v0/newstories
hackernews://bestBest (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 NameDescription
getTopStoriesFetch top stories (customizable limit)
getBestStoriesFetch best stories (customizable limit)
getNewStoriesFetch newest stories (customizable limit)
getAskHNStoriesFetch "Ask HN" posts
getShowHNStoriesFetch "Show HN" posts
getJobStoriesFetch job postings
getItemRetrieve a specific item (story, comment, etc.)
getUserRetrieve a user profile by username
getCommentsFetch comments for a specific item
getMaxItemIdGet the current maximum item ID
getUpdatesFetch 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.

Keywords

mcp

FAQs

Package last updated on 08 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.