necl-hn-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@necl-hn-mcpShow me the top 10 stories from the last 24 hours"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
necl-hn-mcp
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: this is the exact HN layer that powers our internal content agent, running 3× daily for months.
Tools
Tool | What it does |
| Top N stories from the last N hours, ranked by score. Default: top 10 from last 24h. |
| Full story metadata: title, url, score, author, comments count, posted time. |
| Top-level comments thread for a story, sorted by HN ranking. |
| Full-text search across HN posts and comments (via Algolia HN API). |
| Stories from a specific category: |
Related MCP server: HackerNews MCP Server
Why this MCP
Zero credentials, zero config — public HN API, no rate limits worth worrying about, no signup.
Battle-tested code — extracted from 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.gitThen 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
newandbestcategories 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
showcategory 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 publishBuilt 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? Visit neclco.com.
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.pyLicense
MIT — see LICENSE.
Available Tools
5 toolshn_categoryA
Get stories from a specific HN category.
Args: category: One of "top", "new", "best", "ask", "show", "job". limit: Number of stories to return (1-30). Default 10.
Returns: List of story dicts.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| category | No | top |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavior. It states that the tool returns a list of story dicts, implying a read-only operation, but it does not explicitly confirm this or mention rate limits, authentication, or any other behavioral constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, using a clear three-line structure: purpose, Args, Returns. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 simple parameters, no required fields), the description covers the core functionality and parameter details. The presence of an output schema (not shown) reduces the need to describe return structure, but the description could still benefit from mentioning error cases or context about the source.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explicitly lists valid enum values for category and the allowed range for limit (1-30), adding meaningful context beyond the input schema which only shows types and defaults. This fully compensates for the 0% schema coverage indicated in context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves stories from a specific HN category, with a list of valid categories. However, it does not distinguish itself from the sibling tool hn_top_stories, which might be interpreted as similar.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like hn_search or hn_top_stories. No when-not conditions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hn_get_commentsA
Get the top-level comments thread for a story, in HN ranking order.
Args: story_id: The HN item id of the parent story. limit: Number of comments to return (1-30). Default 10.
Returns: List of comment dicts with id, author, text, posted_unix, replies_count.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| story_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It specifies that comments are top-level and in ranking order, and outlines the return structure, but does not disclose error behavior, rate limits, or what happens with invalid story_id.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a clear front-loaded purpose, followed by structured Args and Returns sections. Every sentence is informative with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has two parameters and an output schema described in the Returns section, the description covers the core functionality well. It lacks details on error handling or edge cases, but is adequate for a simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description provides clear meaning for both parameters: story_id is the HN item id and limit is the number of comments (1-30, default 10). This adds value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets top-level comments for a story in HN ranking order, using specific verb and resource, and distinguishes from sibling tools like hn_get_story.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like hn_get_story or hn_search. There is no mention of context, prerequisites, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hn_get_storyA
Get full metadata for a single HN story by id.
Args: story_id: The HN item id.
Returns: Story dict with id, title, url, score, author, comments_count, posted_unix, hn_url, type, text. Returns {"error": "..."} if not found.
| Name | Required | Description | Default |
|---|---|---|---|
| story_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must convey behavior. It states the tool returns a story dict with specific fields and an error dict if not found. This covers basic behavior for a read-only operation, but lacks details like authentication or rate limits, though not critical for this simple public API.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is concise, front-loaded with purpose, followed by clear Args and Returns sections. No wasted words; every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-story retrieval tool with one parameter and no output schema, the description adequately explains input, output format (including error case), and purpose. No additional context is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must explain parameters. It states 'story_id: The HN item id.' This provides some context beyond the schema's type and title, but is minimal. It compensates partially but could be more specific.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves full metadata for a single HN story by ID, using a specific verb ('Get') and resource ('story'), and distinguishes it from siblings like hn_search or hn_get_comments.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: when you have a story ID and want metadata. However, no explicit when-to-use or when-not-to-use guidance is given, and alternatives are not mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hn_searchA
Full-text search across HN stories and comments via Algolia.
Args: query: Search query string. sort: "relevance" (default) or "date" (newest first). limit: Number of hits to return (1-50). Default 20.
Returns:
Dict with hits (list of clean dicts: id, kind, title, url, hn_url,
author, points, comments_count, story_text, comment_text, created_at, tags)
and total_hits (total matches Algolia found, may exceed limit).
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | relevance | |
| limit | No | ||
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses return format (dict with hits and total_hits), hit structure (id, kind, title, etc.), sort defaults, limit range, and that it's full-text search via Algolia. Does not mention rate limits or idempotency, but search is inherently read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Structured as docstring with Args and Returns sections. Each sentence adds value, though the return format list is somewhat lengthy but necessary. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description thoroughly explains return values and hits structure. Parameters are fully explained. Covers defaults and constraints. Lacks error handling or edge cases, but sufficient for a search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but description adds meaning beyond schema: explains query as search string, sort options with default 'relevance', limit range 1-50 and default 20. It compensates well for lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Full-text search across HN stories and comments via Algolia,' specifying the verb (search), resource (HN stories and comments), and method (Algolia). It distinguishes from sibling tools like hn_get_story and hn_top_stories, which are specific retrieval tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains parameters but does not explicitly state when to use this tool versus alternatives. It implies usage for broad search, but lacks explicit when-not or comparison to siblings, reducing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hn_top_storiesA
Get the top Hacker News stories from the last N hours, ranked by score.
Args: limit: Number of stories to return (1-30). Default 10. hours: Time window in hours back from now. Default 24.
Returns: List of story dicts with id, title, url, score, author, comments_count, posted_unix, hn_url, type, text (for Ask/Show HN posts).
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, description carries full burden. It states returned fields but doesn't disclose read-only nature, potential API rate limits, or error cases. Adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two clear sections (Args, Returns) with no fluff. Every sentence adds value. Appropriate length for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers parameters, defaults, return fields (with output schema support). Missing error handling or preconditions, but sufficient for a straightforward read tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description fully compensates. It explains limit (1-30) and hours (window back from now), adding constraints and defaults beyond the schema's empty descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves top Hacker News stories from a time window, ranked by score. It distinguishes from siblings like hn_search (search) and hn_get_story (specific story), making intent unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool over alternatives (e.g., hn_search, hn_category). The description only explains functionality without context on preferred use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.1- First observed
hn_category - First observed
hn_get_comments - First observed
hn_get_story - First observed
hn_search - First observed
hn_top_stories
TDQS
Each tool has a clearly distinct purpose: retrieving stories by category, by time window, by search, a single story by ID, and comments for a story. No overlap or ambiguity.
All tools follow the `hn_` prefix with a consistent verb_noun pattern in snake_case (e.g., hn_category, hn_get_story, hn_search). No mixing of conventions.
Five tools cover the main read operations for Hacker News without being too few or too many. Each tool serves a necessary function in the domain.
Covers story retrieval, search, detail, and comments well. Missing user info or nested replies, but these are minor gaps for typical HN consumption use cases.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Browse Hacker News feeds, threads, and user profiles with full-text search.
Hacker News MCP — search and retrieve stories from Hacker News
Live Hacker News front page: top tech stories, points, comments, links. $0.01/query.
Cross-source news, finance, AI and tech search across 29 sources for agents (BBC, NYT, CNBC, HF).
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables 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.15635MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to access HackerNews content through structured search, front page retrieval, latest posts monitoring, detailed item fetching with comment trees, and user profile viewing via the Algolia API.5637MIT
- AlicenseAqualityDmaintenanceProvides programmatic access to Hacker News content via the HN Algolia API. It enables AI assistants to search stories, retrieve comments, access user profiles, and explore the front page in real-time.963MIT
- FlicenseAqualityCmaintenanceEnables AI assistants to read and search Hacker News for top stories, comments, user profiles, and job listings using the Firebase and Algolia APIs. It facilitates natural language research into community discussions and technological trends across the HN platform.8-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/adjacentai/necl-hn-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server