hn
MCP Server for HackerNews using Algolia HackerNews API
claude mcp add --transport stdio wei-hn-mcp-server npx -y hn-mcp-server
How to use
This MCP server provides a Model Context Protocol interface to HackerNews data powered by the HackerNews API (via Algolia). It exposes tools that let your AI assistants search posts, fetch the front page, retrieve the latest posts, load full item details with nested comments, and inspect user profiles. You can integrate it with any MCP-compatible client (such as VS Code MCP, Cursor, or other MCP-enabled assistants) to ask natural language questions like “Show me the current top stories” or “Read the discussion for item 38456789.” The server translates your prompts into specific tool calls (search-posts, get-front-page, get-latest-posts, get-item, get-user) and returns structured results that your AI can present to the user.
How to install
Prerequisites:
- Node.js version 18 or higher
- Internet access to fetch the MCP server package via npx or npm
Install and run the MCP server using one of the following approaches.
Option A: Run via npx (recommended for quick start)
# Ensure Node.js is installed (Node 18+)
node -v
# Start the MCP server via npx (no global install required)
npx -y hn-mcp-server
Option B: Use as a local development server (if you publish/packaged differently in your workflow)
# If you have the package available locally
npm install hn-mcp-server
node node_modules/hn-mcp-server/dist/index.js
Option C: Integrate into an MCP client configuration (example is provided in this README’s “Other Clients” section)
{
"hn-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "hn-mcp-server"]
}
}
Notes:
- The server is designed to be used with MCP clients that support stdio-based communication.
- If you encounter network or API rate limits from HackerNews, consider adjusting query parameters or caching results on the client side.
Additional notes
Tips:
- Node.js v18+ is required; ensure your environment matches the minimum version.
- The server relies on HackerNews (Algolia) APIs; for production, monitor API usage and implement sensible rate limiting in your client prompts.
- When configuring MCP clients, you can reuse the same command/args shown in the README (npx -y hn-mcp-server) to initialize the stdio MCP server.
- If you need to customize prompts or tool behavior, you can direct prompts to the specific tools (search-posts, get-front-page, get-latest-posts, get-item, get-user).
- Common issues include network connectivity, Node.js version mismatches, and MCP client integration mismatches. Verify the client supports stdio MCP servers and that the server process starts without errors.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud