Skip to main content

AI-native HackerNews MCP Server - Filter HN through your lens

Project description

readhn

AI-native HackerNews MCP Server. Filter HN through your lens with trust-based expert ranking and explainable quality signals.

Why

HN is where engineers share lessons that cost them months to learn — in a single comment. tptacek has 4,600+ comments on security. patio11 has written more about SaaS pricing on HN than most books cover. The best engineering knowledge isn't in the stories that get upvoted to the front page. It's buried in comment threads, written by people who've actually built the thing.

The problem is finding it. HN's ranking shows you what's popular, not what's relevant to you. And more importantly — it doesn't tell you who to listen to. On any thread about databases, there might be 200 comments. Three of them are from people who've run Postgres at scale. The rest are opinions. Knowing which three — that's the difference between learning something real and wasting twenty minutes.

hnmcp does three things:

  1. Discover — Find content that matters to you, not what's trending. Your keywords, your score thresholds, your time window.

  2. Trust — Know who's talking. hnmcp tracks domain experts, detects practitioner signals ("I built this", "we ran this in production", code blocks, specific metrics), and tells you why a comment is worth reading. When you follow experts, their network becomes visible too — people they engage with are probably worth listening to.

  3. Understand — Every result comes with its reasoning. Not just a score, but the signals behind it: practitioner depth, score velocity, reference density, thread depth, expert involvement. You see why the filter chose what it chose. If it's wrong, you adjust.

Why AI-native? Because this isn't a feed to scroll. It's a knowledge base to query. You ask your AI agent "what did practitioners say about Kubernetes networking this week?" and get a structured answer with sources and trust signals — not a list of links.

Quick Start

# Install from PyPI
pip install readhn

# Optional: with semantic search
pip install readhn[embeddings]

That's it! Your AI agents (Claude Code, OpenCode, Codex) will auto-discover readhn from the MCP Registry.

Configuration (Optional)

Set environment variables to customize:

export HN_KEYWORDS="ai,python,startups"
export HN_MIN_SCORE="50"
export HN_EXPERTS="patio11,tptacek,simonw"
export HN_TIME_HOURS="24"

Or configure manually in your agent's MCP config:

{
  "mcpServers": {
    "readhn": {
      "command": "python",
      "args": ["-m", "hnmcp"],
      "env": {
        "HN_KEYWORDS": "ai,python",
        "HN_EXPERTS": "patio11,tptacek"
      }
    }
  }
}

Tools

Discover

  • discover_stories() - Personalized feed with quality ranking
  • search() - Algolia search with signals

Trust

  • find_experts() - Discover domain experts
  • expert_brief() - Expert profile + activity + trust score

Understand

  • story_brief() - Story + top comments + signals in one call
  • thread_analysis() - Hierarchical comment tree with quality signals

Resources

  • hn://config - Current settings
  • hn://trust - Trust scores for seed experts

Quality Signals

Every result explains WHY it was chosen:

  • Practitioner Depth (30%): "I built", "in production", code blocks, specific metrics
  • Score Velocity (15%): Points per hour - sustained interest indicator
  • Reference Density (15%): External links and citations
  • Thread Depth (20%): Comment tree depth (3+ levels = serious discussion)
  • Expert Involvement (20%): Participation by followed users

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

readhn-0.2.0.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

readhn-0.2.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file readhn-0.2.0.tar.gz.

File metadata

  • Download URL: readhn-0.2.0.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for readhn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aaa6f116d61748b804f3b7ea09d109827bf37ee5df41ffb6f67503beebd10746
MD5 facee99ae858f6407e6cf52ad5034846
BLAKE2b-256 e53c5d28b24cc0e72ff5772520f067d8aa2fda73cf6ee20050793e454faa3e27

See more details on using hashes here.

File details

Details for the file readhn-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: readhn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for readhn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e89670186d8dc0a891f4c823812f814b37cea6b4ba11d233dd7141d86977cde1
MD5 62643a65ffbebdd57820f98039e0202d
BLAKE2b-256 0afd83bf3f9c3cf6d57442d4033d9319fffb7cffb1fd6a66a5d5ced1181fd15f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page