cyanheads avatar

Hn Mcp Server

cyanheads/hn-mcp-server

Plugs directly into Hacker News through both the Firebase API and Algolia's search endpoint. You get four tools: pull stories from any feed (top, new, best, ask, show, jobs) with pagination, fetch entire comment threads with configurable depth and breadth-first traversal, look up user profiles with their submission history, and run full-text searches across stories and comments with filters for date ranges, authors, and point thresholds. Built on the author's mcp-ts-core framework with concurrent batch fetching for item resolution. Runs locally via stdio or connects to a public hosted instance at hn.caseyjhand.com/mcp. No API keys needed since HN's APIs are public. Useful when you need to analyze discussions, track topics, or pull research material from HN without opening a browser.

tools
4
transport
STDIO, HTTP
env vars
7
last updated
Nov 12, 2026

Install

From registry metadata
$ npx add-mcp https://hn.caseyjhand.com/mcp --name hn

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http hn https://hn.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 4 tools

Verified live against the running server on Nov 6, 2026.

hn_get_storiesFetch stories from an HN feed (top, new, best, ask, show, jobs), with title, URL, score, author, and comment count for each story.3 params

Fetch stories from an HN feed (top, new, best, ask, show, jobs), with title, URL, score, author, and comment count for each story.

Parameters* required
countinteger
Number of stories to return, at most 100 per call. A larger value is served at 100, and the notice names the offset for the next page. Larger counts take longer.default: 30
feed*string
Which HN feed to fetch. "top" includes jobs. "ask" and "show" are Ask HN / Show HN posts.one of top · new · best · ask · show · jobs
offsetinteger
Number of stories to skip from the start of the feed. Use with count for pagination.default: 0
hn_get_threadGet an item and its comment tree as a threaded discussion, with child comments resolved recursively. Use depth 0 for an item-only lookup. A long thread comes back in pages: pass the returned nextCursor as cursor to continue.4 params

Get an item and its comment tree as a threaded discussion, with child comments resolved recursively. Use depth 0 for an item-only lookup. A long thread comes back in pages: pass the returned nextCursor as cursor to continue.

Parameters* required
cursorstring
nextCursor from a previous call, passed with the same itemId, to continue the traversal at the next unseen comment without repeating or skipping any. Omit to start from the top.
depthinteger
How many levels of replies to resolve, at most 10 per call. 0 = just the item, no comments. 1 = direct replies only. A larger value is served at 10. Replies below the depth served are never fetched...default: 3
itemId*integer
ID of the story, comment, job, poll, or poll option to fetch the thread for.
maxCommentsinteger
Maximum comments in one response, across all depth levels, at most 200 per call. A larger value is served at 200, and nextCursor continues from there. Highest-ranked top-level comments resolve firs...default: 50
hn_get_userGet an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.4 params

Get an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.

Parameters* required
includeSubmissionsboolean
Resolve the user's most recent submissions into full items. Without this, only the submission count is available.default: false
submissionCountinteger
Page size — how many submissions to resolve per call, at most 50 per call. A larger value is served at 50, and the notice names the submissionOffset for the next page. Only used when includeSubmiss...default: 10
submissionOffsetinteger
How many submissions to skip before resolving, counting back from the most recent. Use with submissionCount to page through a long history: request offset 0, then advance by the page size served, a...default: 0
username*string
HN username. Case-sensitive. Trimmed; blank or whitespace-only input is rejected.
hn_search_contentSearch Hacker News stories, comments, polls, and jobs via Algolia — by keyword, by filters alone, or both. Filterable by content type, author, parent story, date range, and minimum points.10 params

Search Hacker News stories, comments, polls, and jobs via Algolia — by keyword, by filters alone, or both. Filterable by content type, author, parent story, date range, and minimum points.

Parameters* required
authorstring
Filter results to a specific author — useful for finding a user's posts on a topic. Matches the HN username exactly and is case-sensitive, so a re-cased name finds nothing. Trimmed before filtering...
countinteger
Number of results to return, at most 50 per call. A larger value is served at 50: the search runs at count 50 from the hit where the requested page starts, and the notice names the count and page t...default: 30
dateRangeobject
Filter to a creation-time window with a start, an end, or both. An empty object is rejected — omit dateRange instead.
minPointsinteger
Minimum score. Applies to stories and polls, including the ask_hn, show_hn, and front_page subsets. Comments and jobs carry no points in the search index, so any minPoints excludes them — combining...
pageinteger
Page number for pagination (0-indexed), counted in pages of count results.default: 0
querystring
Search terms. Supports simple keywords — Algolia handles stemming and relevance, and a hit must contain every term. Matching is typo-tolerant and the last term also matches as a prefix (zig matches...
sortstring
Sort order. "relevance" for best match, "date" for most recent first.one of relevance · datedefault: relevance
storyIdinteger
Restrict results to one discussion: the id of a story or poll root, combined with the other filters. Pair with tags "comment" to search within a thread. Take it from hits[].storyId, from a poll hit...
tagsstring
Filter results by content type: "story", "comment", "poll", or "job", or the story subsets "ask_hn", "show_hn", and "front_page". "front_page" is the HN front page right now (about 30 stories); no...one of story · comment · poll · job · ask_hn · show_hn
viewstring
How much of each hit to return. "full" includes every field, within a 64,000-byte budget on each response surface: a page over it drops highlights.text from every hit (highlightsTextOmitted), and i...one of full · compactdefault: full

Sponsors

Configuration

HN_CONCURRENCY_LIMITdefault: 10

Max concurrent HTTP requests for batch item fetches (integer, 1–50).

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warning').

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/hn-mcp-server

Browse Hacker News feeds, threads, and user profiles with full-text search via MCP. STDIO or Streamable HTTP.

4 Tools

Version License Docker MCP SDK npm TypeScript Bun

Details

Repository
github.com/cyanheads/hn-mcp-server
Category
Search & Web Crawling
Package
@cyanheads/hn-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
1
Tools verified
Nov 6, 2026

More from cyanheads

Related Search & Web Crawling MCP servers

View all
1jonradoff avatarLLM Optimizerjonradoff/llmoptAI brand visibility analytics: visibility scores, optimizations, video, Reddit, and search rankings.7stars
2zezeron avatarTweetsave Mcpzezeron/tweetsave-mcpTwitter/X analysis without token waste. Fetch tweets, download media. No API key.7stars
3pangolinfo avatarAmazon Mcppangolinfo/pangolinfo-mcpAmazon data MCP: products, reviews, niches, WIPO design/IP + US litigation, AI search & trends.6stars
4mysleekdesigns avatarCrawlforge Mcp Servermysleekdesigns/crawlforge-mcpWeb scraping, crawling, deep research & autonomous extraction — 31 MCP tools, clean Markdown/JSON6stars
5luminaire1337 avatarMTA:SA Documentation MCP Serverluminaire1337/mtasa-docs-mcpMCP server for MTA:SA documentation with intelligent search and caching6stars
6roshunsunder avatarFilesiftroshunsunder/filesiftLocal file search for AI agents — semantic + keyword indexing over your codebase.6stars