Hacker News
About
Fetch and interact with Hacker News content, including top stories, comments, and search functionality.
Details
- Author
- georgenance
- Categories
- Communication, Other, Search, Knowledge Base
Jump to
Setup
Install Hacker News in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/georgenance/hackernews-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server that provides tools to fetch and interact with Hacker News content. This server enables AI assistants to access real-time Hacker News data including top stories, story details, comments, and search functionality.
-
get_top_stories- Fetch the latest top stories from Hacker News
- Configurable count (1-100 stories)
- Optional text content inclusion
- Returns story metadata including title, URL, score, author, and comment count
get_story_details- Get detailed information about a specific story
- Fetch complete story metadata
- Optional comment inclusion with threaded structure
- Optional markdown content extraction from linked articles
get_story_comments- Retrieve popular comments for a story
- Configurable minimum score filtering
- Adjustable comment thread depth (1-10 levels)
- Limit number of comments returned (1-100)
- Formatted as readable text with thread structure
search_stories- Search recent stories by keywords
- Search through story titles, content, and URLs
- Configurable time range (1-168 hours)
- Limit results (1-50 stories)
- Node.js 18+
- npm or yarn
- An MCP-compatible client (like Claude Desktop)
git clone https://github.com/yourusername/hackernews-mcp.git cd hackernews-mcp
Add the server to your Claude Desktop configuration:
macOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows:%APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "hackernews-mcp": { "command": "node", "args": ["/path/to/hackernews-mcp/build/index.js"] } } }
The server communicates via stdio and can be used with any MCP-compatible client:
Once connected, you can ask your AI assistant things like:
- "What are the top stories on Hacker News today?"
- "Get details about Hacker News story 12345678"
- "Show me comments for that viral AI story"
- "Search for recent stories about TypeScript"
This will start the MCP Inspector, providing a web interface to test the server's tools and inspect the communication.
- Code Quality:
This project enforces code quality and style usingESLintandPrettier. All code is checked in CI (GitHub Actions) and must pass linting and formatting before merging.
- Type Safety:
All tool handlers use explicit type guards for runtime argument validation and robust TypeScript types.
- CI/CD:
Every push and pull request runs the full build, lint, and (future) test suite via GitHub Actions.
- How to Contribute:
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Runnpm run lintandnpm run formatbefore pushing
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
{ count?: number; // Number of stories (1-100, default: 30) include_text?: boolean; // Include story text content (default: false) }
{ story_id: number; // Required: HN story ID include_comments?: boolean; // Include comments (default: false) include_markdown?: boolean; // Extract article as markdown (default: false) }
{ story_id: number; // Required: HN story ID min_score?: number; // Minimum comment score (default: 1) max_depth?: number; // Max thread depth (1-10, default: 3) limit?: number; // Max comments (1-100, default: 20) }
{ query: string; // Required: Search keywords limit?: number; // Max results (1-50, default: 20) time_range_hours?: number; // Hours to search back (1-168, default: 24) }
- TypeScriptfor type safety and developer experience
- @modelcontextprotocol/sdkfor MCP protocol implementation
- axiosfor HTTP requests to Hacker News API
- jsdomandturndownfor HTML to Markdown conversion
- private-ipfor security (blocks private IP access)
- src/index.ts- Main server implementation with tool handlers
- src/fetcher.ts- Utility class for fetching and converting web content
- build/- Compiled JavaScript output (auto-generated)
- Blocks requests to private IP addresses to prevent local network access
- Rate limiting through Hacker News API natural limits
- Input validation for all tool parameters
- Error handling and graceful degradation
This project is licensed under the MIT License - see theLICENSEfile for details.
- Hacker Newsfor providing the excellent API
- Model Context Protocolfor the standard
- The open source community for the amazing tools and libraries
If you encounter any issues or have questions:
- Check theIssuespage
- Use the MCP Inspector for debugging:npm run inspector
- Create a new issue with detailed information about your problem
Objective-driven deep research paid per request via MPP - free daily quick search (news/arXiv), quote-first paid cloud-browser research with cross-source reports. MCP Streamable HTTP, no API key.
About Free multi-engine MCP search server — 8 free engines (DDG, Sogou, Bing, Baidu, Wikipedia, Startpage, Yandex, Mojeek), waterfall progressive search, multi-source verification, content enrichment, news search, language auto-detection, rate limit exposure. Zero API keys needed. Self-hostable.
Official MCP server for the Perigon API, providing access to real-time news and media data.
Read-only MCP server for neutral, bias-scored news — search articles, get verification-gated event writeups, and compare left/center/right media-bias framing.
Real-time ranked tech feed from Hacker News, arXiv, Dev.to, and more. Query live stories by category, search by keyword, and surface what the tech community is reading right now.
Connect Claude, ChatGPT, and other AI tools to your Granola meeting notes via MCP. Query your notes, search transcripts, and get meeting insights in your favorite AI assistants.
Connect your Plaud recordings to any MCP-compatible AI client. Search recordings, read transcripts, and generate documents without leaving your AI assistant.
Agent-native forum for the x402/A2A ecosystem. The hosted MCP server exposes the whole forum as tools — threads, comments, votes, USDC bounties (Coinbase x402 on Base), provider reviews, and search. Endpoint: https://api.achivx.com/mcp/ (HTTP, OAuth 2.1).
Access Hacker News stories, comments, and user profiles using the Hacker News API.
Integrate real-time Hacker News data and discussions into your applications and workflows.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




