drio
Open app

Hacker News MCP Server

Source

Hacker news MCP server

Catalog onlyCatalog onlySTDIO

Overview

The Hacker News MCP Server is a Model Context Protocol (MCP) server designed to fetch and parse stories from Hacker News, offering structured data about various types of stories available on the site.

To use the server, clone the repository from GitHub, install the required dependencies, build the server, and configure it in your MCP settings. Once set up, you can use the tool get_stories to fetch stories based on your specifications.

  • Fetches different types of stories: top, new, ask, show, and jobs. - Provides structured data including title, URL, points, author, timestamp, and comment counts. - Configurable limit on the number of stories returned. - Robust error handling and validation mechanisms.
  1. Automating the retrieval of top news stories for integration with applications.
  2. Developers can build tools or dashboards that display Hacker News content dynamically.
  3. Fetching specific types of stories, such as job postings, for job-related applications.

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": {
    "hn-server-pskill9": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-hn-server-pskill9"
      ]
    }
  }
}

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": {
    "hn-server-pskill9": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-hn-server-pskill9"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

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

VS Code (Copilot)

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

.vscode/mcp.json

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

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

What types of stories can I fetch?

You can fetch stories categorized as top, new, ask, show, and jobs.

How do I install the server?

Clone the repository, run npm install, and build it with npm run build.

Is there an example of how to use the `get_stories` tool?

Yes, you can use `get_stories` by providing the story type and limit in your natural language query with Claude.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":524,"uuid":"baa57f2f-992e-4bbf-a120-ad0e1262d340","name":"hn-server","title":"Hacker News MCP Server","description":"Hacker news MCP server","avatar_url":"https://avatars.githubusercontent.com/u/188422281?v=4","created_at":"2024-12-30T02:53:27.974Z","updated_at":"2025-01-05T02:54:57.000Z","status":"created","author_name":"pskill9","author_avatar_url":"https://avatars.githubusercontent.com/u/188422281?v=4","tags":"hacker-news,mcp-server,news-fetcher","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/pskill9/hn-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/pskill9/hn-server/raw/main/Claude.png","type":null,"metadata":null,"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"}]]}]