Technews Port

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 7, 2026

Hacker News top, new, and best stories, items, users, and full-text search.

发布方自己的服务:Port

概览

AI 生成的概览

只读的 Hacker News 阅读器,让助手获取热门、最新和最佳故事、单条内容、用户资料以及全文故事搜索。

可以做什么
  • 获取按排名排列的热门、最新和最佳故事列表,已解析标题、作者、得分、评论数、链接和时间
  • 按数字 ID 查询单条 Hacker News 内容,包括故事、评论、招聘和投票
  • 读取用户的公开资料:注册时间、karma、简介文本和提交内容 ID
  • 通过 Algolia HN Search API 按关键词搜索 Hacker News 故事
适用场景
适合让助手跟进科技资讯、总结 Hacker News 上的热门话题,或在对话中直接查询某条故事、评论串或用户。它只读,适合研究与摘要类工作流,而非发帖或管理。
运行要求
以 stdio 方式在本机运行,可通过 npx 使用 npm 包,或使用已发布的容器镜像。无需账号、API 密钥、环境变量或请求头;它调用 Hacker News 的公开 Firebase 与 Algolia API,因此需要网络访问。仅限桌面端。
安装前请注意
所有工具均为只读查询,不会发帖、投票或修改任何内容。查询与搜索词会发送到 Hacker News 的公开 API 以及 Algolia 搜索服务,即会传给第三方。结果来自实时站点,排名列表中的某个 ID 可能在抓取时已不存在。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Technews Port,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

technews-port

technews-port is a small reader for Hacker News that speaks to the site's own public APIs, so there is no scraping and nothing to sign up for. It pulls the ranked front-page lists (top, new, and best), any single item by its numeric id, and any user's public profile from the official Firebase API, and it searches story text through the Algolia HN Search API — the one capability the Firebase API does not have.

Story lists come back with the items already fetched, in ranked order, not just bare ids: the headline, author, score, and comment count are right there for each entry.

Install

bash
npx @reneturcios/technews-port top --limit 10

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/technews-port

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

Every command prints JSON.

bash
# The three ranked lists (default 30 stories, capped at 100)technews-port toptechnews-port new --limit 10technews-port best --limit 5
# One item, one usertechnews-port item 8863technews-port user pg
# Full-text story search via Algolia (default 20 hits)technews-port search "show hn" --limit 10
technews-port --version

Exit codes: 0 on success, 1 when the lookup fails (an unknown item or user, or an upstream error, named in the message), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/technews-port mcp

MCP client configuration:

json
{  "mcpServers": {    "technews-port": {      "command": "npx",      "args": ["-y", "@reneturcios/technews-port", "mcp"]    }  }}

Tools

ToolInputWhat it returns
get_top_storieslimit (integer, optional)The current top stories: the ranked item ids plus each story parsed — title, author, score, comment count, URL, and timestamp.
get_new_storieslimit (integer, optional)The newest stories, same shape as get_top_stories.
get_best_storieslimit (integer, optional)The best stories, same shape as get_top_stories.
get_itemitem_id (integer, required)One item of any kind (story, comment, job, poll): its type, author, text or title, score, child comment ids, and deleted/dead flags.
get_userusername (string, required)The user's public profile: creation time, karma, about text, and submitted item ids.
search_storiesquery (string, required), limit (integer, optional)Stories matching the query, from Algolia: title, URL, author, points, comment count, and posting time per hit.

If an id in a ranked list disappears between reading the list and fetching the item — it happens on a live site — the id stays in item_ids and the item is simply absent from items.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no networknpm run dev     # run the CLI from source via tsx

The core takes an injectable fetch function, and the test suite routes a fake fetch by URL to hand-written payloads shaped like real Firebase and Algolia responses — the tests never touch the network.

License

MIT — see LICENSE.

来源:README.md,提交 cd8b447

工具

6

get_top_stories

Get the current top stories on Hacker News.

输入参数limit

get_new_stories

Get the newest stories on Hacker News.

输入参数limit

get_best_stories

Get the best stories on Hacker News.

输入参数limit

get_item

Get a Hacker News item by its ID.

输入参数item_id必填

get_user

Get a Hacker News user profile by username.

输入参数username必填

search_stories

Search Hacker News stories by query.

输入参数limitquery必填

版本历史

1
  1. v0.1.0最新Oct 31, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Port 集成