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 整合