Hn Server logo

Hn Server

by pskill9

Fetches structured Hacker News stories by category, with configurable result counts from 1 to 30.

Install Hn Server

Run the project’s own setup commands, in order.

Setup steps from the project

pskill9/hn-server installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/pskill9/hn-server
    
  2. 2. Install
    cd hn-server
    
  3. 3. Install
    npm install
    
  4. 4. Run
    npm run build
    

Overview

pskill9/hn-server MCP server fetches Hacker News pages and parses their HTML into structured story data. Its `get_stories` tool supports top, new, ask, show, and jobs listings, with a configurable `limit` parameter. Results include titles, URLs, points, authors, timestamps, comment counts, and ranks. Use it when an agent needs current Hacker News listings without relying on an official API.

Use cases

  • Fetch the current top Hacker News stories
  • Review recent Ask HN discussions
  • List Show HN submissions
  • Inspect Hacker News job postings
  • Limit results for an agent summary

Key features

  • Parses Hacker News HTML into structured records
  • Supports top, new, ask, show, and jobs listings
  • Returns titles, URLs, points, authors, times, comments, and ranks
  • Limits responses to 1–30 stories
  • Validates parameters and reports fetch or parsing errors

Tools2

What Hn Server lets your agent do. Expand a tool for its parameters.

Self-reported~2 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/18 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars40Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Tools exposed2Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Hn Server works

What pskill9/hn-server MCP server does

pskill9/hn-server MCP server retrieves story listings from Hacker News at news.ycombinator.com and converts the page HTML into structured records. It covers five Hacker News sections: top stories, newest stories, Ask HN, Show HN, and jobs.

Each returned record can include the story title, destination URL, point total, submitting username, posting timestamp, comment count, and list rank. For text-based Hacker News posts, the URL may point to the corresponding internal Hacker News page rather than an external site.

This is useful for assistants that need to summarize current Hacker News activity, compare story categories, find recent discussions, or inspect job listings through an MCP-compatible client.

How it works

The server exposes one MCP tool named get_stories. The tool requests the selected Hacker News page, parses its HTML, and returns an array of story objects.

The type argument selects the listing and accepts top, new, ask, show, or jobs. It defaults to top. The limit argument controls how many records are returned, accepts values from 1 through 30, and defaults to 10.

pskill9/hn-server MCP server performs validation for unsupported story types and invalid parameter values. It also reports network and HTML parsing failures with error codes and descriptive messages.

Setup and configuration

Clone the repository, install its npm dependencies, and build the TypeScript project:

bash
git clone https://github.com/pskill9/hn-server
cd hn-server
npm install
npm run build

Run the generated server with Node using the built entry point at build/index.js. Add an MCP server entry whose command is node and whose argument is the absolute path to that file. The README provides configuration examples for both the Claude desktop application and the VSCode Claude extension.

The project does not document required environment variables. Its development stack includes TypeScript, the Model Context Protocol SDK, Axios for HTTP requests, and Cheerio for HTML parsing.

Tools and capabilities

  • Call get_stories to retrieve one Hacker News listing.
  • Select top, new, ask, show, or jobs stories.
  • Set the number of results between 1 and 30.
  • Receive structured fields for titles, URLs, points, authors, times, comments, and ranks.
  • Use the server through Claude desktop or the VSCode Claude extension with the documented stdio configuration.

Limitations and notes

The server reads and parses the public Hacker News HTML pages, so results depend on network access and the page structure being available. The material does not describe authentication, pagination beyond the requested limit, filtering by keyword, or access to comments and story details beyond the fields returned in each listing.

Only one tool is documented. The supported categories are fixed to the five accepted type values, and the result count cannot exceed 30 per request. The repository is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Hn Server

pskill9/hn-server is an MCP server that fetches and parses Hacker News HTML from news.ycombinator.com. Its main tool, get_stories, accepts type and limit parameters and returns structured story records with titles, URLs, points, authors, timestamps, comment counts, and ranks.

Clone the repository, run npm install, and build it with npm run build. Configure your MCP client to run node with the absolute path to build/index.js as its argument.

It supports top, new, ask, show, and jobs. Pass one of these values as the type argument to get_stories; top is used when type is omitted.

You can request between 1 and 30 stories with the limit argument. The default is 10, and values outside that range are rejected as invalid.

Add an mcpServers entry that runs node with the path to build/index.js, then use Claude to request supported Hacker News listings.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHn Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/pskill9-hn-server?style=directory)](https://allmcps.com/mcp/pskill9-hn-server)
HTML Embed
<a href="https://allmcps.com/mcp/pskill9-hn-server"><img src="https://allmcps.com/api/badge/pskill9-hn-server?style=directory" alt="Hn Server on AllMCPs" /></a>