Hacker News MCP
The Hacker News MCP Server fetches structured data from Hacker News.
Retrieves different story categories: top, new, ask, show, or jobs
Returns up to 30 stories per request with configurable limit
Provides structured information for each story including:
Title, URL, points, author, timestamp
Comment count and rank position
Integrates with Claude AI via MCP protocol
Handles various error states
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hacker News MCPshow me the top 5 hacker news stories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hacker News MCP Server
A Model Context Protocol (MCP) server that provides tools for fetching stories from Hacker News. This server parses the HTML content from news.ycombinator.com and provides structured data for different types of stories (top, new, ask, show, jobs).
Features
Fetch different types of stories (top, new, ask, show, jobs)
Get structured data including titles, URLs, points, authors, timestamps, and comment counts
Configurable limit on number of stories returned
Clean error handling and validation
Related MCP server: Hacker News MCP Server
Installation
Clone the repository:
git clone https://github.com/pskill9/hn-server
cd hn-serverInstall dependencies:
npm installBuild the server:
npm run buildAdd to your MCP settings configuration file (location depends on your system):
For VSCode Claude extension:
{
"mcpServers": {
"hacker-news": {
"command": "node",
"args": ["/path/to/hn-server/build/index.js"]
}
}
}Usage
The server provides a tool called get_stories that can be used to fetch stories from Hacker News.
Tool: get_stories
Parameters:
type(string): Type of stories to fetchOptions: 'top', 'new', 'ask', 'show', 'jobs'
Default: 'top'
limit(number): Number of stories to returnRange: 1-30
Default: 10
Example usage:
use_mcp_tool with:
server_name: "hacker-news"
tool_name: "get_stories"
arguments: {
"type": "top",
"limit": 5
}Sample output:
[
{
"title": "Example Story Title",
"url": "https://example.com/story",
"points": 100,
"author": "username",
"time": "2024-12-28T00:03:05",
"commentCount": 50,
"rank": 1
},
// ... more stories
]Integrating with Claude
To use this MCP server with Claude, you'll need to:
Have the Claude desktop app or VSCode Claude extension installed
Configure the MCP server in your settings
Use Claude's natural language interface to interact with Hacker News
Configuration
For the Claude desktop app, add the server configuration to:
// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"hacker-news": {
"command": "node",
"args": ["/path/to/hn-server/build/index.js"]
}
}
}For the VSCode Claude extension, add to:
// VSCode Settings JSON
{
"mcpServers": {
"hacker-news": {
"command": "node",
"args": ["/path/to/hn-server/build/index.js"]
}
}
}Example Interactions
Once configured, you can interact with Claude using natural language to fetch Hacker News stories. Examples:
"Show me the top 5 stories from Hacker News"
"What are the latest Ask HN posts?"
"Get me the top Show HN submissions from today"
Claude will automatically use the appropriate parameters to fetch the stories you want.

Story Object Structure
Each story object contains:
title(string): The story titleurl(string, optional): URL of the story (may be internal HN URL for text posts)points(number): Number of upvotesauthor(string): Username of the postertime(string): Timestamp of when the story was postedcommentCount(number): Number of commentsrank(number): Position in the list
Development
The server is built using:
TypeScript
Model Context Protocol SDK
Axios for HTTP requests
Cheerio for HTML parsing
To modify the server:
Make changes to
src/index.tsRebuild:
npm run buildError Handling
The server includes robust error handling for:
Invalid story types
Network failures
HTML parsing errors
Invalid parameter values
Errors are returned with appropriate error codes and descriptive messages.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - feel free to use this in your own projects.
Available Tools
1 toolget_storiesC
Get stories from Hacker News
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of stories to return (max 30) | |
| type | No | Type of stories to fetch (top, new, ask, show, jobs) | top |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get stories' implies a read operation, but the description doesn't mention rate limits, authentication requirements, pagination behavior, or what format the stories are returned in. For a tool with no annotation coverage, this leaves the agent with insufficient information about how the tool behaves in practice.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - just four words that directly state the tool's purpose. Every word earns its place, and there's no wasted language. The structure is front-loaded with the essential information, making it immediately clear what the tool does.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there's no output schema and no annotations, the description should provide more context about what the tool returns and how it behaves. 'Get stories from Hacker News' doesn't indicate whether this fetches current stories, historical data, or what fields are included in the response. For a tool with rich parameter options but no output documentation, the description is insufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with both parameters ('limit' and 'type') fully documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured schema. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('stories from Hacker News'), making the purpose immediately understandable. It lacks sibling differentiation, but since there are no sibling tools on this server, that's not a deficiency. The description is specific enough to distinguish this from other potential tools like 'get_comments' or 'search_stories'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or contextual factors that would help an agent decide when this is the appropriate tool. With no sibling tools, the absence of differentiation isn't problematic, but the complete lack of usage context is a significant gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- First observed
get_stories
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'get_stories' has a clearly distinct and singular purpose.
The naming is trivially consistent as there is only one tool. The tool name 'get_stories' follows a clear verb_noun pattern, which would be consistent if more tools were added.
A single tool is too few for a server named 'Hacker News MCP', which implies broader functionality. While 'get_stories' is a core operation, the server lacks tools for other common actions like getting comments, user profiles, or posting, making it feel thin and incomplete.
The tool surface is severely incomplete for a Hacker News API. It only provides 'get_stories', missing essential operations such as retrieving comments, user details, search functionality, or any write operations, which are typical for such a domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Browse Hacker News feeds, threads, and user profiles with full-text search.
Live Hacker News front page: top tech stories, points, comments, links. $0.01/query.
Hacker News MCP — search and retrieve stories from Hacker News
HN front-page, Algolia full-text search, and Show HN launch tracker.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables access to Hacker News data including top stories, new stories, specific story details, and search functionality. Integrates with Poke to provide Hacker News content through natural language interactions.1-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access Hacker News content through 9 comprehensive tools for fetching stories, comments, user profiles, and job postings. Supports flexible output formats, pagination, and various story categories (top, new, best, Ask HN, Show HN).-
- AlicenseAqualityDmaintenanceProvides programmatic access to Hacker News content via the HN Algolia API. It enables AI assistants to search stories, retrieve comments, access user profiles, and explore the front page in real-time.963MIT
- AlicenseAqualityCmaintenanceProvides AI agents with access to Hacker News data including top stories, story details, comment threads, and full-text search for content research and trend monitoring.5MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pskill9/hn-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server