Skip to main content
Glama
sam3690
by sam3690

Hackernews_mcp

CI npm version License: MIT TypeScript Node.js MCP

HackerNews MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to Hacker News content via the HN Algolia API. This server enables AI assistants like Claude to search stories, retrieve comments, access user profiles, and explore the HN front page in real-time.

Features

  • โœ… 9 MCP Tools for comprehensive HN access

  • ๐Ÿ” Search: Stories by relevance or date, comments with filters

  • ๐Ÿ“ฐ Browse: Front page, latest stories, Ask HN, Show HN posts

  • ๐Ÿ‘ค Details: Retrieve specific stories with nested comments and user profiles

  • โšก Rate Limiting: Respects HN API limits (10,000 req/hr)

  • ๐Ÿ›ก๏ธ Type-Safe: Full TypeScript with strict mode

  • ๐Ÿ“Š Observable: Structured JSON logging with correlation IDs

  • ๐Ÿงช Tested: Unit, integration, and contract tests

Related MCP server: HackerNews MCP Server

Installation

NPM (when published)

npm install -g hn-mcp-server

From Source

git clone https://github.com/YOUR_USERNAME/hn-mcp-server.git
cd hn-mcp-server
npm install
npm run build
npm link

Quick Start (VS Code)

The fastest way to get started is with VS Code and GitHub Copilot:

  1. Clone and build:

    git clone <your-repo-url>
    cd hn-mcp-server
    npm install
    npm run build
  2. Open in VS Code:

    code .
  3. Reload VS Code (Ctrl+Shift+P โ†’ "Developer: Reload Window")

  4. Follow the complete setup checklist: docs/VSCODE_CHECKLIST.md

  5. Open Copilot Chat and try:

    @workspace What MCP tools are available?

    or

    Show me the top stories from Hacker News

๐Ÿ“– Step-by-step setup guide: docs/VSCODE_CHECKLIST.md

๐Ÿ“– For detailed VS Code setup instructions, see docs/VSCODE_SETUP.md

โš ๏ธ Tools not appearing? See docs/TROUBLESHOOTING_VSCODE.md

๐Ÿ’ก Tip: MCP support in VS Code is experimental. For the best experience, use Claude Desktop (see configuration below).

Configuration

VS Code with GitHub Copilot

The easiest way to use this server is directly in VS Code with GitHub Copilot:

  1. Build the server:

    npm run build
  2. Configuration is already set up in .vscode/mcp.json:

    {
      "hackernews": {
        "command": "node",
        "args": ["${workspaceFolder}/dist/index.js"],
        "env": {
          "DEBUG": "0"
        }
      }
    }
  3. Reload VS Code or restart the Copilot extension

  4. Test it by asking Copilot:

    • "Show me the top stories from Hacker News"

    • "Search HN for stories about AI"

    • "Get the user profile for 'pg'"

Claude Desktop

Add to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "hackernews": {
      "command": "hn-mcp-server"
    }
  }
}

Or if installed from source:

{
  "mcpServers": {
    "hackernews": {
      "command": "node",
      "args": ["/path/to/hn-mcp-server/dist/index.js"]
    }
  }
}

Restart Claude Desktop to activate the server.

Available Tools

1. search_stories

Search HN stories by relevance with advanced filtering.

{
  query: "artificial intelligence",    // Search term
  tags: "story,front_page",           // Filter by tags
  numericFilters: "points>=100",      // Minimum points
  page: 0,                            // Pagination
  hitsPerPage: 20                     // Results per page
}

2. search_by_date

Search stories/comments sorted by date (most recent first).

{
  query: "TypeScript",
  tags: "story",
  numericFilters: "created_at_i>1640000000",  // Unix timestamp
  page: 0,
  hitsPerPage: 20
}

3. search_comments

Search comments with optional story/author filtering.

{
  query: "React hooks",
  tags: "author_pg",              // Filter by author
  sortByDate: false,              // Sort by relevance
  page: 0,
  hitsPerPage: 20
}

4. get_front_page

Retrieve current HN front page stories.

{
  page: 0,
  hitsPerPage: 30
}

5. get_latest_stories

Get most recently submitted stories.

{
  page: 0,
  hitsPerPage: 20
}

6. get_ask_hn

Retrieve Ask HN posts (community questions).

{
  page: 0,
  hitsPerPage: 20
}

7. get_show_hn

Retrieve Show HN posts (project showcases).

{
  page: 0,
  hitsPerPage: 20
}

8. get_story

Get a specific story by ID with full nested comment tree.

{
  id: 8863  // Famous "How to Start a Startup" post
}

9. get_user

