Hacker News Reader MCP Server
A Model Context Protocol (MCP) server that fetches Hacker News discussions and article content. Optimized for LLM consumption with compact, token-efficient formatting.
Features
✅ Fetch complete Hacker News discussion threads
✅ Scrape linked article content in markdown format
✅ LLM-optimized output (compact nested replies)
✅ Accepts both HN URLs and item IDs
✅ Handles edge cases (text posts, Ask HN, deleted comments)
✅ Powered by Firecrawl for robust article extraction
Installation
Using uvx from GitHub (Recommended)
Using uv pip
Using pip
Usage
As an MCP Server
Add to your MCP settings configuration (e.g., in Claude Desktop or other MCP clients):
Or if you've installed it with pip/uv pip:
Environment Variables
Required:
FIRECRAWL_API_KEY- Your Firecrawl API key
Create a .env file:
Available Tools
get_hn_content
Fetches Hacker News comments and the linked article content.
Input:
hn_url: HN URL or item IDFull URL:
https://news.ycombinator.com/item?id=46130187Just ID:
46130187
Output: Combined markdown with:
Article Content - Scraped article in markdown format
HN Discussion - Formatted comment threads with metadata
Example:
Output Format
The tool returns LLM-optimized content:
Development
Local Setup
Testing
Using in Development Mode
For local development with live changes:
Requirements
Python 3.11+
Firecrawl API key (for article scraping)
Dependencies
mcp- Model Context Protocol SDKrequests- HTTP requestsbeautifulsoup4- HTML parsingfirecrawl-py- Article content extractionpython-dotenv- Environment variable management
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Links
Support
For issues, questions, or contributions, please visit the GitHub repository.