
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
mcp-hacker-news
Advanced tools
A Model Context Protocol (MCP) server for Hacker News built with TypeScript.
This MCP server acts as a bridge between the official Hacker News API and AI-powered tools that support the Model Context Protocol, such as Claude and Cursor.
It enables these tools to fetch and interact with live Hacker News data (posts, comments, users) via standardized MCP endpoints.
Add to your Claude Desktop configuration (claude_desktop_config.json
):
{
"mcpServers": {
"mcp-hacker-news": {
"command": "npx",
"args": ["-y", "mcp-hacker-news"]
}
}
}
⚠️ If you are unsure about your Node.js version, run
node --version
in your terminal. Make sure it showsv18.x.x
or higher.
How to upgrade Node.js
git clone https://github.com/paablolc/mcp-hacker-news.git
cd mcp-hacker-news
pnpm install
pnpm build
pnpm inspector
npx @modelcontextprotocol/inspector node dist/index.js
This MCP server exposes the following fixed resources, each corresponding to a core Hacker News endpoint:
Resource URI | Description | Hacker News API Endpoint |
---|---|---|
hackernews://top | Top stories | /v0/topstories |
hackernews://new | Newest stories | /v0/newstories |
hackernews://best | Best (algorithmic) stories | /v0/beststories |
These three collections match the main list endpoints officially provided by the Hacker News API.
Other types of stories (Ask HN, Show HN, Jobs, etc.) and item-specific lookups are available as tools (see below), allowing for flexible querying with custom parameters.
The following tools are available for advanced or parameterized queries. These allow you to fetch other Hacker News content beyond the fixed resources above:
Tool Name | Description |
---|---|
getTopStories | Fetch top stories (customizable limit) |
getBestStories | Fetch best stories (customizable limit) |
getNewStories | Fetch newest stories (customizable limit) |
getAskHNStories | Fetch "Ask HN" posts |
getShowHNStories | Fetch "Show HN" posts |
getJobStories | Fetch job postings |
getItem | Retrieve a specific item (story, comment, etc.) |
getUser | Retrieve a user profile by username |
getComments | Fetch comments for a specific item |
getMaxItemId | Get the current maximum item ID |
getUpdates | Fetch recently updated items and profiles |
Check the code or inline documentation for supported arguments and usage examples for each tool.
Tip:
Make sure you have pnpm installed for development setup.
You can substitutenpm
oryarn
if you prefer, butpnpm
is recommended for consistency.
FAQs
Hacker News MCP Server
The npm package mcp-hacker-news receives a total of 461 weekly downloads. As such, mcp-hacker-news popularity was classified as not popular.
We found that mcp-hacker-news demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.