Retrieve user profile by username.

{
  username: "pg"  // Paul Graham
}

Example Usage in Claude

Search for AI stories:

Show me the top stories about AI from Hacker News

Get front page:

What's currently on the Hacker News front page?

Find user information:

Tell me about the HN user 'pg'

Advanced search:

Find recent stories about TypeScript with at least 50 points

Development

Prerequisites

  • Node.js 20 LTS or higher

  • npm or yarn

Setup

git clone https://github.com/YOUR_USERNAME/hn-mcp-server.git
cd hn-mcp-server
npm install

Commands

npm run build        # Compile TypeScript
npm run dev          # Watch mode
npm test             # Run all tests
npm run test:watch   # Test watch mode
npm run lint         # Lint code
npm run format       # Format code
npm run check        # Lint + type check
npm run ci           # Full CI workflow

Project Structure

src/
โ”œโ”€โ”€ index.ts           # Main entry point
โ”œโ”€โ”€ server.ts          # MCP server initialization
โ”œโ”€โ”€ tools/             # MCP tool implementations (one per file)
โ”‚   โ”œโ”€โ”€ search-stories.ts
โ”‚   โ”œโ”€โ”€ get-story.ts
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ lib/               # Shared utilities
โ”‚   โ”œโ”€โ”€ hn-client.ts   # HN API client
โ”‚   โ”œโ”€โ”€ rate-limiter.ts
โ”‚   โ”œโ”€โ”€ logger.ts
โ”‚   โ”œโ”€โ”€ errors.ts
โ”‚   โ””โ”€โ”€ validators.ts
โ””โ”€โ”€ types/             # TypeScript type definitions
    โ”œโ”€โ”€ hn-api.ts
    โ””โ”€โ”€ mcp.ts

Rate Limiting

The HN Algolia API has a limit of 10,000 requests per hour per IP address. This server:

  • Tracks request count automatically

  • Warns at 90% (9,000 requests)

  • Throws error at 95% (9,500 requests)

  • Resets counter every hour

Logging

Structured JSON logging with correlation IDs:

# Enable debug logging
DEBUG=1 hn-mcp-server

# View logs in Claude Desktop
# macOS: ~/Library/Logs/Claude/mcp*.log
# Windows: %APPDATA%\Claude\logs\mcp*.log
# Linux: ~/.config/claude/logs/mcp*.log

Error Handling

All errors return MCP-formatted responses with:

  • Clear error messages

  • Error codes (RATE_LIMIT_EXCEEDED, ITEM_NOT_FOUND, etc.)

  • Context for debugging

  • Suggested user actions

Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Make your changes following the constitution principles

  4. Run quality gates (npm run ci)

  5. Commit (git commit -m 'Add amazing feature')

  6. Push (git push origin feature/amazing-feature)

  7. Open a Pull Request

License

MIT License - see LICENSE file for details.

Support


Built with โค๏ธ following MCP best practices and constitution principles

Available Tools

9 tools
get_ask_hnGet Ask HN PostsB

Retrieve Ask HN posts (questions to the HN community), sorted by date descending.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
nbHitsYes
nbPagesYes

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states basic functionality. It doesn't disclose behavioral traits like rate limits, authentication needs, pagination behavior beyond the schema, or what happens with invalid parameters. The description adds minimal context beyond the schema's parameters.

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 with zero waste. It's appropriately sized and front-loaded with the core purpose, making it easy to understand quickly.

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

Completeness4/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 (simple retrieval), 100% schema coverage, and presence of an output schema, the description is reasonably complete. It covers the core purpose and sorting, though it could benefit from more behavioral context given the lack of annotations.

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 parameter semantics beyond what's in the schema, but doesn't need to compensate for gaps. 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 ('Retrieve') and resource ('Ask HN posts'), specifying they are questions to the HN community. It distinguishes from siblings like 'get_front_page' or 'get_show_hn' by focusing on Ask HN posts, but doesn't explicitly differentiate from 'search_stories' or 'search_by_date' which might also retrieve posts.

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 like 'search_stories' or 'search_by_date' for similar content. It mentions sorting by date descending, but doesn't specify if this is the only sorting option or when to choose this over other retrieval methods.

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

get_front_pageGet Front Page StoriesA

Retrieve stories currently on the Hacker News front page. Returns up to 30 stories.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
nbHitsYes
nbPagesYes

TDQS

A3.6/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. It discloses the return limit ('up to 30 stories'), which is useful behavioral context. However, it doesn't mention rate limits, authentication needs, error conditions, or pagination behavior beyond the parameter hints.

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?

