home / mcp / hacker news mcp server

Hacker News MCP Server

Hacker news MCP server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "pskill9-hn-server": {
      "command": "node",
      "args": [
        "/path/to/hn-server/build/index.js"
      ]
    }
  }
}

You can run a dedicated MCP server that fetches and serves structured Hacker News stories. It supports multiple story types, a configurable limit, and clean error handling, making it easy to integrate into your MCP-powered workflows and conversational assistants.

How to use

You will connect an MCP client to the Hacker News MCP Server and request stories by type (top, new, ask, show, jobs) with an optional limit. The server returns a structured collection of stories that includes the title, URL, points, author, posting time, and comment count for each entry, along with its position in the list.

How to install

Prerequisites you need before installing this server: node and npm installed on your system.

Clone the project and install dependencies:

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

Build the server before running it:

npm run build

Add the MCP server configuration to your MCP settings. Use the following example configuration for a local Node runtime that runs the built index file.

{
  "mcpServers": {
    "hacker-news": {
      "command": "node",
      "args": ["/path/to/hn-server/build/index.js"]
    }
  }
}

Additional notes

This server exposes a tool named get_stories that you can invoke through your MCP client to retrieve stories. The tool supports a type parameter with values top, new, ask, show, or jobs, and a limit parameter to cap how many stories are returned.

You can also integrate with Claude by configuring the MCP server in the desktop app or in VSCode. The same runtime command is used for both environments.

Example interactions

Ask for the top stories with a limit of five, or request the latest Ask HN posts. The MCP client will pass the appropriate type and limit to the server to return a list of stories with the requested fields.

Available tools

get_stories

Fetches stories from Hacker News by type (top, new, ask, show, jobs) and returns structured data including title, url, points, author, time, and commentCount with a rank.