MCP Hacker News

MCP Hacker News

A Model Context Protocol server that enables AI tools like Claude and Cursor to fetch and interact with live Hacker News data (posts, comments, users) via standardized MCP endpoints.

Category
Visit Server

Tools

getTopStories

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

getBestStories

Get best stories from Hacker News (algorithmically ranked)

getNewStories

Get newest stories from Hacker News

getAskHNStories

Get Ask HN stories

getShowHNStories

Get Show HN stories

getJobStories

Get job postings from Hacker News

getItem

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

getUser

Get user profile information

getComments

Get comments for a specific item

getMaxItemId

Get the current maximum item ID

getUpdates

Get recently updated items and profiles

README

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

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured