Hacker News MCP — by NeCL – Neural Engineering & Cognitive Logic

by adjacentai

362 downloads
Not rated
GitHub

About

Hacker News tools for AI agents (MCP server). Top stories, comments thread, full-text search via Algolia. No API key required. By NeCL.

Details

Author
adjacentai
Downloads
362
Categories
Developer Tools, AI

- Zero credentials and zero configuration required.
- Five tools for top stories, story details, comments, search, and categories.
- Battle‑tested code extracted from NeCL’s internal content engine.
- Clean structured data output, designed for LLM chaining.
- Compatible with any MCP client (Claude Desktop, Claude Code, etc.).
- Uses the free public HN API with no rate limits worth worrying about.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Hacker News MCP — by NeCL – Neural Engineering & Cognitive Logic
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via uvx (recommended, no setup) or pip, then add the configuration to your MCP client’s mcp.json. Once configured, agents can call tools like hn_top_stories, hn_get_story, hn_get_comments, hn_search, and hn_category using natural language prompts.

hn_top_stories

Get the top Hacker News stories from the last N hours, ranked by score. Args: limit: Number of stories to return (1-30). Default 10. hours: Time window in hours back from now. Default 24. Returns: List of story dicts with id, title, url, score, author, comments_count, posted_unix, hn_url, type, text (for Ask/Show HN posts).

hn_category

Get stories from a specific HN category. Args: category: One of "top", "new", "best", "ask", "show", "job". limit: Number of stories to return (1-30). Default 10. Returns: List of story dicts.

hn_get_story

Get full metadata for a single HN story by id. Args: story_id: The HN item id. Returns: Story dict with id, title, url, score, author, comments_count, posted_unix, hn_url, type, text. Returns {"error": "..."} if not found.

hn_get_comments

Get the top-level comments thread for a story, in HN ranking order. Args: story_id: The HN item id of the parent story. limit: Number of comments to return (1-30). Default 10. Returns: List of comment dicts with id, author, text, posted_unix, replies_count.

hn_search

Full-text search across HN stories and comments via Algolia. Args: query: Search query string. sort: "relevance" (default) or "date" (newest first). limit: Number of hits to return (1-50). Default 20. Returns: Dict with `hits` (list of clean dicts: id, kind, title, url, hn_url, author, points, comments_count, story_text, comment_text, created_at, tags) and `total_hits` (total matches Algolia found, may exceed limit).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "hacker news mcp \u2014 by necl \u2013 neural engineering & cognitive logic": {
            "necl-hn": {
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/adjacentai/necl-hn-mcp.git",
                    "necl-hn-mcp"
                ]
            }
        }
    }
}

McpServers

{
    "necl-hn": {
        "command": "uvx",
        "args": [
            "--from",
            "git+https://github.com/adjacentai/necl-hn-mcp.git",
            "necl-hn-mcp"
        ]
    }
}

necl-hn-mcp

License: MIT
MCP
Python
Built by NeCL

> Hacker News tools for AI agents. Top stories, story details, comments thread, full-text search.
>
> Zero credentials. Public HN API. Install and use.

Built by NeCL — AI engineering studio. Production-tested: this is the exact HN layer that powers our internal content agent, running 3× daily for months.

Tools

| Tool | What it does |
|---|---|
| hn_top_stories(limit, hours) | Top N stories from the last N hours, ranked by score. Default: top 10 from last 24h. |
| hn_get_story(id) | Full story metadata: title, url, score, author, comments count, posted time. |
| hn_get_comments(id, limit) | Top-level comments thread for a story, sorted by HN ranking. |
| hn_search(query, sort) | Full-text search across HN posts and comments (via Algolia HN API). |
| hn_category(category, limit) | Stories from a specific category: top, new, best, ask, show, job. |

Why this MCP

- Zero credentials, zero config — public HN API, no rate limits worth worrying about, no signup.
- Battle-tested code — extracted from our internal HN-to-drafts content engine that's been running 3×/day for months.
- Built for AI agents — every tool returns clean structured data that LLMs can chain together (search → top story → comments → summary).
- Use case — content research, trend monitoring, automatic news digests, prompt-context enrichment.

Install

Via uvx (recommended — no setup)

uvx runs the package in an ephemeral env. No pip install, no venv. Add to your mcp.json (Claude Desktop, Claude Code, or any MCP client):

{
  "mcpServers": {
    "necl-hn": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/adjacentai/necl-hn-mcp.git",
        "necl-hn-mcp"
      ]
    }
  }
}

Don't have uvx? Install it: pip install uv or brew install uv.

Via pip + python -m

pip install git+https://github.com/adjacentai/necl-hn-mcp.git

Then in mcp.json:

{
  "mcpServers": {
    "necl-hn": {
      "command": "python",
      "args": ["-m", "necl_hn_mcp"]
    }
  }
}

From source (for development)

git clone https://github.com/adjacentai/necl-hn-mcp.git
cd necl-hn-mcp
pip install -e ".[dev]"

Then use the same python -m necl_hn_mcp config as above.

Example use in Claude

Once installed, just ask Claude things like:

- "What are the top 5 stories on HN in the last 6 hours?"
- "Get the comments thread for HN story 38420000"
- "Search HN for posts about RAG performance, sorted by date"
- "Show me everything in the Ask HN category right now"
- "Find the top 3 Show HN posts about AI agents this week"

Claude will call the right tool, no further setup.

What you can build with this

- Daily content brief — pull top HN stories, summarize, generate cross-platform posts.
- Competitive research bot — search HN for mentions of your competitors, surface negative comments.
- Trend detector — monitor new and best categories on a cron, alert when a topic spikes.
- Newsletter pipeline — search by keyword window, cluster results, generate editorial digest.
- Customer-discovery agent — search Ask HN for problems your product solves, generate cold-outreach drafts.
- Tech-radar updater — periodically scan show category for new tools in your stack.

Troubleshooting

"mcp command not found" / install errors.
Make sure your Python is 3.10+. If using uvx, ensure uv is installed (pip install uv). For pip install: pip install necl-hn-mcp then verify python -m necl_hn_mcp --help doesn't error.

Tool calls timeout.
HN's Firebase API can be slow when fetching many items (e.g. hn_top_stories(limit=30, hours=168) scans 200 stories). Default timeout is 10s per request. For long-window queries, use lower limit.

Algolia returns no hits.
Algolia indexes HN content with a delay (~5-15 min for fresh items). Try sort="date" for recent activity.

Comments thread is empty for a story I see on HN.
hn_get_comments returns only top-level comments. Replies aren't recursively fetched (to keep token cost predictable for LLMs). Use the replies_count field on each comment to know if there's deeper discussion.

Tools don't show up in Claude.
After editing mcp.json, fully restart Claude Desktop / Claude Code (not just reload). Check the MCP logs in Settings → Developer.

Pair with

- necl-content-poster Skill — turn HN stories into ready-to-publish posts for TG/LinkedIn/Threads.

Full pipeline:

necl-hn-mcp (find story) → necl-content-poster (write 3 posts) → you publish

Built by NeCL

neclco.com — production AI engineering. RAG systems, voice agents, Telegram bots, custom MCPs and content engines for companies that need more than wrappers.

Need a custom MCP wired to your internal APIs / databases / SaaS? Visit neclco.com.

Development

```bash
git clone https://github.com/adjacentai/necl-hn-mcp.git
cd necl-hn-mcp
pip install -e ".[dev]"

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.