hn-server
30
The Hacker News MCP Server allows users to fetch and structurally present various types of Hacker News stories, such as top or new stories. It provides robust error handling and configurability, supporting integration with tools like Claude.
Hacker News MCP Server
A Model Context Protocol (MCP) server providing tools for fetching stories from Hacker News. It parses HTML content from news.ycombinator.com and offers structured data for story types like top, new, ask, show, and jobs.
Features
- Fetch various story types including top, new, ask, show, jobs.
- Receive structured data with titles, URLs, points, authors, timestamps, and comment counts.
- Configurable story limit.
- Error handling and validation.
Usage
The server includes a tool called get_stories
with parameters for type and limit, to fetch specific stories from Hacker News.
Development
Built with TypeScript, Model Context Protocol SDK, Axios for HTTP requests, and Cheerio for HTML parsing. Contributions are welcome.
License
MIT License.