An MCP server that lets Claude (or any MCP-compatible client) browse and search Hacker News in natural language.
It exposes the official Hacker News Firebase API and the Algolia HN Search API as four simple tools. No auth, no database, no frontend — just a stdio MCP server.
| Tool | Description | Arguments |
|---|---|---|
get_top_stories |
Current top stories from HN. | limit (int, 1-30, default 10) |
get_new_stories |
Newest submissions. | limit (int, 1-30, default 10) |
get_story |
A single story plus its top-level comments. | story_id (int), comment_limit (int, 0-30, default 10) |
search_stories |
Keyword search via Algolia. | query (str), limit (int, 1-30, default 10) |
Requires Python 3.11+.
# with uv
uv pip install -e .
# or with pip
pip install -e .# start the server on stdio
python server.py
# or open the MCP Inspector
npx @modelcontextprotocol/inspector python server.pyAdd an entry to your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"hackernews": {
"command": "python",
"args": ["/absolute/path/to/hackernews-mcp/server.py"]
}
}
}Restart Claude Desktop. The four tools should appear in the tools menu.
Once connected, try:
- "What are the top 5 Hacker News stories right now?"
- "Show me story 39000000 and its top comments."
- "Search Hacker News for articles about Rust memory safety."
- "What's trending in new submissions?"
MIT