HN-MCP
Hacker News Browser for Claude Desktop and AI Assistants
A Model Context Protocol (MCP) server that enables Claude Desktop and other AI assistants to browse Hacker News, search discussions, and analyze tech trends. Clean, fast, and actually works - no API keys required.
Table of Contents
What makes HN-MCP different?
🚀 Zero setup - Works instantly! Unlike Reddit, Twitter, or other platforms, Hacker News API requires no authentication, no API keys, no registration. Just install and go.
⚡ Smart caching - 50MB LRU cache with adaptive TTLs delivers 50ms cached responses (vs 200-500ms uncached). Popular content stays cached longer automatically.
🎯 Clean data - Direct from HN's Firebase API and Algolia Search. No fake metrics, no made-up sentiment scores, no hallucinated data.
🧠 LLM-optimized - Response formats designed specifically for AI assistants. Structured JSON that Claude can parse perfectly every time.
📦 TypeScript - 100% TypeScript with strict typing. Zod schemas validate every input and output. Reliable and maintainable.
✅ Multi-channel distribution - Available via npm, Docker Hub, MCP Registry, and .mcpb extension. Choose your preferred installation method.
🐳 Docker ready - Multi-platform images (amd64, arm64) with health checks and optimized builds. Deploy anywhere in seconds.
Quick Start (30 seconds)
For Claude Desktop
Add this to your claude_desktop_config.json:
That's it! HN-MCP is now available in Claude.
What can it do?
Ask your AI assistant to:
📊 "What's trending on Hacker News?" - Browse top stories
🔍 "Search for discussions about AI" - Search across all content
💬 "Get comments on story 12345678" - Fetch full discussion threads
👤 "Analyze user pg" - Get user karma, submissions, and activity
📚 "Explain HN karma" - Understand Hacker News terminology
Perfect for:
🚀 Startup founders - Monitor YC companies, track competitor launches, discover market trends
💼 Tech recruiters - Find talented developers, understand the tech community pulse
📊 Market researchers - Analyze tech sentiment, identify emerging technologies, track discussion trends
✍️ Content creators - Find trending topics, research technical subjects, engage with developer community
🔍 Developers - Stay updated on latest tools, frameworks, and best practices discussed by peers
📰 Tech journalists - Source breaking stories, find expert opinions, track industry discussions
🎓 Researchers - Analyze tech community behavior, study information diffusion, collect discussion data
Available Tools
browse_stories
Browse posts from Hacker News by category.
search_hn
Search across all Hacker News content.
get_story_details
Get a story with all its comments.
user_analysis
Analyze a Hacker News user's profile.
hn_explain
Get explanations of HN terms.
Installation Options
Claude Desktop Extension (.mcpb)
Easiest method - One-click install for Claude Desktop:
Download
hn-mcp.mcpbfrom latest releaseOpen Claude Desktop
Click on the extension file to install
Restart Claude Desktop
That's it! HN-MCP will be available immediately.
Quick Start with npx
Global Install
Using Docker
From Source
Rate Limits
API | Official Limit | Our Limit | Notes |
HN Firebase | None ✅ | 300/min | Self-imposed for courtesy |
Algolia Search | None ✅ | 300/min | Max 1000 results per query |
Why HN-MCP?
What others do wrong:
❌ Scoped npm names -
@someone/hn-somethingis hard to remember❌ Not published to npm - Manual installation only
❌ No caching - Slow repeated requests
❌ Poor documentation - Unclear how to use
What we do right:
✅ Clean package name - Just
hn-mcp✅ Smart caching - 50MB LRU cache with adaptive TTLs
✅ Clear documentation - You're reading it
✅ TypeScript - Type-safe and maintainable
Examples
Your AI can now answer:
"What are the top posts about GPT-4 today?"
"Show me what's trending on Hacker News"
"What are people saying about this article?"
"Analyze the user dang"
"Get the comments from HN story 12345678"
Troubleshooting
Common Issues
"Command not found" error
Connection issues
Hacker News may be down (check https://status.ycombinator.com)
Firewall blocking requests
Try restarting the MCP server
Search returns max 1000 results
This is Algolia's hard limit
Use date filters to narrow results
Try more specific search queries
Environment Variables
Configure HN-MCP using environment variables. See .env.example for detailed documentation.
Variable | Description | Default |
| Run as HTTP server instead of stdio |
|
| HTTP server port |
|
| Disable caching for real-time data |
|
| Override rate limit (requests/minute) |
|
Quick setup:
Development
Requirements
Node.js >= 18.0.0
npm or yarn
TypeScript 5.5+
Contributing
PRs welcome! See CONTRIBUTING.md for guidelines.
We keep things simple:
Clean TypeScript code
Smart caching
Clear documentation
Fast responses
Support
License
MIT - Use it however you want!
Made with ❤️ for the MCP community by the creator of reddit-mcp-buddy. No venture capital, no tracking, just a good MCP server.