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). - Fetch different types of stories (top, new, ask, show, jobs) - Get structured data including titles, URLs, points, authors, timestamps, and comment co
Add this skill
npx mdskills install pskill9/hn-serverWell-documented MCP server with clear tool descriptions and setup, but over-scoped permissions
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).
git clone https://github.com/pskill9/hn-server
cd hn-server
npm install
npm run build
For VSCode Claude extension:
{
"mcpServers": {
"hacker-news": {
"command": "node",
"args": ["/path/to/hn-server/build/index.js"]
}
}
}
The server provides a tool called get_stories that can be used to fetch stories from Hacker News.
Parameters:
type (string): Type of stories to fetch
limit (number): Number of stories to return
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
]
To use this MCP server with Claude, you'll need to:
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"]
}
}
}
Once configured, you can interact with Claude using natural language to fetch Hacker News stories. Examples:
Claude will automatically use the appropriate parameters to fetch the stories you want.

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 listThe server is built using:
To modify the server:
src/index.tsnpm run build
The server includes robust error handling for:
Errors are returned with appropriate error codes and descriptive messages.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this in your own projects.
Install via CLI
npx mdskills install pskill9/hn-serverHacker News MCP Server is a free, open-source AI agent skill. 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). - Fetch different types of stories (top, new, ask, show, jobs) - Get structured data including titles, URLs, points, authors, timestamps, and comment co
Install Hacker News MCP Server with a single command:
npx mdskills install pskill9/hn-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
Hacker News MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Codex, Gemini Cli, Amp, Roo Code, Goose, Opencode, Trae, Qodo, Command Code. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.