necl-hn-mcp

necl-hn-mcp

Provides AI agents with access to Hacker News data including top stories, story details, comment threads, and full-text search for content research and trend monitoring.

Category
访问服务器

README

necl-hn-mcp

License: MIT MCP Python Built by NeCL

Hacker News tools for AI agents. Top stories, story details, comments thread, full-text search.

Zero credentials. Public HN API. Install and use.

Built by NeCL — AI engineering studio. Production-tested in our own content pipelines (powers baraban_agent, our internal HN→drafts engine running 3× daily for months).

Tools

Tool What it does
hn_top_stories(limit, hours) Top N stories from the last N hours, ranked by score. Default: top 10 from last 24h.
hn_get_story(id) Full story metadata: title, url, score, author, comments count, posted time.
hn_get_comments(id, limit) Top-level comments thread for a story, sorted by HN ranking.
hn_search(query, sort) Full-text search across HN posts and comments (via Algolia HN API).
hn_category(category, limit) Stories from a specific category: top, new, best, ask, show, job.

Why this MCP

  • Zero credentials, zero config — public HN API, no rate limits worth worrying about, no signup.
  • Battle-tested code — extracted from baraban_agent, our internal HN-to-drafts content engine that's been running 3×/day for months.
  • Built for AI agents — every tool returns clean structured data that LLMs can chain together (search → top story → comments → summary).
  • Use case — content research, trend monitoring, automatic news digests, prompt-context enrichment.

Install

Via uvx (recommended — no setup)

uvx runs the package in an ephemeral env. No pip install, no venv. Add to your mcp.json (Claude Desktop, Claude Code, or any MCP client):

{
  "mcpServers": {
    "necl-hn": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/adjacentai/necl-hn-mcp.git",
        "necl-hn-mcp"
      ]
    }
  }
}

Don't have uvx? Install it: pip install uv or brew install uv.

Via pip + python -m

pip install git+https://github.com/adjacentai/necl-hn-mcp.git

Then in mcp.json:

{
  "mcpServers": {
    "necl-hn": {
      "command": "python",
      "args": ["-m", "necl_hn_mcp"]
    }
  }
}

From source (for development)

git clone https://github.com/adjacentai/necl-hn-mcp.git
cd necl-hn-mcp
pip install -e ".[dev]"

Then use the same python -m necl_hn_mcp config as above.

Example use in Claude

Once installed, just ask Claude things like:

  • "What are the top 5 stories on HN in the last 6 hours?"
  • "Get the comments thread for HN story 38420000"
  • "Search HN for posts about RAG performance, sorted by date"
  • "Show me everything in the Ask HN category right now"
  • "Find the top 3 Show HN posts about AI agents this week"

Claude will call the right tool, no further setup.

What you can build with this

  • Daily content brief — pull top HN stories, summarize, generate cross-platform posts.
  • Competitive research bot — search HN for mentions of your competitors, surface negative comments.
  • Trend detector — monitor new and best categories on a cron, alert when a topic spikes.
  • Newsletter pipeline — search by keyword window, cluster results, generate editorial digest.
  • Customer-discovery agent — search Ask HN for problems your product solves, generate cold-outreach drafts.
  • Tech-radar updater — periodically scan show category for new tools in your stack.

Troubleshooting

"mcp command not found" / install errors. Make sure your Python is 3.10+. If using uvx, ensure uv is installed (pip install uv). For pip install: pip install necl-hn-mcp then verify python -m necl_hn_mcp --help doesn't error.

Tool calls timeout. HN's Firebase API can be slow when fetching many items (e.g. hn_top_stories(limit=30, hours=168) scans 200 stories). Default timeout is 10s per request. For long-window queries, use lower limit.

Algolia returns no hits. Algolia indexes HN content with a delay (~5-15 min for fresh items). Try sort="date" for recent activity.

Comments thread is empty for a story I see on HN. hn_get_comments returns only top-level comments. Replies aren't recursively fetched (to keep token cost predictable for LLMs). Use the replies_count field on each comment to know if there's deeper discussion.

Tools don't show up in Claude. After editing mcp.json, fully restart Claude Desktop / Claude Code (not just reload). Check the MCP logs in Settings → Developer.

Pair with

  • necl-content-poster Skill — turn HN stories into ready-to-publish posts for TG/LinkedIn/Threads.

Full pipeline:

necl-hn-mcp (find story) → necl-content-poster (write 3 posts) → you publish

Built by NeCL

neclco.com — production AI engineering. RAG systems, voice agents, Telegram bots, custom MCPs and content engines for companies that need more than wrappers.

Need a custom MCP wired to your internal APIs / databases / SaaS? Book a call.

Development

git clone https://github.com/adjacentai/necl-hn-mcp.git
cd necl-hn-mcp
pip install -e ".[dev]"

# Run locally with MCP inspector
mcp dev src/necl_hn_mcp/server.py

License

MIT — see LICENSE.


Follow NeCL: Telegram · LinkedIn · X · Site

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选