Two sentences, zero waste. The first sentence states the core purpose, the second adds important behavioral context (return limit). Every word earns its place with no redundancy.

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

Completeness4/5

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

Given the tool has an output schema (so return values are documented elsewhere), 100% parameter schema coverage, and no annotations, the description provides adequate context for a read-only retrieval operation. It could be more complete by mentioning when to use versus siblings, but covers the essential purpose and key constraint.

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 fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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

Purpose5/5

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

The description clearly states the verb ('Retrieve') and resource ('stories currently on the Hacker News front page'), specifying the exact scope. It distinguishes from siblings like get_latest_stories or search_stories by focusing specifically on front page content.

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_latest_stories or search_stories. The description mentions the return limit but doesn't explain when this specific front page retrieval is preferred over other story-fetching tools.

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

get_latest_storiesGet Latest StoriesB

Retrieve the most recently submitted stories, sorted by date descending.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
nbHitsYes
nbPagesYes

TDQS

B3.2/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 full burden. It mentions sorting behavior ('sorted by date descending'), which is valuable. However, it doesn't disclose other important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, what happens with invalid parameters, or pagination behavior beyond the parameters themselves.

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 - 'retrieve' (action), 'most recently submitted stories' (resource), 'sorted by date descending' (key behavior). No wasted words or redundant information.

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

Completeness4/5

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

Given that there's an output schema (which handles return values), 100% schema description coverage, and this is a relatively simple read operation with 2 optional parameters, the description is reasonably complete. It covers the core purpose and sorting behavior. The main gap is lack of guidance on when to use versus sibling tools.

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 both parameters are well-documented in the schema. The description doesn't add any meaningful parameter semantics beyond what the schema provides - it doesn't explain how 'page' and 'hitsPerPage' interact with 'most recently submitted stories' or provide usage examples. 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 verb ('retrieve') and resource ('most recently submitted stories'), and specifies the sorting order ('sorted by date descending'). It distinguishes from some siblings like 'get_story' (single story) and 'search_stories' (search functionality), but doesn't explicitly differentiate from 'get_front_page' or 'get_ask_hn' which might also retrieve recent stories.

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 like 'get_front_page', 'get_ask_hn', 'search_stories', or 'search_by_date'. It doesn't mention any prerequisites, exclusions, or specific contexts where this tool is preferred over siblings.

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

get_show_hnGet Show HN PostsB

Retrieve Show HN posts (projects shared with the HN community), sorted by date descending.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
nbHitsYes
nbPagesYes

TDQS

B3.4/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 full burden. It mentions sorting ('sorted by date descending') which is useful behavioral context, but doesn't disclose other important traits like pagination behavior (implied by parameters but not described), rate limits, authentication needs, or what the output contains. For a retrieval tool with no annotation coverage, this leaves significant gaps.

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 information or unnecessary elaboration.

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

Completeness4/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 (retrieval with pagination), 100% schema coverage, and the presence of an output schema (which handles return values), the description provides adequate context. It covers what's being retrieved and sorting, though could better address behavioral aspects like pagination implications.

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 (page and hitsPerPage). The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.

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 action ('Retrieve') and resource ('Show HN posts'), with additional context about what Show HN posts are ('projects shared with the HN community'). It distinguishes from some siblings by specifying the content type (Show HN vs Ask HN, front page, etc.), though it doesn't explicitly differentiate from all search-based siblings.

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

Usage Guidelines3/5

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

The description implies usage for retrieving Show HN posts sorted by date, but doesn't explicitly state when to use this tool versus alternatives like 'search_stories' or 'get_latest_stories'. No guidance on exclusions or prerequisites is provided.

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

get_storyGet StoryA

Retrieve a specific story by ID with full nested comment tree. Returns complete story details including all comments and replies.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesStory ID (numeric)

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
authorYes
pointsYes
childrenNo

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the key behavioral trait of returning 'full nested comment tree' and 'complete story details', which goes beyond basic retrieval. However, it doesn't mention potential limitations like rate limits, authentication requirements, error conditions, or pagination behavior for large comment trees.

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?

Two efficient sentences with zero waste. First sentence states purpose and key feature, second clarifies return value scope. Perfectly front-loaded with all essential information in minimal space.

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

Completeness4/5

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

Given the tool has an output schema (which handles return values), no annotations, simple single parameter with full schema coverage, and moderate complexity (retrieval with nested data), the description is nearly complete. It clearly states what the tool does and its distinctive comment tree feature. Minor gap: doesn't mention potential for empty/null returns if ID doesn't exist.

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 fully documents the single 'id' parameter. The description adds no additional parameter semantics beyond what's in the schema (it doesn't explain ID format, source, or constraints beyond the schema's minimum:1). 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.

