An MCP (Model Context Protocol) server that provides tools to interact with the Hacker News API. This server allows you to search, retrieve, and query various Hacker News data including stories, comments, users, and more.
This MCP server exposes the following tools:
- search_posts: Search posts using Algolia's Hacker News search API with support for tags, numeric filters, and pagination
- search_by_date: Search posts by date with similar filtering capabilities
- get_top_stories: Retrieve the top stories from Hacker News
- get_new_stories: Get the newest stories
- get_best_stories: Fetch the highest-rated stories
- get_ask_stories: Retrieve Ask HN stories
- get_show_stories: Get Show HN stories
- get_job_stories: Fetch job postings
- get_item: Retrieve details of a specific item (story, comment, etc.) by ID
- get_user: Get user profile information by username
- get_max_item_id: Get the current maximum item ID
- get_updates: Retrieve recent updates from Hacker News
- Clone this repository
- Install dependencies:
npm install - Build the server:
npm run build - Start the server:
npm start
This server communicates via stdio and is designed to be used with MCP-compatible clients. It uses the official Hacker News APIs:
- Algolia Search API for search functionality
- Firebase API for item and user data
All responses are returned as JSON for easy parsing and integration.