KosmoKrator

data

Hacker News MCP Integration for LangChain

Connect Hacker News to LangChain through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

5 functions 5 read 0 write No credentials auth

Connect Hacker News to LangChain

Bridge LangChain agents to local KosmoKrator integration tools through MCP or headless CLI calls.

Use the MCP gateway when the agent should discover tools, or wrap kosmo integrations:call for fixed chains. The gateway is local, scoped to this integration, and starts with --write=deny so LangChain can inspect read-capable tools without receiving write access by default.

Hacker News MCP Config for LangChain

Keep the gateway scoped to the integration and operation class needed by the chain.

{
  "mcpServers": {
    "kosmokrator-hackernews": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=hackernews",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=hackernews --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Hacker News instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Hacker News Tools Visible to LangChain

LangChain sees stable MCP tool names generated from the Hacker News integration catalog.

MCP toolSource functionTypeDescription
integration__hackernews__hackernews_get_item hackernews.hackernews_get_item Read Fetch a Hacker News item (story, comment, job, poll, or poll option) by its numeric ID. Returns all available fields: title, URL, text, author (by), score, time, descendants, and kids (child comment IDs). Use this to look up any HN item when you know its ID.
integration__hackernews__hackernews_get_user hackernews.hackernews_get_user Read Fetch a Hacker News user profile by username. Returns karma score, about text, account creation date, and lists of submitted item IDs (submissions) and comment IDs.
integration__hackernews__hackernews_list_top_stories hackernews.hackernews_list_top_stories Read Fetch the current top stories from Hacker News. Returns up to N stories with full item data (title, URL, score, author, comment count). The "top" list is ranked by the HN algorithm (a combination of score, recency, and flags).
integration__hackernews__hackernews_list_new_stories hackernews.hackernews_list_new_stories Read Fetch the newest stories from Hacker News. Returns up to N stories with full item data (title, URL, score, author, comment count). These are the most recently submitted stories, not yet ranked by the HN algorithm.
integration__hackernews__hackernews_list_best_stories hackernews.hackernews_list_best_stories Read Fetch the highest-scoring (best) stories from Hacker News. Returns up to N stories with full item data (title, URL, score, author, comment count). These are the stories with the highest scores, regardless of age.

Related Hacker News Pages