io.github.CloudCorpRecords/technews-port

السجل الرسمي البحث والويب

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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @reneturcios/technews-port
Claude Code
claude mcp add technews-port -- npx -y @reneturcios/technews-port@0.1.0 mcp
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "technews-port": {
            "command": "npx",
            "args": [
                "-y",
                "@reneturcios/technews-port@0.1.0",
                "mcp"
            ]
        }
    }
}
OCI package ghcr.io/cloudcorprecords/technews-port:0.1.0
Claude Code
claude mcp add technews-port -- docker run -i --rm ghcr.io/cloudcorprecords/technews-port:0.1.0 mcp
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "technews-port": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/cloudcorprecords/technews-port:0.1.0",
                "mcp"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. technews-port
  2. Install
  3. CLI
  4. MCP server
  5. Development
  6. License

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

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

Or run the container image:

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.

# The three ranked lists (default 30 stories, capped at 100)
technews-port top
technews-port new --limit 10
technews-port best --limit 5

# One item, one user
technews-port item 8863
technews-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:

npx -y @reneturcios/technews-port mcp

MCP client configuration:

{
  "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

npm install
npm run build   # tsc -> dist/
npm test        # node test runner over test/*.test.ts, no network
npm 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.

الأسئلة الشائعة

ما هو io.github.CloudCorpRecords/technews-port؟

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

كيف أثبّت io.github.CloudCorpRecords/technews-port؟

يعمل على جهازك. في Claude Code: claude mcp add technews-port -- npx -y @reneturcios/technews-port@0.1.0 mcp. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.CloudCorpRecords/technews-port إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.CloudCorpRecords/technews-port مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.CloudCorpRecords/technews-port؟

ينشره CloudCorpRecords. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.