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.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-hacker-news": {
"args": [
"-y",
"mcp-hacker-news"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server for Hacker News built with TypeScript.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'pnpm' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
pnpm has Path Traversal via arbitrary file permission modification
### Summary When pnpm processes a package's `directories.bin` field, it uses `path.join()` without validating the result stays within the package root. A malicious npm package can specify `"directories": {"bin": "../../../../tmp"}` to escape the package directory, causing pnpm to chmod 755 files at arbitrary locations. **Note:** Only affects Unix/Linux/macOS. Windows is not affected (`fixBin` gated by `EXECUTABLE_SHEBANG_SUPPORTED`). ### Details Vulnerable code in `pkg-manager/package-bins/src
pnpm: Binary ZIP extraction allows arbitrary file write via path traversal (Zip Slip)
### Summary A path traversal vulnerability in pnpm's binary fetcher allows malicious packages to write files outside the intended extraction directory. The vulnerability has two attack vectors: (1) Malicious ZIP entries containing `../` or absolute paths that escape the extraction root via AdmZip's `extractAllTo`, and (2) The `BinaryResolution.prefix` field is concatenated into the extraction path without validation, allowing a crafted prefix like `../../evil` to redirect extracted files outsid
pnpm has Windows-specific tarball Path Traversal
### Summary A path traversal vulnerability in pnpm's tarball extraction allows malicious packages to write files outside the package directory on Windows. The path normalization only checks for `./` but not `.\`. On Windows, backslashes are directory separators, enabling path traversal. **This vulnerability is Windows-only.** ### Details **1. Incomplete Path Normalization (`store/cafs/src/parseTarball.ts:107-110`)** ```typescript if (fileName.includes('./')) { fileName = path.posix.join('/'
pnpm scoped bin name Path Traversal allows arbitrary file creation outside node_modules/.bin
### Summary A path traversal vulnerability in pnpm's bin linking allows malicious npm packages to create executable shims or symlinks outside of `node_modules/.bin`. Bin names starting with `@` bypass validation, and after scope normalization, path traversal sequences like `../../` remain intact. ### Details The vulnerability exists in the bin name validation and normalization logic: **1. Validation Bypass (`pkg-manager/package-bins/src/index.ts`)** The filter allows any bin name starting wit
pnpm has symlink traversal in file:/git dependencies
### Summary When pnpm installs a `file:` (directory) or `git:` dependency, it follows symlinks and reads their target contents without constraining them to the package root. A malicious package containing a symlink to an absolute path (e.g., `/etc/passwd`, `~/.ssh/id_rsa`) causes pnpm to copy that file's contents into `node_modules`, leaking local data. **Preconditions:** Only affects `file:` and `git:` dependencies. Registry packages (npm) have symlinks stripped during publish and are NOT affe
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in search
Web and local search using Brave Search API
Production ready MCP server with real-time search, extract, map & crawl.
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.
MCP Security Weekly
Get CVE alerts and security updates for Mcp Hacker News and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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 config (claude_desktop_config.json) or your Cursor config file (mcp.json) :
{
"mcpServers": {
"mcp-hacker-news": {
"command": "npx",
"args": ["-y", "mcp-hacker-news"]
}
}
}

⚠️ If you are unsure about your Node.js version, run
node --versionin your terminal. Make sure it showsv18.x.xor 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 pro |