Skip to main content
Glama
Malayke

Hacker News Reader MCP Server

by Malayke

Hacker News Reader MCP Server

Python 3.11+ License: MIT

A Model Context Protocol (MCP) server that fetches Hacker News discussions and article content. Optimized for LLM consumption with compact, token-efficient formatting.

Features

✅ Fetch complete Hacker News discussion threads
✅ Scrape linked article content in markdown format
✅ LLM-optimized output (compact nested replies)
✅ Accepts both HN URLs and item IDs
✅ Handles edge cases (text posts, Ask HN, deleted comments)
✅ Powered by Firecrawl for robust article extraction

Related MCP server: HackerNews MCP Server

Installation

uvx --from git+https://github.com/Malayke/hackernews-mcp.git hackernews-mcp

Using uv pip

uv pip install git+https://github.com/Malayke/hackernews-mcp.git

Using pip

pip install git+https://github.com/Malayke/hackernews-mcp.git

Usage

As an MCP Server

Add to your MCP settings configuration (e.g., in Claude Desktop or other MCP clients):

{
  "mcpServers": {
    "hackernews-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Malayke/hackernews-mcp.git",
        "hackernews-mcp"
      ],
      "env": {
        "FIRECRAWL_API_KEY": "your_api_key_here"
      }
    }
  }
}

Or if you've installed it with pip/uv pip:

{
  "mcpServers": {
    "hackernews-mcp": {
      "command": "hackernews-mcp",
      "env": {
        "FIRECRAWL_API_KEY": "your_api_key_here"
      }
    }
  }
}

Environment Variables

Required:

Create a .env file:

FIRECRAWL_API_KEY=your_api_key_here

Available Tools

get_hn_content

Fetches Hacker News comments and the linked article content.

Input:

  • hn_url: HN URL or item ID

    • Full URL: https://news.ycombinator.com/item?id=46130187

    • Just ID: 46130187

Output: Combined markdown with:

  1. Article Content - Scraped article in markdown format

  2. HN Discussion - Formatted comment threads with metadata

Example:

{
  "hn_url": "https://news.ycombinator.com/item?id=46130187"
}

Output Format

The tool returns LLM-optimized content:

# ARTICLE CONTENT

[Article markdown content here...]

---

# HACKER NEWS DISCUSSION

STORY: Article Title
URL: https://example.com/article
AUTHOR: username | POINTS: 123 | TIME: 2 hours ago
TOTAL_COMMENTS: 45

COMMENT #1
COMMENT [author @ time] ID: 123456
Comment text here...
  REPLY [author2 @ time] ID: 123457
  Reply text here...
    REPLY [author3 @ time] ID: 123458
    Nested reply text...

COMMENT #2
...

Development

Local Setup

# Clone the repository
git clone https://github.com/Malayke/hackernews-mcp.git
cd hackernews-mcp

# Install dependencies with uv
uv sync

# Set up environment
echo "FIRECRAWL_API_KEY=your_api_key_here" > .env

# Run the server
uv run server.py

Testing

# Test the MCP server
uv run python test_mcp_server.py

Using in Development Mode

For local development with live changes:

{
  "mcpServers": {
    "hackernews-mcp": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/hackernews-mcp",
        "python",
        "server.py"
      ],
      "env": {
        "FIRECRAWL_API_KEY": "your_api_key_here"
      }
    }
  }
}

Requirements

  • Python 3.11+

  • Firecrawl API key (for article scraping)

Dependencies

  • mcp - Model Context Protocol SDK

  • requests - HTTP requests

  • beautifulsoup4 - HTML parsing

  • firecrawl-py - Article content extraction

  • python-dotenv - Environment variable management

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues, questions, or contributions, please visit the GitHub repository.

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Fetches and processes Hacker News discussions to prepare them for Claude to generate high-quality summaries, handling comment structure and metadata to help Claude understand the relative importance of different comments.
    Last updated
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to search, retrieve, and interact with HackerNews content including stories, comments, polls, and user information. Provides comprehensive access to all HackerNews API endpoints with 15 specialized tools for content discovery and analysis.
    Last updated
    15
    79
    5
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables AI assistants to access Hacker News content through 9 comprehensive tools for fetching stories, comments, user profiles, and job postings. Supports flexible output formats, pagination, and various story categories (top, new, best, Ask HN, Show HN).
    Last updated
  • A
    license
    A
    quality
    D
    maintenance
    Enables browsing Hacker News, searching discussions, analyzing users, and tracking tech trends with zero setup required—no API keys or authentication needed.
    Last updated
    5
    20
    6
    MIT

View all related MCP servers

Related MCP Connectors

  • Converts any URL to clean, LLM-ready Markdown using real Chrome browsers

  • Fetch any URL and get clean Markdown. Web scraping for AI agents.

  • Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Malayke/hackernews-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server