hn-mcp
MCP server for Hacker News research. Enables AI agents to search stories and comments, browse listings, read discussion threads, and look up users via structured tools.
README
hn-mcp
MCP server for Hacker News research. Gives AI agents structured access to HN stories, discussions, and the full 47M-item archive.
Works with Claude Code, ChatGPT, Cursor, and any MCP-compatible client.
Tools
search -- find stories and comments
{ "query": "rust vs go backend", "min_points": 50 }
{ "query": "react", "type": "comment", "author": "gaearon" }
{ "query": "bitcoin", "date_from": "2017-01", "date_to": "2017-12" }
Uses Algolia for fast, ranked full-text search. Specify date_from/date_to
to search the local archive instead (DuckDB over Parquet, 2006-present).
browse -- current front-page listings
{ "list": "top", "count": 30 }
{ "list": "show" }
Lists: top, new, best, ask, show, job.
thread -- read a full discussion
{ "id": 27016630 }
{ "id": 27016630, "max_comments": 0 }
Returns the story and its full comment tree (threaded, not flat). Comments are fetched in parallel. Default limit: 200 comments, depth 8.
user -- look up a user
{ "username": "pg" }
Returns karma, account age, about text, and recent submission IDs.
Data Sources
| Source | Coverage | Speed | Used by |
|---|---|---|---|
| Algolia API | Indexed stories + comments | Fast | search |
| Firebase API | Real-time items, users, lists | Fast | browse, thread, user |
| Local Parquet + DuckDB | 47M+ items, 2006-present | Slower | search (with date range) |
Deploy
npm install
npm run build
npm start
# listening on http://localhost:8787/mcp
With Docker:
docker compose up -d
The Docker setup binds ./data as the Parquet archive directory. To download
the historical archive:
bash scripts/sync-data.sh
This fetches monthly Parquet shards from HuggingFace (~12 GB total). It skips files already downloaded and re-downloads the current month.
Production (nginx + certbot)
Copy hn-mcp.conf to /etc/nginx/sites-enabled/, update server_name, then:
certbot --nginx -d your-domain.com
Connect
# Claude Code (local)
claude mcp add hn-research --url http://localhost:8787/mcp
# Claude Code (remote)
claude mcp add hn-research --url https://your-domain.com/mcp
# Cursor / VS Code -- add to .cursor/mcp.json or .vscode/mcp.json:
# { "mcpServers": { "hn-research": { "url": "http://localhost:8787/mcp" } } }
Environment
| Var | Default | Description |
|---|---|---|
PORT |
8787 |
HTTP server port |
HN_DATA_DIR |
/data/parquet |
Path to Parquet archive files |
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.