mcp-hn
by: erithwik
MCP Server for Hackernews
📌Overview
Purpose: To provide a comprehensive Model Context Protocol (MCP) server for efficiently fetching and interacting with information from Hacker News.
Overview: The Hacker News MCP Server offers a set of tools that facilitate the retrieval and exploration of stories and user activities from Hacker News. It simplifies the process of accessing various types of articles and associated comments, enhancing user engagement with the platform.
Key Features:
-
get_stories: Fetches various categories of Hacker News stories (top, new, ask_hn, show_hn), allowing users to access fresh content quickly.
-
get_story_info: Retrieves comments related to a specific story, enabling users to delve deeper into discussions surrounding articles.
-
search_stories: Allows users to search for stories based on specific queries, enhancing the ability to find relevant information.
-
get_user_info: Provides insights into user activities, helping to track contributions and interactions of specific users on the platform.
Hacker News MCP Server
A Model Context Protocol (MCP) server that provides tools for fetching information from Hacker News.
Tools
get_stories
: Fetch top, new, ask_hn, and show_hn storiesget_story_info
: Fetch comments associated with a storysearch_stories
: Search for stories by queryget_user_info
: Fetch user info
Example Usage
Use prompts like the following:
User: Get the top stories of today
Output: Uses `get_stories` tool and returns a story about AI
User: What does the details of the story today that talks about the future of AI
Output: Uses `get_story_info` tool based on the results of the previous tool
User: What has the user `pg` been up to?
Output: Uses `get_user_info` tool and returns a summary of the user's activity
User: What does hackernews say about careers in AI?
Output: Uses `search_stories` tool and returns a summary of the comments
A more detailed example with the puppeteer MCP server:
User: What are the top stories of today?
Output: Uses `get_stories` tool and returns a story about AI
User: Can you use the puppeteer tool to read the article about <AI> and also use the hackernews tool to view the comments and give me a summary of what the main comments are about the article?
Output: Uses puppeteer tool to read the article about AI and then uses the `get_story_info` hn tool to get the comments and returns a summary of the comments
Quickstart
Claude Desktop:
Update the following configuration file:
- On MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add the following for production:
{
"mcpServers": {
"mcp-hn": {
"command": "uvx",
"args": ["mcp-hn"]
}
}
}