Skip to main content
Glama
georgeck

Hacker News Companion MCP

by georgeck
README.md
# Hacker News Companion MCP
[![smithery badge](https://smithery.ai/badge/@georgeck/hn-companion-mcp)](https://smithery.ai/server/@georgeck/hn-companion-mcp)

<a href="https://glama.ai/mcp/servers/@georgeck/hn-companion-mcp">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@georgeck/hn-companion-mcp/badge" alt="Hacker News Companion MCP server" />
</a>

A Model Context Protocol (MCP) for summarizing Hacker News discussions using Claude.

## Overview

This MCP fetches and processes Hacker News discussions, preparing them in a format that Claude can use to generate high-quality summaries. It handles both the hierarchical structure of comments and their metadata (scores, downvotes, etc.) to help Claude understand the relative importance and relationships of different comments.

## Features

- Process Hacker News URLs or post IDs
- Download and analyze comment structure from HN
- Score comments based on community engagement
- Format data optimized for Claude's summarization

## Installation

### Installing via Smithery

To install Hacker News Companion for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@georgeck/hn-companion-mcp):

```bash
npx -y @smithery/cli install @georgeck/hn-companion-mcp --client claude
```

### Manual Installation

1. Clone the repository:
   ```
   git clone https://github.com/yourusername/hn-companion-mcp.git
   cd hn-companion-mcp
   ```

2. Install dependencies:
   ```
   npm install
   ```

## Usage

### CLI

```bash
node index.js <post-id-or-url>
```

Example:
```bash
node index.js 43448075
# or
node index.js https://news.ycombinator.com/item?id=43448075
```

### API Server

Start the server:
```bash
npm start
```

Make a request:
```bash
curl -X POST http://localhost:3000/api/summarize \
  -H "Content-Type: application/json" \
  -d '{"input": "https://news.ycombinator.com/item?id=43448075"}'
```

## API Reference

### `POST /api/summarize`

Request body:
```json
{
  "input": "https://news.ycombinator.com/item?id=43448075"
}
```

Response:
```json
{
  "status": "success",
  "data": {
    "systemPrompt": "...",
    "userPrompt": "...",
    "commentPathIdMapping": { ... },
    "postTitle": "...",
    "postId": "...",
    "commentCount": 123
  }
}
```

## Integration with Claude

This MCP is designed to prepare data for Claude to summarize. When a user asks Claude to summarize a Hacker News discussion, 
Claude can call this MCP to get the formatted data and then generate a summary based on the provided system and user prompts.

```json
"hn-companion": {
      "command": "node",
      "args": ["<full path to src>/hn-companion-mcp/server.js"]
    }
  }
```

## License

MIT

TDQS

B3.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly distinct as it is the sole tool available.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name follows a clear verb_noun pattern (get_hn_post_formatted_comments), which would be consistent if more tools existed.

Tool Count2/5

A single tool is too few for a server named 'Hacker News Companion MCP', which suggests broader functionality. The tool only handles comment retrieval and formatting, leaving obvious gaps like fetching posts, searching, or user interactions, making the scope feel incomplete.

Completeness2/5

The tool set is severely incomplete for a Hacker News companion. It only covers retrieving and formatting comments for summarization, missing core operations such as getting posts, listing top stories, or user management, which are essential for the domain.

Maintenance

ActivityInactive
ResponsivenessNo issues