Purpose5/5

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

The description clearly states the specific action ('Retrieve'), resource ('a specific story'), and key distinguishing feature ('with full nested comment tree'). It explicitly differentiates from siblings like get_front_page (list) or search_stories (search) by focusing on single-story retrieval with complete comment hierarchy.

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 for when to use this tool ('Retrieve a specific story by ID'), but doesn't explicitly state when NOT to use it or name specific alternatives. It implies usage when you need a complete story with comments rather than just metadata, but lacks explicit exclusions or comparisons to siblings like get_user or search_comments.

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

get_userGet User ProfileB

Retrieve a user profile by username. Returns karma, account creation date, and bio.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYesHacker News username

Output Schema

ParametersJSON Schema
NameRequiredDescription
aboutYes
karmaYes
usernameYes

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 mentions the return fields (karma, account creation date, bio), which adds some context, but doesn't cover aspects like error handling, authentication needs, rate limits, or whether this is a read-only operation. For a tool with zero annotation coverage, this is a significant gap.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that are front-loaded and efficient. However, the second sentence could be more integrated, and there's slight room for improvement in flow.

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

Completeness4/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, a single parameter with full schema coverage, and the presence of an output schema, the description is reasonably complete. It specifies what data is returned, which complements the output schema, though it could benefit from more behavioral context to fully compensate for the lack of annotations.

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 'username' parameter with its pattern. The description adds minimal value by restating it's 'by username' without providing additional syntax or format details beyond what the schema provides, meeting the baseline for high schema coverage.

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 ('Retrieve') and resource ('user profile'), specifying it's by username. However, it doesn't explicitly distinguish this tool from sibling tools like 'search_comments' or 'search_stories' which might also involve users, though the focus on profile retrieval is clear.

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 when-not scenarios or compare to sibling tools, leaving usage context implied rather than explicit.

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

search_by_dateSearch by DateB

Search Hacker News content sorted by date (most recent first). Useful for finding latest stories, comments, or posts by specific authors.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text. Can be empty to get all content matching tags/filters.
tagsNoOptional filter tags. Examples: 'story', 'comment', 'show_hn', 'ask_hn', 'author_USERNAME', 'story_ID'
numericFiltersNoOptional numeric filters for date ranges, points, comments count
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
pageYes
nbHitsYes
nbPagesYes
hitsPerPageYes

TDQS

B3.4/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 mentions sorting by date and use cases, but lacks critical details like whether this is a read-only operation, rate limits, authentication needs, or what happens with invalid parameters. For a search tool with 5 parameters, 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 appropriately sized with two concise sentences that are front-loaded with the core purpose. Every sentence earns its place by stating the action and its utility without unnecessary elaboration or repetition.

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

Completeness4/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, 100% schema coverage, and the presence of an output schema, the description is reasonably complete. It covers the purpose and usage context adequately, though it could benefit from more behavioral details given the lack of annotations. The output schema reduces the need to explain return values.

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 parameters thoroughly. The description adds minimal value beyond the schema by implying date sorting and general use cases, but doesn't provide additional syntax, format details, or examples that aren't already in the schema descriptions. This meets the baseline for high schema coverage.

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 Hacker News content sorted by date, which is a specific verb (search) and resource (Hacker News content). It distinguishes from some siblings like get_user or get_story by focusing on search functionality, though it doesn't explicitly differentiate from other search tools like search_comments or search_stories.

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

Usage Guidelines3/5

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

The description provides implied usage guidelines by stating it's 'useful for finding latest stories, comments, or posts by specific authors,' which suggests when to use it. However, it doesn't explicitly mention when not to use it or name alternatives among the sibling tools, leaving some ambiguity about tool selection.

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

search_commentsSearch CommentsB

Search Hacker News comments by text content. Can filter by author or parent story.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text
tagsNoOptional filter tags. Examples: 'comment', 'author_USERNAME', 'story_ID'
sortByDateNoSort by date instead of relevance. Default: false
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
nbHitsYes
nbPagesYes

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions filtering capabilities but doesn't describe important behaviors like pagination handling (implied by page/hitsPerPage parameters), rate limits, authentication requirements, error conditions, or what the search returns beyond 'comments'. The description is insufficient for a search tool with 5 parameters.

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 extremely concise with just two sentences that efficiently convey the core functionality and key filtering options. Every word earns its place with zero wasted text, making it easy to parse quickly.

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 has 5 parameters, no annotations, but has an output schema (which handles return values), the description is minimally adequate. It covers the basic purpose but lacks behavioral context that would be important for a search operation. The output schema reduces the need to describe return values, but more operational guidance would be helpful.

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 all 5 parameters. The description adds minimal value beyond the schema by mentioning 'filter by author or parent story' which relates to the 'tags' parameter, but doesn't provide additional syntax or format details. 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 verb ('search') and resource ('Hacker News comments') with the specific scope of text content. It distinguishes from some siblings like 'get_story' or 'get_user' by focusing on comment search, though it doesn't explicitly differentiate from 'search_stories' which searches stories rather than comments.

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

Usage Guidelines3/5

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

The description implies usage for searching comments with text content and mentions optional filters, but doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_stories' or 'search_by_date'. No when-not-to-use scenarios 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.

search_storiesSearch StoriesA

Search Hacker News stories by relevance. Returns stories matching the query, sorted by relevance score, points, and comment count.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text. Can be empty to get all stories matching tags/filters.
tagsNoOptional filter tags. Comma-separated for AND logic, use parentheses for OR: 'story', 'show_hn', 'ask_hn', 'front_page', 'author_USERNAME'. Example: 'author_pg,(story,poll)'
numericFiltersNoOptional numeric filters: 'created_at_i>X', 'points>=Y', 'num_comments>=Z'. Comma-separated for AND.
pageNoPage number (0-indexed)
hitsPerPageNoResults per page

Output Schema

ParametersJSON Schema
NameRequiredDescription
hitsYes
pageYes
nbHitsYes
nbPagesYes
hitsPerPageYes
processingTimeMSYes

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: it's a search operation that returns matching stories sorted by specific criteria. However, it doesn't mention pagination behavior (implied by page/hitsPerPage parameters), rate limits, authentication needs, or what happens with empty queries. The description adds value but doesn't fully compensate for the lack of 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?

Two sentences that efficiently convey purpose and behavior with zero waste. The first sentence states what the tool does, the second describes the return behavior. Every word earns its place in this well-structured description.

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

Completeness4/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 (5 parameters, search functionality), no annotations, but 100% schema coverage and an output schema exists, the description is reasonably complete. It covers the core purpose and sorting behavior. The output schema will handle return values, so the description doesn't need to explain those. It could benefit from more behavioral context given the lack of annotations.

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 5 parameters thoroughly. The description adds minimal value beyond the schema - it mentions query, tags, and numeric filters but doesn't provide additional semantic context. The baseline of 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.

Purpose5/5

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

The description clearly states the specific action ('Search Hacker News stories by relevance'), resource ('stories'), and distinguishes from siblings by specifying relevance-based search rather than date-based (search_by_date) or category-specific (get_ask_hn, get_show_hn). It explicitly mentions the sorting criteria (relevance score, points, comment count).

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 for when to use this tool (searching by relevance with query, tags, and numeric filters), but doesn't explicitly state when NOT to use it or name specific alternatives. The sibling tools suggest alternatives like search_by_date for date-based searches or get_front_page for front page stories, but these aren't mentioned in the description.

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.

  1. 9 tool updatesv1.0.0
    • First observedget_ask_hn
    • First observedget_front_page
    • First observedget_latest_stories
    • First observedget_show_hn
    • First observedget_story
    • First observedget_user
    • First observedsearch_by_date
    • First observedsearch_comments
    • First observedsearch_stories

TDQS

A3.7/5.0
Disambiguation4/5

Most tools have distinct purposes, such as get_front_page for front-page stories and get_user for user profiles, but there is some overlap between get_latest_stories and search_by_date, as both retrieve recent content, which could cause confusion. The descriptions help clarify, but the boundaries are not perfectly clear.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with a clear verb_noun structure, such as get_front_page and search_stories. This predictability makes it easy for agents to understand and use the tools without ambiguity in naming conventions.

Tool Count5/5

With 9 tools, the server is well-scoped for interacting with Hacker News, covering key actions like retrieving stories, comments, users, and searching. Each tool serves a specific function, and the count is neither too sparse nor overwhelming for the domain.

Completeness4/5

The tool set provides comprehensive coverage for reading and searching Hacker News content, including stories, comments, and user profiles. A minor gap is the lack of write operations (e.g., posting or voting), but this is reasonable for a read-focused server, and agents can still perform most common tasks effectively.

Maintenance

ActivityInactive
ResponsivenessSyncing

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
    C
    maintenance
    Enables 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.
    15
    63
    5
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables 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.
    5
    63
    7
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables 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
    -
  • A
    license
    A
    quality
    C
    maintenance
    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.
    5
    MIT

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/sam3690/Hackernews_mcp'

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