Skip to main content
Glama
erithwik

mcp-hn

by erithwik

Hacker News MCP Server

A Model Context Protocol (MCP) server that provides tools for fetching information from Hacker News.

Tools

  • get_stories Fetching (top, new, ask_hn, show_hn) stories

  • get_story_info Fetching comments associated with a story

  • search_stories Searching for stories by query

  • get_user_info Fetching user info

Related MCP server: Hacker News MCP Server

Example Usage

Use prompts like the following:

User: Get the top stories of today
  Output: Uses `get_stories` tool and returns a story about AI
User: What does the details of the story today that talks about the future of AI
  Output: Uses `get_story_info` tool based on the results of the previous tool
User: What has the user `pg` been up to?
  Output: Uses `get_user_info` tool and returns a summary of the user's activity
User: What does hackernews say about careers in AI?
  Output: Uses `search_stories` tool and returns a summary of the comments

A more detailed example with the puppeteer MCP server:

User: What are the top stories of today?
  Output: Uses `get_stories` tool and returns a story about AI
User: Can you use the puppeteer tool to read the article about <AI> and also use the hackernews tool to view the comments and give me a summary of what the main comments are about the article?
  Output: Uses puppeteer tool to read the article about AI and then uses the `get_story_info` hn tool to get the comments and returns a summary of the comments

Quickstart

Installing via Smithery

To install Hacker News MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-hn --client claude

Claude Desktop:

Update the following:

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows: %APPDATA%/Claude/claude_desktop_config.json

With the following for production:

{
  "mcpServers": {
    "mcp-hn": {
      "command": "uvx",
      "args": ["mcp-hn"]
    }
  }
}

Available Tools

4 tools
get_storiesA

Get stories from Hacker News. The options are top, new, ask_hn, show_hn for types of stories. This doesn't include the comments. Use get_story_info to get the comments.

ParametersJSON Schema
NameRequiredDescriptionDefault
story_typeNoType of stories to get, one of: `top`, `new`, `ask_hn`, `show_hn`
num_storiesNoNumber of stories to get

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clarifies that comments are excluded and mentions story types, but lacks details on rate limits, authentication needs, pagination, or response format. It adds some context but is incomplete for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with two sentences: the first states purpose and parameters, the second provides usage guidance. Every sentence adds value without redundancy, making it front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 100% schema coverage, the description is adequate but has gaps. It covers purpose and basic usage but lacks behavioral details like response format or error handling. It's minimal viable for a read-only tool but could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds no additional parameter semantics beyond what's in the schema (e.g., no examples, constraints, or format details). Baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get stories from Hacker News' with specific story types listed. It distinguishes from sibling 'get_story_info' by noting 'This doesn't include the comments.' However, it doesn't differentiate from 'search_stories' or 'get_user_info', keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: it specifies when to use this tool (for story types like 'top', 'new', etc.) and explicitly states when not to use it ('This doesn't include the comments. Use `get_story_info` to get the comments.'). It doesn't mention alternatives like 'search_stories' or 'get_user_info', preventing a score of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_story_infoB

Get detailed story info from Hacker News, including the comments

ParametersJSON Schema
NameRequiredDescriptionDefault
story_idNoStory ID

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data (implying read-only) and includes comments, but doesn't cover aspects like rate limits, authentication needs, error conditions, or response format. This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place, with no redundant or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks behavioral details and usage guidance. Without annotations or output schema, more context would be beneficial for a complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'story_id' parameter. The description doesn't add any meaning beyond what the schema provides, such as explaining what a story ID is or where to find it. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('detailed story info from Hacker News'), and specifies the inclusion of comments. However, it doesn't explicitly differentiate from sibling tools like 'get_stories' or 'search_stories' beyond mentioning 'detailed' info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 'get_stories' or 'search_stories'. The description implies it's for detailed story info with comments, but doesn't specify prerequisites, exclusions, or comparative use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_infoC

Get user info from Hacker News, including the stories they've submitted

