Hacker News

Provides programmatic access to Hacker News content via MCP tools such as search, front page browsing, story retrieval, and user profiles.
  • typescript

0

GitHub Stars

typescript

Language

2 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sam3690-hackernews_mcp": {
      "command": "node",
      "args": [
        "/path/to/hn-mcp-server/dist/index.js"
      ],
      "env": {
        "DEBUG": "0"
      }
    }
  }
}

You can use the HackerNews MCP Server to programmatically access Hacker News content through an MCP client. It exposes search, browse, and detail capabilities over a structured MCP interface, enabling agents to fetch stories, comments, and user profiles in real time while respecting API rate limits and providing typed, observable responses.

How to use

You interact with the server by configuring an MCP client to connect via either a local process (stdio) or a remote MCP endpoint, then request the available tools to search, browse, or fetch specific stories, comments, or users. Start the server locally, then point your client to the local process to begin querying Hacker News data.

Typical actions you can perform include searching for stories by keywords, filtering by tags or points, retrieving the current front page, getting the latest stories, and fetching full story threads with nested comments and author details. You can also pull user profiles for insights like reputation and activity.

How to install

Prerequisites: Node.js 20 LTS or higher and npm or yarn.

Install the MCP server globally (when published):

npm install -g hn-mcp-server

To run from source you typically clone the project, install dependencies, build, and link the local binary. These steps are representative and ensure you have a runnable local server.

git clone https://github.com/YOUR_USERNAME/hn-mcp-server.git
cd hn-mcp-server
npm install
npm run build
npm link

Configuration and usage notes

You can run the server in different ways. The following stdio configurations show how to start the MCP server locally, either directly or via a development helper. Use only the commands that match the setup you choose.

// Claude Desktop (example running from installed package)
{
  "mcpServers": {
    "hackernews": {
      "command": "hn-mcp-server"
    }
  }
}

If you installed from source and want to run via Node directly, you can point to the built index.js inside dist:

{
  "mcpServers": {
    "hackernews": {
      "command": "node",
      "args": ["/path/to/hn-mcp-server/dist/index.js"]
    }
  }
}

Notes on development and testing

The server is designed with TypeScript in strict mode, provides structured JSON logging with correlation IDs, and includes unit, integration, and contract tests to verify behavior across scenarios.

Available tools

search_stories

Search Hacker News stories by relevance with advanced filters such as keywords, tags, points, and pagination.

search_by_date

Search stories or comments sorted by date with optional filters and pagination.

search_comments

Search comments with optional story or author filters and date/ordering controls.

get_front_page

Retrieve the current Hacker News front-page stories with pagination.

get_latest_stories

Fetch the most recently submitted stories with pagination.

get_ask_hn

Retrieve Ask HN posts to see community questions and discussions.

get_show_hn

Retrieve Show HN posts to view project showcases and experiments.

get_story

Get a specific story by ID, including the full nested comment tree.

get_user

Retrieve a user profile by username, including user metadata and activity.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational