home / mcp / hacker news mcp server

Hacker News MCP Server

Provides access to Hacker News data for Poke integration via top, new, detail, and search endpoints.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "akarnik23-mcp-hackernews": {
      "url": "https://hackernews-mcp.onrender.com/mcp"
    }
  }
}

The Hacker News MCP Server provides a FastMCP endpoint to access Hacker News data for Poke integration. It exposes endpoints to fetch top and new stories, fetch details of a story by ID, and search stories using the Algolia API, allowing your MCP clients to easily harness up-to-date Hacker News content.

How to use

You connect your MCP client to the Hacker News MCP Server to retrieve top stories, individual story details, newest stories, and search results. Use the HTTP URL when you want to rely on a remote MCP service, or run the local CLI to operate directly from your machine. The available actions map to distinct functions you can call from your MCP client.

How to install

Prerequisites: ensure Python is installed on your system and you have network access to install Python packages.

Step-by-step commands:

Install dependencies from the requirements file.

Run the server with Python.

Deployment and hosting

You can host the Hacker News MCP Server on a hosting service that supports Python web services. The typical deployment flow includes installing dependencies, building the environment, and starting the server.

Example deployment steps (adjust per your hosting provider):

# Install dependencies
pip install -r requirements.txt

# Start the server
python src/server.py

Notes

On first run, the server exposes endpoints for getting top stories, getting a specific story by ID, getting new stories, and searching stories via Algolia. The public Hacker News API backs the data sources used by these endpoints. No extra environment variables are required to run the server in its default configuration.

If you plan to host remotely, you can deploy to a platform that supports Python 3 and provide the public URL to your MCP client as the MCP endpoint.

Available tools

get_top_stories

Fetch top stories with an optional limit (default 10, up to 30). Returns a list of story IDs or basic metadata for the current top stories.

get_story

Retrieve detailed information for a specific story by its ID, including title, URL, score, and author.

get_new_stories

Fetch the newest stories with an optional limit (default 10, up to 30). Returns a list of recent story metadata.

search_stories

Search stories using Algolia-based search with a query string and limit (default 10, up to 20).