ParametersJSON Schema
NameRequiredDescriptionDefault
user_nameYesUsername of the user
num_storiesNoNumber of stories to get, defaults to 10

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves user info and stories, implying a read-only operation, but doesn't cover aspects like rate limits, authentication needs, error handling, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. It's appropriately sized for a simple tool, with zero waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool with two parameters. It doesn't explain what 'user info' includes beyond stories, how results are structured, or any behavioral constraints. For a read operation with no structured output, more context is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with clear descriptions for both parameters ('user_name' and 'num_stories'). The description adds minimal value beyond the schema, as it doesn't provide additional context like parameter interactions or examples. With high schema coverage, 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get user info from Hacker News, including the stories they've submitted.' It specifies the verb ('Get'), resource ('user info'), and scope ('from Hacker News'), but doesn't explicitly differentiate from sibling tools like 'get_stories' or 'get_story_info' beyond mentioning user-specific data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. It doesn't mention sibling tools like 'get_stories' or 'search_stories', nor does it specify prerequisites, exclusions, or contexts for usage. The agent must infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_storiesA

Search stories from Hacker News. It is generally recommended to use simpler queries to get a broader set of results (less than 5 words). Very targetted queries may not return any results.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
search_by_dateNoSearch by date, defaults to False. If this is False, then we search by relevance, then points, then number of comments.
num_resultsNoNumber of results to get, defaults to 10

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about query performance (broader queries work better, targeted ones may fail) and implies read-only behavior through 'search'. However, it doesn't cover important aspects like rate limits, authentication needs, error handling, or response format, leaving significant gaps for a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, and the second provides essential usage guidance. Every sentence earns its place with no wasted words, making it efficient and easy for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (search with 3 parameters), no annotations, and no output schema, the description is partially complete. It covers purpose and query guidelines well but lacks details on behavioral traits (e.g., rate limits), response format, and error handling. For a search tool without annotations or output schema, more context would be helpful, making it adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions 'queries' generally but doesn't explain the 'query' parameter's semantics, format, or the 'search_by_date' and 'num_results' parameters. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches stories from Hacker News, providing a specific verb ('search') and resource ('stories'). It distinguishes from sibling tools like 'get_stories' (likely listing without search) and 'get_story_info' (getting details for a specific story). However, it doesn't explicitly contrast with these siblings, keeping it at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool: for searching stories with queries. It offers practical guidance on query construction (simpler queries with <5 words recommended, targeted queries may fail), which helps the agent decide when to use it. However, it doesn't explicitly mention when NOT to use it or name alternatives like 'get_stories' for non-search scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: get_stories retrieves story lists by type, get_story_info provides detailed story data with comments, get_user_info focuses on user profiles and submissions, and search_stories handles story searches. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case: get_stories, get_story_info, get_user_info, and search_stories. The naming is predictable and readable throughout the set.

Tool Count5/5

With 4 tools, this is well-scoped for a Hacker News server, covering core operations like listing stories, getting details, user info, and searching. Each tool earns its place without being excessive or insufficient.

Completeness4/5

The toolset covers the essential Hacker News domain well, including story retrieval, details, user info, and search. A minor gap is the lack of comment-specific operations (e.g., posting or voting), but the core workflows are complete and functional.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

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

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI tools like Claude and Cursor to fetch and interact with live Hacker News data (posts, comments, users) via standardized MCP endpoints.
    11
    119
    33
    MIT
  • A
    license
    D
    quality
    D
    maintenance
    An MCP server that enables AI assistants to access real-time Hacker News data including top stories, story details, comments, and search functionality.
    1
    25
    3
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A server that enables AI assistants to access, analyze, and understand HackerNews content through standardized Model Context Protocol interfaces, providing tools for searching posts, analyzing users, and tracking trending topics.
    5
    8
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for Hacker News providing tools to fetch stories, threads, users, and search content via Firebase and Algolia APIs.
    380
    4
    Apache 2.0

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/erithwik/mcp-hn'

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