I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

serveur HN
Hacker News MCP Server
3 years
Works with Finder
2
Github Watches
3
Github Forks
24
Github Stars
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
- Clone the repository:
git clone https://github.com/pskill9/hn-server
cd hn-server
- Install dependencies:
npm install
- Build the server:
npm run build
- 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:
- Have the Claude desktop app or VSCode Claude extension installed
- Configure the MCP server in your settings
- 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?"
- "Get me the top Show HN submissions from today"
Claude will automatically use the appropriate parameters to fetch the stories you want.
Story Object Structure
Each story object contains:
-
title
(string): The story title -
url
(string, optional): URL of the story (may be internal HN URL for text posts) -
points
(number): Number of upvotes -
author
(string): Username of the poster -
time
(string): Timestamp of when the story was posted -
commentCount
(number): Number of comments -
rank
(number): Position in the list
Development
The server is built using:
- TypeScript
- Model Context Protocol SDK
- Axios for HTTP requests
- Cheerio for HTML parsing
To modify the server:
- Make changes to
src/index.ts
- Rebuild:
npm run build
Error Handling
The server includes robust error handling for:
- Invalid story types
- Network failures
- HTML parsing errors
- Invalid parameter values
Errors are returned with appropriate error codes and descriptive messages.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - feel free to use this in your own projects.
相关推荐
Confidential guide on numerology and astrology, based of GG33 Public information
Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re
Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven
Advanced software engineer GPT that excels through nailing the basics.
Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.
Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX
Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.
Miroir dehttps: //github.com/suhail-ak-s/mcp-typeseense-server
本项目是一个钉钉 MCP (Protocole de connecteur de message) 服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。
La communauté du curseur et de la planche à voile, recherchez des règles et des MCP
Reviews

user_FlF6dVxj
I have been using GitHub Enterprise MCP Server from containerelic and it has significantly improved my development workflow. The integration is seamless and the server provides robust performance and security features. The link provided by MCP is incredibly user-friendly and the welcome messages make navigation a breeze. Highly recommend checking it out: https://mcp.so/server/github-enterprise-mcp/containerelic.