The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Necl Hn MCP listing page.
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.
| 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. |
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):
Don't have uvx? Install it: pip install uv or brew install uv.
Then in mcp.json:
Then use the same python -m necl_hn_mcp config as above.
Once installed, just ask Claude things like:
Claude will call the right tool, no further setup.
new and best categories on a cron, alert when a topic spikes.show category for new tools in your stack."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.
Full pipeline:
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.
MIT — see LICENSE.