Hacker News MCP avatar

Hacker News MCP

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Hacker News MCP

Hacker News MCP

MCP server for Hacker News. AI agents can fetch top stories from any section or search by keyword. Returns titles, URLs, points, authors, and comment counts.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Jordan C

Jordan C

Maintained by Community

Actor stats

0

Bookmarked

0

Total users

0

Monthly active users

20 days ago

Last modified

Categories

Share

Hacker News Discovery & Search MCP

Give an MCP-compatible agent structured access to current Hacker News sections and keyword search. This Apify standby Actor combines direct parsing of news.ycombinator.com with the HN Search API powered by Algolia, returning compact JSON suitable for monitoring, research, and briefing workflows.

What you can do

  • Read the current Top, New, Ask HN, Show HN, or Jobs section.
  • Collect story links, ranks, points, authors, comment counts, and discussion URLs.
  • Search historical Hacker News material by keyword and rank matches by Algolia relevance.
  • Build lightweight technology watchlists, founder-research feeds, or topic digests.

This server reads public Hacker News pages and search data. It does not post, vote, comment, authenticate to Hacker News, or fetch the full text of linked articles.

Connect from an MCP client

Use this deployed Streamable HTTP endpoint:

https://reverberant-equality--mcp-hacker-news.apify.actor/mcp

Send your Apify API token on every connection:

Authorization: Bearer $APIFY_TOKEN

Clients should accept application/json and text/event-stream. MCP requests use POST /mcp; GET /mcp and DELETE /mcp return HTTP 405.

Registered tools

get-hacker-news-stories

ArgumentRequiredBehavior
sectionNotop, new, ask, show, or jobs; default top.
maxResultsNoNumber from 1 to 100; default 30.

Returns a JSON array. Every entry has rank, title, url, domain, points, author, comments, commentUrl, and postedAge. The tool follows HN's “More” links until it reaches the requested count or no next page exists. Jobs and sparse/dead items can legitimately contain 0 or empty-string metadata.

search-hacker-news

ArgumentRequiredBehavior
queryYesSearch string with a minimum length of two characters.
maxResultsNoNumber from 1 to 50; default 20.

Returns a JSON array mapped from Algolia hits with title, url, points, author, createdAt, numComments, and objectID. When an upstream hit has no external URL, the tool substitutes its Hacker News discussion URL.

JSON example

Arguments for get-hacker-news-stories:

{
"section": "show",
"maxResults": 2
}

The single MCP text item contains a JSON string that decodes to this shape (values are illustrative):

[
{
"rank": 1,
"title": "Show HN: Example project",
"url": "https://example.com/project",
"domain": "example.com",
"points": 84,
"author": "example_user",
"comments": 21,
"commentUrl": "https://news.ycombinator.com/item?id=12345678",
"postedAge": "2 hours ago"
}
]

Pricing

Every invocation charges one tool-call event at $0.005 USD. Charging occurs before the page or API request, so a later upstream timeout or parse failure can still consume the event. Schema-invalid arguments are rejected before a tool handler runs. Apify platform usage can be billed separately according to your plan.

Sources, limits, and accuracy

Section data comes from public HTML at Hacker News. The parser makes 15-second-timeout requests and depends on HN's current table markup; a markup change can omit or misclassify fields. Scores and comments are point-in-time values and can change immediately after retrieval. No article body is downloaded.

Keyword results come from the HN Search API. Algolia documents a limit of 10,000 requests per hour per source IP. The server sends query and hitsPerPage but no tags=story filter, so results follow Algolia's default index behavior rather than guaranteeing story-only hits. Upstream fields may therefore be null or absent. Direct HN page limits are not published; repeated large calls may be throttled.

A fetch/search failure returns an MCP tool result with isError: true and text beginning Error fetching HN stories: or Error searching HN:. Invalid sections, short queries, out-of-range counts, and wrong types are MCP schema errors. Unexpected Streamable HTTP failures return a JSON-RPC internal-server error.

Privacy

Queries and requested section URLs are sent to Hacker News or Algolia and can appear in Actor logs. The implementation returns results directly and does not persist them in a dataset or key-value store. Apify and upstream services may retain operational metadata under their own policies. Avoid confidential search terms.

Run locally

Node.js 20 or later is required.

npm install
npm run start:dev # http://localhost:3000/mcp
npm test
npm run build
npm run start:prod
apify validate-schema

Use APIFY_CONTAINER_PORT to select a port other than 3000.