drio
Open app

Hacker News MCP Server

Source

MCP Server for Hackernews

Catalog onlyCatalog onlySTDIO

Overview

The Hacker News MCP Server is a Model Context Protocol (MCP) server designed to fetch and interact with data from Hacker News, allowing users to access and manipulate stories and user information seamlessly.

To use the Hacker News MCP Server, integrate it with your application by updating the configuration as specified in the quickstart guide, and then utilize the provided commands to fetch stories, user details, and perform searches.

  • Fetch the latest top, new, and categorized Hacker News stories - Retrieve detailed information and comments about specific stories - Search stories based on user queries - Access user activity summaries from Hacker News
  1. Retrieving the top stories from Hacker News to display in an application.
  2. Summarizing user activity to analyze trends on Hacker News.
  3. Searching for specific discussions about topics of interest within Hacker News articles.

Add to your AI client

Use these steps to connect Hacker News MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-hn-erithwik": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-hn-erithwik"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-hn-erithwik": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-hn-erithwik"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-hn-erithwik": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-hn-erithwik"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-hn-erithwik": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-hn-erithwik"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-hn-erithwik": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-hn-erithwik"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-hn-erithwik": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-hn-erithwik"
      ]
    }
  }
}

FAQ

What type of stories can I fetch using this server?

You can fetch top stories, new stories, ask_hn stories, and show_hn stories.

Can I fetch user activity with this server?

Yes! You can use the `get_user_info` tool to get insights into a user's activity on Hacker News.

How do I integrate the MCP server into my application?

Update the configuration file as outlined in the quickstart section and invoke the server with the available commands.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":497,"uuid":"0f2c2461-2f2f-493a-ad65-6db4b96e942a","name":"mcp-hn","title":"Hacker News MCP Server","description":"MCP Server for Hackernews","avatar_url":"https://avatars.githubusercontent.com/u/44277401?v=4","created_at":"2024-12-30T02:51:44.052Z","updated_at":"2025-01-05T02:55:13.416Z","status":"created","author_name":"erithwik","author_avatar_url":"https://avatars.githubusercontent.com/u/44277401?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/erithwik/mcp-hn","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"36\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-01-01 21:43:41\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]