Hacker News MCP Server for Claude — Top Stories, Comments & Search Without an API Key
We pulled the Hacker News logic out of our internal Telegram bot and shipped it as a standalone MCP server. Now any Claude session can read HN — no API key, no signup, install in 30 seconds.
necl-hn-mcpis a free open-source MCP server giving Claude access to Hacker News across 5 tools:hn_top_stories,hn_category,hn_get_story,hn_get_comments,hn_search.- No API key required — HN's Firebase API and Algolia search are public and unlimited (we tested 200+ requests/minute without throttling).
- Install via
uvxin 30 seconds — no Python venv setup, no PyPI dependency, no config file edits beyondmcp.json. - Under 200 lines of Python total — auditable in 5 minutes, MIT-licensed.
- Returns clean structured dicts that LLMs chain in 2-3 tool calls (
search → top story → comments → summary). - Production-tested: powers our internal HN→content pipeline that's been running 3× daily for 6 months.
What is MCP and why should you care
Model Context Protocol (MCP), released by Anthropic in late 2024, is a standard for connecting AI agents to external data and tools. Before MCP, every LLM integration with Slack, GitHub, your database, or a third-party API required custom plumbing per app per model. MCP turned all of that into a single shared interface.
Think of it like USB for AI: one cable, any device.
For Claude specifically, MCP servers make Claude Desktop and Claude Code dramatically more useful. With MCPs installed, Claude can:
- Read your filesystem and codebase
- Query your Postgres
- Post to Slack
- Search Hacker News (with our server)
- Anything else someone has built a server for
There are 20,000+ MCP servers in catalogs as of mid-2026. Most are stdio (run locally on your machine), some are HTTP/SSE (run remotely). Both flow data into Claude the same way.
Why we built necl-hn-mcp
We've been running an internal content agent for 6 months — a Telegram bot that aggregates Hacker News three times a day and generates draft posts for the team. It's the engine behind our NeCL Telegram channel. Every post we write riffs off something we noticed on HN that day.
The HN-fetching logic in that agent was clean enough that pulling it out as a standalone MCP took us exactly 2 hours. We tested the full tool chain in Claude Desktop the same evening. Now any AI agent — not just our internal bot — can read HN through the same plumbing.
What the 5 tools do
hn_top_stories(limit, hours)
Top N stories from the last N hours, ranked by score. Default: top 10 from last 24h.
"Show me the top 5 HN stories from the last 6 hours"
hn_category(category, limit)
Pull stories from one specific category: top, new, best, ask, show, job.
"What's in Ask HN right now?"
"Show me the top 3 Show HN posts about AI agents"
hn_get_story(story_id)
Full metadata for a single story — title, URL, score, author, comments count, posted time.
"Get details for HN story 38420000"
hn_get_comments(story_id, limit)
Top-level comments thread for a story, in HN ranking order. Each comment has replies_count so the LLM knows whether there's a deeper discussion.
"What are people saying about HN story 38420000?"
hn_search(query, sort, limit)
Full-text search across HN posts and comments via the Algolia HN API. Sort by relevance or date.
"Search HN for posts about RAG performance, sorted by date"
"Find recent HN discussions on Claude vs GPT-4"
Returns a clean shape — {hits, total_hits, query, sort} — instead of raw Algolia.
Install in 30 seconds
The recommended path uses uvx (modern Python install runner — no venv, no pip install):
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"
]
}
}
}
Restart Claude. Type a HN question. It just works.
If you don't have uvx: pip install uv or brew install uv.
What you can build with this
Five practical patterns we've seen people use HN data for:
- Daily content brief — pull top HN stories, summarize the meta-trends, generate cross-platform posts. This is exactly what our internal content agent does every day before we sit down to write.
- Competitive research bot — search HN for mentions of competitors. Surface negative comments. Track sentiment over time.
- Trend detector — monitor
newandbestcategories on a cron. Alert when a topic spikes (e.g. a new framework hits front page). - Newsletter pipeline — keyword search over a time window. Cluster results. Generate an editorial digest.
- Customer-discovery agent — search Ask HN for problems your product solves. Generate cold-outreach drafts.
Each of these used to require glue code to hit the HN API directly. Now it's one Claude conversation.
Why no API key
HN's Firebase API and Algolia HN search are both fully public. No registration, no rate limits worth worrying about. We deliberately picked HN as the pilot MCP for exactly this reason — most MCP authors immediately complicate distribution with OAuth flows and API key setup. Skipping that gives us install rate.
This matters if you're building MCPs yourself: start with public-data tools first. Save the OAuth dance for v2.
How an MCP server actually works (technical detail)
Our server is ~150 lines of Python:
hn.py— async HTTP client wrapping Firebase HN + Algolia HN APIs.server.py— FastMCP wrapper that exposes each function as an MCP tool with typed signatures.__main__.py— entrypoint that runsmcp.run()over stdio.
When Claude calls a tool:
- Claude Desktop spawns
uvx --from git+... necl-hn-mcpas a subprocess. - The subprocess listens on stdin for JSON-RPC requests, replies on stdout.
- Our tool fetches HN data, formats it into a clean dict, returns.
- Claude reads the response, continues reasoning.
That's the whole protocol. No magic.
Pair this with our Skill
If you're using necl-hn-mcp for content research, pair it with necl-content-poster — our Claude Skill that turns one draft into three platform-tuned posts (Telegram RU, LinkedIn EN, Threads EN).
End-to-end pipeline: HN MCP finds the story → content-poster writes the three posts → you publish.
See also
- Claude Skills + Cross-Platform Content Generator — pair this MCP with our content Skill
- Marketplace Publishing Playbook for MCPs and Skills — how we shipped this MCP to 13 catalogs
- necl-hn-mcp on GitHub — source code, install, examples
- necl-content-poster Skill — Skill that turns MCP-found stories into posts
- Stop Using GPT-4 for Everything — related: AI cost optimization
- Cream Mic — AI desktop assistant by NeCL — another open-source NeCL project
FAQ
What is MCP and how is it different from a regular API?
MCP (Model Context Protocol) is a standardized way for AI agents to call tools and access data. It's like an API spec specifically designed for LLM-calling. The difference from a regular API: MCPs declare their tools in a way Claude can discover and use without per-app coding.
Do I need to know Python to use this?
No. You install via `uvx`, which handles Python automatically. Just add the JSON snippet to `mcp.json` and you're done.
Will Claude rate-limit me on HN?
No. HN's API is public and has no enforced rate limits. Even heavy use (hundreds of queries per minute) is fine.
Does this work in Claude Code (the CLI), not just Claude Desktop?
Yes. Any MCP client supports it — Claude Code, Cursor, Continue, Cody, any custom MCP client.
Can I use this commercially?
Yes, MIT licensed. You can build paid products on top of it. We appreciate attribution but don't require it.
Is the source code small enough to audit?
Yes — under 200 lines total. Two files: [hn.py](https://github.com/adjacentai/necl-hn-mcp/blob/main/src/necl_hn_mcp/hn.py) and [server.py](https://github.com/adjacentai/necl-hn-mcp/blob/main/src/necl_hn_mcp/server.py).
How is this different from just hitting the HN API directly?
Direct API hitting requires you to write glue code per app. MCP makes the HN tools discoverable by any AI agent without per-app code — your prompt is enough.
Need a custom MCP server wired to your internal APIs, databases, or SaaS tools? We build them. .
Book a 30-min call