Hacker News MCP Server
Click on "Deploy 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., "@Hacker News MCP Servershow me top stories on Hacker News"
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.
Hacker News MCP Server
A read-only MCP (Model Context Protocol) server for Hacker News. Enables Claude Desktop, Claude Code, and other MCP clients to browse stories, read comments, search posts, and view user profiles. No authentication required.
Features
Story Listings: Browse top, new, best, ask, show, and job stories
Comments: View full comment threads with nesting
Search: Full-text search via Algolia
User Profiles: View user info and submission history
Related MCP server: Hacker News MCP Server
Installation
Prerequisites
Node.js >= 18.0.0
From Source
Clone this repository
Install dependencies:
npm installBuild the project:
npm run build
Configuration
Environment Variables
Variable | Required | Default | Description |
| No | — | Optional HN username for context |
| No |
| Firebase API endpoint |
| No |
| Algolia search endpoint |
No credentials needed. All data is publicly accessible.
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"hackernews": {
"command": "node",
"args": ["/path/to/hackernews-mcp/build/index.js"]
}
}
}Usage with Claude Code
claude mcp add hackernews -- node /path/to/hackernews-mcp/build/index.jsAvailable Tools
Tool | Description |
| List stories by type (top, new, best, ask, show, job) |
| Get a specific item (story, comment, job) |
| Get full comment thread with nesting |
| Full-text search via Algolia |
| View a user's profile |
| List a user's posts |
Development
npm run dev— Watch mode with TypeScript compilationnpm run build— Build the projectnpm start— Start the built server
License
MIT
Available Tools
6 toolsget_commentsA
Get threaded comments for a Hacker News story. Returns comments with indentation showing reply depth. Skips dead and deleted comments.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Maximum reply depth to fetch (1-5). Default: 3 | |
| limit | No | Maximum total comments to return (1-100). Default: 30 | |
| story_id | Yes | The HN story ID to get comments for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations available, the description carries the full burden and adds meaningful behavioral context: it mentions that comments are threaded with indentation to show reply depth and that dead/deleted comments are skipped. This goes beyond a simple 'get comments' and helps set expectations for output format and content filtering.
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 exceptionally concise: two sentences, no fluff, and the key information is front-loaded. Every word contributes to understanding the tool's purpose and behavior.
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 tool with three parameters, no output schema, and no annotations, the description covers the essential return format (threaded, indented) and a key filtering behavior (skipping dead/deleted). It lacks details like pagination or order, but given the tool's simplicity, it is fairly complete.
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 input schema already covers all three parameters with clear descriptions (depth, limit, story_id), so schema description coverage is 100%. The description adds minimal extra parameter meaning beyond what the schema provides, so the baseline score of 3 is appropriate.
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 threaded comments for a Hacker News story, which is a specific verb and resource. It is distinct from siblings like search or get_user, though it shares possible overlap with get_item, but the focus on 'threaded' and 'indentation' makes the purpose clear.
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 explicit guidance is provided on when to use this tool versus alternatives like get_item. The description implies usage for fetching story comments but does not state when not to use it or mention any prerequisites/alternatives, offering minimal directional value.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_itemA
Get any Hacker News item by ID (story, comment, job, poll). Returns full details including text content.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The HN item ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description must carry the burden of behavioral disclosure. It states that the tool returns full details including text content, which conveys a read-only fetch. However, it does not mention behavior for missing IDs, error responses, or any rate limits or authentication requirements.
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 a single, well-structured sentence that conveys the core action and return value without superfluous words. It is immediately scannable and appropriately sized.
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 simple single-parameter fetch tool, the description is sufficiently complete. It specifies what is returned and covers multiple item types, though 'full details' is slightly vague and no error handling is mentioned.
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 input schema already fully documents the single 'id' parameter with 100% coverage. The description adds no additional parameter semantics beyond saying 'by ID', which is already represented in 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 any Hacker News item by ID, covering stories, comments, jobs, and polls. This distinguishes it from siblings like list_stories, get_comments, and search, which operate on collections or specific types.
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 usage context is clear: use when you have a specific item ID and want the full item. It does not explicitly name alternatives or exclusions, but the ID-based scope is a clear differentiator from siblings that list or search.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_userA
Get a Hacker News user profile by username. Returns karma, account age, about text, and submission count.
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | The HN username |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full transparency burden. It discloses the return fields, which is useful, but it does not mention potential behavior for missing users, rate limits, or that this is a read-only operation. Some behavioral context is provided, but key edge-case behavior is absent.
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 two sentences, immediately front-loaded with the action, and every sentence adds value. No fluff or 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?
For a simple one-parameter tool with no output schema or annotations, the description gives enough context about what the tool returns and the target resource. It is slightly incomplete by not addressing error cases or constraints, but the simplicity of the tool makes this acceptable territory for a 4 rather than a 5.
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 100% (username described as 'The HN username'), so the schema already fully explains the parameter. The description adds no additional semantic detail beyond what the schema provides, fitting the baseline score of 3.
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 action (get a user profile) and the resource (Hacker News user by username). It also lists the key return data (karma, account age, about text, submission count), which distinguishes it from the sibling tool get_user_submissions that focuses on submissions.
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. It does not mention when to prefer get_user_submissions or search, and there are no usage context hints beyond the basic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_user_submissionsB
Get recent submissions from a Hacker News user. Can filter by stories or comments.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filter by submission type. Default: all | |
| limit | No | Number of submissions to return (1-30). Default: 10 | |
| username | Yes | The HN username |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions 'recent' submissions and the ability to filter, but does not disclose details like sorting order, time window, pagination, or the shape of the return value. The behavior is straightforward and not misleading, but lacks depth.
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 a single, efficient sentence that conveys the essential information without any filler. It is front-loaded with the main action and includes a secondary capability, earning every word.
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?
The tool is relatively simple with 3 parameters and no output schema. The description explains the core purpose and a filtering option, but it does not specify the return format or any edge cases. Given the schema fills in parameter details, a 3 reflects that the description is sufficient but not thorough.
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 100%, so the baseline is 3. The description adds minimal extra meaning by referring to 'filter by stories or comments,' which mirrors the 'type' enum. It does not elaborate on 'limit' or 'username' beyond what the schema already provides.
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's function: 'Get recent submissions from a Hacker News user' with an additional note about filtering by stories or comments. It is specific in verb and resource, but does not explicitly distinguish itself from siblings like get_user or list_stories.
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?
There is no guidance on when to use this tool versus alternatives. The description does not mention any exclusions or prerequisites, and no sibling tools are referenced. The only usage hint is the filter capability, which is a feature rather than a selection guideline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_storiesA
Browse Hacker News feeds (top, new, best, ask, show, job) with pagination. Returns titles, URLs, scores, and metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| feed | No | Feed type to browse. Default: top | |
| limit | No | Number of stories to return (1-50). Default: 20 | |
| offset | No | Number of stories to skip for pagination. Default: 0 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses return content (titles, URLs, scores, metadata) and pagination, but lacks details on authentication, rate limits, or output structure. Since no annotations are present, it carries the full burden but does not go beyond basic transparency.
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?
One compact sentence, front-loaded with the primary action and resource, and includes necessary details without superfluous content.
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 adequately specifies the return content and feed types. It is sufficient for a straightforward listing tool, though more detail on the return structure could make it more complete.
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 100%, so the baseline of 3 applies. The description adds the concept of pagination, but the schema already describes each parameter (feed, limit, offset) comprehensively, so no significant additional meaning is provided.
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's function: browsing Hacker News feeds with specific feed types and pagination. It distinguishes itself from sibling tools like get_item or search by focusing on feed-based listing.
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 implies usage for feed browsing but does not explicitly mention alternatives or exclusions. The context is clear, and the feed types are enumerated, providing adequate guidance without stating when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchB
Search Hacker News using Algolia. Search stories, comments, or all items by relevance or date.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (0-indexed). Default: 0 | |
| sort | No | Sort order. Default: relevance | |
| type | No | Type of items to search. Default: story | |
| query | Yes | Search query string | |
| hits_per_page | No | Results per page (1-50). Default: 20 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full burden of behavioral disclosure. It omits key behaviors such as pagination, response format, rate limits, or default sort/hits_per_page values. For a search tool, at least the return shape and pagination behavior should be mentioned.
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 two sentences with no redundant information. It front-loads the primary action and then adds precise scope, making it highly efficient.
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?
With 5 parameters, no output schema, and no annotations, the description is too thin. It explains the search scope but not what the response contains, how pagination works, or any sensible defaults. Thus, it falls short of being contextually complete for effective tool use.
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 schema has 100% description coverage for all 5 parameters, so the baseline is 3. The description adds perspective on the enum values (sort by relevance/date, type story/comment/all) but doesn't provide additional semantics beyond the schema's own 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 uses a specific verb+resource ('Search Hacker News using Algolia') and elaborates on searchable item types (stories, comments, all) and sort options (relevance, date), clearly distinguishing this from sibling tools like list_stories or get_item.
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 implies the tool is for searching, which is evident from the name, but it doesn't explicitly state when to use this over alternatives or mention any exclusions. No guidance is provided on when to prefer this tool over list_stories or get_comments.
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.
6 tool updates
v1.0.0- First observed
get_comments - First observed
get_item - First observed
get_user - First observed
get_user_submissions - First observed
list_stories - First observed
search
TDQS
Scored across 6 tools
Each tool has a distinct purpose: feeds, item retrieval, comment threads, search, user profiles, and user submissions. No overlapping functionality that would cause confusion.
Most tools follow a clear verb_noun pattern (list_stories, get_item, get_comments, get_user, get_user_submissions). The lone 'search' is a valid verb but lacks a noun, making it a slight deviation from the pattern.
Six tools is well-scoped for a Hacker News reader, covering browsing, retrieval, search, and user-related queries without over-expanding the surface.
The read-only surface is solid, covering stories, items, comments, search, and user data. Minor gaps exist around fetching a comment thread directly from a comment ID and write operations, but these are reasonable omissions for a typical HN MCP.
Maintenance
Related MCP Connectors
Dive into the latest and greatest from the tech world with our Hacker News MCP server.
Hacker News MCP — search and retrieve stories from Hacker News
Browse Hacker News feeds, threads, and user profiles with full-text search.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseAqualityFmaintenanceA Model Context Protocol (MCP) server that provides tools for searching and fetching information from Hacker News.476MIT
- AlicenseDqualityDmaintenanceAn MCP server that enables AI assistants to access real-time Hacker News data including top stories, story details, comments, and search functionality.118 npm3MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for Hacker News providing tools to fetch stories, threads, users, and search content via Firebase and Algolia APIs.279 npm4Apache 2.0
- AlicenseAqualityDmaintenanceThe only MCP server that can write to Hacker News, enabling story submission, commenting, and submissions checking via natural language.523 npmMIT