Hn MCP Server
概览
作者提供的说明(英文原文)
Browse Hacker News feeds, threads, and user profiles with full-text search.
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i3 项中通过 3 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新↓ 260/周 · ★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 电脑或云端
- 传输方式: stdio, Streamable HTTP
- 分类: 搜索与 AI 记忆
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:3 项中通过 3 项
- 在作者的服务器上运行:你向它提出的内容会经过他们的服务器。
- 可以做 4 件事(工具) hn_get_stories, hn_get_thread, hn_get_user, hn_search_content
- 需要你自己填写:
HN_CONCURRENCY_LIMIT,MCP_LOG_LEVEL
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
适用于网页版、桌面版和手机版 Claude:
- 打开 Settings → Connectors
- 点击 Add custom connector
- 粘贴下面的地址,然后点击 Add
- 如果要求登录,请登录作者的服务
https://hn.caseyjhand.com/mcp或者在你的电脑上运行
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"hn": {
"command": "npx",
"args": [
"-y",
"@cyanheads/hn-mcp-server"
],
"env": {
"HN_CONCURRENCY_LIMIT": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add --transport http hn https://hn.caseyjhand.com/mcp或者在你的电脑上运行
claude mcp add hn --env HN_CONCURRENCY_LIMIT=your-value --env MCP_LOG_LEVEL=your-value -- npx -y @cyanheads/hn-mcp-server运行前请先填写空着的值。
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"hn": {
"url": "https://hn.caseyjhand.com/mcp"
}
}
}或者在你的电脑上运行
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"hn": {
"command": "npx",
"args": [
"-y",
"@cyanheads/hn-mcp-server"
],
"env": {
"HN_CONCURRENCY_LIMIT": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"hn": {
"type": "http",
"url": "https://hn.caseyjhand.com/mcp"
}
}
}或者在你的电脑上运行
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"hn": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/hn-mcp-server"
],
"env": {
"HN_CONCURRENCY_LIMIT": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
ChatGPT 只能连接互联网上的服务器:
- 打开网页版 ChatGPT → Settings → Connectors (Apps)
- 点击 Create 或 Add(部分套餐需要先在 Advanced 中开启 Developer mode)
- 粘贴下面的地址,起个名字,然后保存
- 如果要求登录,请登录作者的服务
https://hn.caseyjhand.com/mcp菜单名称可能因套餐和版本不同而略有差异。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
HN_CONCURRENCY_LIMITenvMax concurrent HTTP requests for batch item fetches (integer, 1–50).MCP_LOG_LEVELenvSets the minimum log level for output (e.g., 'debug', 'info', 'warning').
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
工具名称和描述与服务器在 2026年11月7日 报告的完全一致。这些内容由作者撰写,不是我们写的;我们以纯文本形式显示。
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.
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.
hn_get_userGet an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.
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.
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月10日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 cyanheads 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- ✓ 通过
端点有响应
在 251 毫秒内响应(HTTP 200)
- – 不适用
使用 OAuth 登录
无需登录
- ✓ 通过
工具描述中没有隐藏指令
已读取 4 个工具描述,未发现针对 AI 的隐藏指令
与“搜索与 AI 记忆”中的其他服务器比较i
- 星标数多于此分类中其他 5825 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5825 个服务器的 75% 更新
- 基础检查结果等于或优于此分类中其他 5825 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Hn MCP Server 安全吗?
它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在我的电脑上运行还是在云端?
两种方式都可以:安装在你的电脑上,或者连接云端版本。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(0.6.0)于12天前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,所以接受远程 MCP 服务器的应用也可以使用,例如开启开发者模式的 ChatGPT。
有什么可以替代它?
同一分类中有:Context7, Codebase Memory, Exa
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Codebase Memory
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Exa
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
@cyanheads/hn-mcp-server Browse Hacker News feeds, threads, and user profiles with full-text search via MCP. STDIO or Streamable HTTP. 4 Tools
Public Hosted Server: https://hn.caseyjhand.com/mcp
Overview
Hacker News feeds, threads, and profiles. Browse ranked feeds, read full comment threads, look up users, and search stories, comments, polls, and jobs by keyword, author, date, or score.
Tools
| Tool | Description |
|---|---|
hn_get_stories | Fetch stories from an HN feed (top, new, best, ask, show, jobs), with title, URL, score, author, and comment count |
hn_get_thread | Get an item and its comment tree as a threaded discussion, with depth and comment-count controls and a cursor to page through long threads |
hn_get_user | Fetch a user profile with karma, about, and optionally a page of resolved submissions |
hn_search_content | Search stories, comments, polls, and jobs via Algolia by keyword, by filters alone, or both — type, author, parent story, date range, and minimum points |
Agent skill
| Skill | Description |
|---|---|
hn-guide | How to find a link's thread, search without Algolia's fuzzy matches, read large comment trees in full, and search what one user said. Served over MCP as skill://hn-guide/SKILL.md and shipped in the npm package |
Capability reference
hn_get_stories tool
- Six feed types:
top,new,best,ask,show,jobs;count(default 30) andoffsetfor pagination. One call serves at most 100 stories; acountup to 1,000 is served at 100, with anoticenaming the nextoffset - Returns id, type, title, url, domain, score, author, timestamp, comment count, and body text — each field omitted (not null) when HN doesn't provide it
- Enrichment reports
total,offset, andhasMore; while more stories remain,truncatedis set andnoticenames the nextoffset, and anoticeexplains empty pages (empty feed, offset past end, or every item on the page deleted/flagged). The last page carries no truncation - Items whose fetch failed after retries, or ran past the call's 50-second time budget, are listed in
failedIdswith anoticenaming the retry; a page where every item failed returns the classified upstream error instead of an empty list
hn_get_thread tool
itemIdplusdepth(default 3; 0 returns the item with no comments) andmaxComments(default 50) capping one response across all levels, alongside a fixed 64,000-byte budget on each response surface (allcontent[]text,nextCursorincluded, and thestructuredContentJSON) that cuts only between comments and always returns a page's first comment whole. One call resolves at most 10 levels and 200 comments; adepthup to 100 is served at 10 and amaxCommentsup to 1,000 at 200, with anoticenaming the comment to pass asitemIdor thenextCursorthat reaches the rest- Breadth-first traversal ranked like HN — top-ranked top-level comments resolve first, replies fill in only after the level above is exhausted
- Resumable: a response stopped by
maxComments, the byte budget, an upstream rate limit, or the call's 50-second time budget returnsnextCursor; passing it back ascursorwith the sameitemIdcontinues at the next unseen comment. The cursor carries the unvisited comments themselves, so re-ranked replies cannot shift it, and the server keeps no session state. A cursor the tool did not issue, an altered one, or one passed with a differentitemIdfails withinvalid_cursor - The root carries its relationships and state:
parentandstoryId(the story or poll the discussion belongs to) for a comment,pollfor a poll option,partsand resolvedoptions(text and votes, at every depth) for a poll, anddeleted/deadmarkers. Thecontent[]heading names the type — a title,Comment by,Poll option by on poll— and marks a deleted or dead root - Flat comment list carries
depth/parentIdfor tree reconstruction, pluschildCountand anisOpflag when the comment author submitted the thread's story — on a comment root, the story atstoryId, never the comment's own author. Dead and deleted comments are left out, but their live replies are still returned at their truedepth, withparentIdnaming the omitted comment truncatedandtruncationReason(count,size,rate_limited,time, ordepthwhen replies lie below the depth limit) are set only while comments remain unread — never on a terminal page, including a thread that loads in full at exactly the cap.noticereports deleted/dead comments omitted during traversal and the next step: the cursor, or a largerdepthor a comment id asitemId, naming by ID any omitted comment whose replies the depth limit cut- Comments and poll options whose fetch failed after retries or ran past the call's time budget are listed in
failedIds, andnoticenames them with the retry; failed comments ride innextCursor, so paging on retries them rather than skipping them. The root item is still returned, and a failure is never passed off as amaxComments/depthlimit
hn_get_user tool
usernameis case-sensitive and trimmed;includeSubmissions(default false) resolves recent submissions, withsubmissionCount(default 10) andsubmissionOffsetpaging through a long history. One call resolves at most 50 submissions; asubmissionCountup to 1,000 is served at 50, with anoticenaming the nextsubmissionOffset- Profile includes karma, creation date, and about text (HTML stripped); submissions filter out dead/deleted items
- A comment submission carries its
parentand a poll-option submission itspoll, so either links back to what it answered - Enrichment echoes
submissionOffsetand the offset to send next, or a notice when the requested offset is past the end of the history - Submissions whose fetch failed after retries, or that the call's 50-second time budget cut, are listed in
failedIdswith anoticenaming the retry (and the budget, when it cut them); a window where every submission failed returns the classified upstream error —Timeoutwhen the budget cut them all - Each response surface is held to a fixed 64,000-byte budget: an over-budget page keeps every submission and cuts the longest bodies to one shared length, flagging each with
textTruncatedand pointing tohn_get_threadfor the whole text
hn_search_content tool
- Free-text
query— typo-tolerant, with the last term also matching as a prefix; wrap a term in double quotes to match it exactly and put-before one to exclude it — plustags(story/comment/poll/job/ask_hn/show_hn/front_page),author(the exact, case-sensitive username),storyId,dateRange, andminPointsfilters;sortby relevance or date;count(default 30) andpagefor pagination. One call serves at most 50 hits; acountup to 1,000 is served as the page of 50 starting at the requested page's first hit, with anoticenaming thecount: 50page to pass next; a non-zeropagewhose first hit begins no page of 50 fails withcount_page_unaligned, naming acountandpagethat start there and, when that count is under 25, the page of 50 that holds that hit tags: "front_page"is the front page right now (about 30 stories), never past front pages; for an earlier window, usetags: "story"withdateRangeandminPointsqueryis optional when a filter is set — list Ask HN, Show HN, polls, or jobs on their own, or pass a story'sstoryIdwithtags: "comment"to search within one thread. No query and no filter fails withmissing_query_or_filter- To check whether a page was discussed, pass its URL alone as
query: the leadinghttp://,https://, orwww.is dropped before searching, so submissions under either scheme, with or withoutwww., all match. The outputqueryand the notice show what was searched dateRangebounds take ISO 8601 (YYYY,YYYY-MM,YYYY-MM-DD, or a date-time with optional offset), read as UTC and both exclusive; an empty or out-of-order range fails withinvalid_date_rangeminPointsapplies to stories and polls — comments and jobs carry no points, so pairing it withtags: "comment"or"job"fails withmin_points_unscored_typeview: "compact"drops the two body-text fields (text,highlights.text), which otherwise repeat a long comment twice per hit — pass a hit id tohn_get_threadto read the body. Infull, a page over 64,000 bytes per response surface dropshighlights.textfrom every hit (highlightsTextOmitted), then cuts the longest bodies to one shared length (textTruncated, with anhn_get_threadpointer) — every hit stays- Each hit carries its
type(story,comment,poll,pollopt,job) when Algolia records one. Untagged searches also return poll options, which carry only an id, author, vote count, and date —hn_get_threadreads an option's text and poll. A poll hit has nostoryId; its ownidis the discussion root - Job descriptions come back as
text, though keywords don't search them - Highlight metadata (
highlights.title,highlights.text,matchedWords) shows which terms matched and where;highlights.textis the matched body in full withmarkers - Enrichment echoes the applied
criteria— each filter set (authortrimmed,dateRangeas the exclusive UTC bounds applied, to the second), plussort,count, andviewwith defaults filled — so a saved result says what it answers - Enrichment reports
totalHits,page, and the actual reachabletotalPages— not derived fromtotalHits, since broad queries report far more hits than Algolia will serve.totalHitsExact: falsemarkstotalHitsas an estimate, andreachableHits: 1000marks a search that matches more than Alg
只显示了开头部分;其余内容请在仓库中阅读