PH

pskill9/hn-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

40 stars 7 forks 품질 65 트렌드 12MIT

pskill9/hn-server는 MCP 서버 후보로 https://github.com/pskill9/hn-server.에서 가져온

개요

pskill9/hn-server는 MCP 서버 후보로 https://github.com/pskill9/hn-server.에서 가져온

개요(AI 번역)

Hacker News의 fetching Story를 제공하는 모델 Context Protocol (MCP) 서버. 이 서버는 news.ycombinator.com에서 HTML 콘텐츠를 구문하고 다양한 유형의 스토리(top, new, asked, show, jobs)에 대한 구조화된 데이터를 제공합니다.

특징

  • 다른 유형의 이야기 (위, 새로운, 질문, 쇼, 작업)
  • 제목, URL, 포인트, 저자, 타임스탬프, 코멘트 수를 포함한 구조화 된 데이터를 가져옵니다.
  • 반환된 이야기 수에 대한 구성 제한
  • 깨끗한 오류 처리 및 검증

설치

  1. 저장소를 복제:

  2. 의존성 설치:

  3. 서버 구축:

  4. MCP 설정 구성 파일에 추가 (위치는 시스템에 따라 달라집니다):

VSCode Claude 확장을 위해:

사용법

서버는 Hacker News에서 이야기하는 데 사용할 수있는 get_stories라는 도구를 제공합니다.

도구: get stories

모수:

  • type (string): 이야기의 유형
  • 옵션 : ‘top’, ‘new’, ‘ask’, ‘show’, ‘jobs’
  • 기본 : ‘top’
  • limit (number): 회신하는 이야기 수
  • 범위: 1-30
  • 과태: 10

예제 사용:

표본 산출:

Claude와 통합

Claude이 MCP 서버를 사용하려면 다음을 수행해야합니다.

  1. 명세.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Hacker News MCP Server

A Model Context Protocol (MCP) server that provides tools for fetching stories from Hacker News. This server parses the HTML content from news.ycombinator.com and provides structured data for different types of stories (top, new, ask, show, jobs).

Features

  • Fetch different types of stories (top, new, ask, show, jobs)
  • Get structured data including titles, URLs, points, authors, timestamps, and comment counts
  • Configurable limit on number of stories returned
  • Clean error handling and validation

Installation

  1. Clone the repository:
git clone https://github.com/pskill9/hn-server
cd hn-server
  1. Install dependencies:
npm install
  1. Build the server:
npm run build
  1. Add to your MCP settings configuration file (location depends on your system):

For VSCode Claude extension:

{
  "mcpServers": {
    "hacker-news": {
      "command": "node",
      "args": ["/path/to/hn-server/build/index.js"]
    }
  }
}

Usage

The server provides a tool called get_stories that can be used to fetch stories from Hacker News.

Tool: get_stories

Parameters:

  • type (string): Type of stories to fetch
    • Options: ‘top’, ‘new’, ‘ask’, ‘show’, ‘jobs’
    • Default: ‘top’
  • limit (number): Number of stories to return
    • Range: 1-30
    • Default: 10

Example usage:

use_mcp_tool with:
server_name: "hacker-news"
tool_name: "get_stories"
arguments: {
  "type": "top",
  "limit": 5
}

Sample output:

[
  {
    "title": "Example Story Title",
    "url": "https://example.com/story",
    "points": 100,
    "author": "username",
    "time": "2024-12-28T00:03:05",
    "commentCount": 50,
    "rank": 1
  },
  // ... more stories
]

Integrating with Claude

To use this MCP server with Claude, you’ll need to:

  1. Have the Claude desktop app or VSCode Claude extension installed
  2. Configure the MCP server in your settings
  3. Use Claude’s natural language interface to interact with Hacker News

Configuration

For the Claude desktop app, add the server configuration to:

// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "hacker-news": {
      "command": "node",
      "args": ["/path/to/hn-server/build/index.js"]
    }
  }
}

For the VSCode Claude extension, add to:

// VSCode Settings JSON
{
  "mcpServers": {
    "hacker-news": {
      "command": "node",
      "args": ["/path/to/hn-server/build/index.js"]
    }
  }
}

Example Interactions

Once configured, you can interact with Claude using natural language to fetch Hacker News stories. Examples:

  • “Show me the top 5 stories from Hacker News”
  • “What are the latest Ask HN posts?”
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "hacker-news": { "command": "node", "args": ["/path/to/hn-server/build/index.js"] } } }