Get the FREE Ultimate OpenClaw Setup Guide →

hn -vibe

(Vibe Coded) MCP Server for HackerNews using Algolia HackerNews API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio wei-hn-mcp-server-vibe node build/index.js

How to use

The HackerNews MCP Server exposes a set of tools that let MCP clients search, retrieve, and interact with HackerNews data through a standardized interface. It covers search and discovery (e.g., search-posts, search-posts-by-date, search-by-url, search-by-time-range), content retrieval (e.g., get-front-page, get-latest-stories, get-latest-comments, get-show-hn, get-ask-hn, get-polls, get-top-stories), and item/user access (e.g., get-item, get-user, get-posts-by-author, get-story-comments). Each tool returns structured data including hits, total counts, and paging information, enabling clients to compose rich queries against HackerNews without directly hitting the public API. This server is designed to be used by AI assistants and other MCP clients to understand, fetch, and reason about HackerNews content efficiently. To use the tools, clients send JSON payloads with the tool name and an arguments object, for example to fetch top stories or search for posts by a keyword. The server responds with a standardized content field and a structuredContent field for programmatic access.

How to install

Prerequisites:

  • Node.js 18 or higher
  • npm (or yarn)

Setup steps:

  1. Clone the repository:
git clone <repository-url>
cd hn-mcp-server-vibe
  1. Install dependencies:
npm install
  1. Build the server:
npm run build
  1. Run the server:
npm start

Optional for development: run the server in development mode (if configured):

npm run dev

Additional notes

Tips and common issues:

  • Ensure you have Node.js v18+ installed; the server relies on modern Node features.
  • The MCP config expects the compiled entry at build/index.js; make sure you run the build step before starting in production.
  • Client configuration examples in Claude Desktop assume an absolute path to the built entry; adjust paths as needed for your environment.
  • Rate limits depend on the HackerNews API (hn.algolia.com); while the MCP server itself does not impose additional limits, clients should throttle requests to avoid hitting the upstream API limits.
  • If you modify code, run npm run build to regenerate build/index.js before starting the server.
  • If you run into issues connecting, verify that the build directory exists and contains the compiled JavaScript files, and confirm the Node.js version matches the prerequisites.

Related MCP Servers

Sponsor this space

Reach thousands of developers