hn mcp
Adds powerful Hacker News integration to LLM clients, allowing users to access stories, comments, user profiles, and search functionality through the Model Context Protocol.
Adds powerful Hacker News integration to LLM clients, allowing users to access stories, comments, user profiles, and search functionality through the Model Context Protocol.
Official Hacker News MCP Server - Adds powerful Hacker News integration to Cursor, Claude, and any other LLM clients. Access stories, comments, user profiles, and search functionality through the Model Context Protocol.
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"hackernews": {
"command": "npx",
"args": ["-y", "@devabdultech/hn-mcp-server"]
}
}
}
To install Hacker News MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @devabdultech/hn-mcp --client claude
search
query
(string): Search query
* type
(optional string): Filter by type ('story' or 'comment')
* page
(optional number): Page number for pagination
* hitsPerPage
(optional number): Results per page (max 100)Returns: Search results with stories and comments
getStories
type
(string): Type of stories to fetch ('top', 'new', 'best', 'ask', 'show', 'job')
* limit
(optional number): Number of stories to fetch (max 100)Returns: Array of story objects
getStoryWithComments
id
(number): Story IDReturns: Story details with nested comments
getCommentTree
storyId
(number): ID of the storyReturns: Hierarchical comment tree structure
getUser
id
(string): UsernameReturns: User profile details including karma, created date, and about text
getUserSubmissions
id
(string): UsernameThis MCP server is licensed under the MIT License. See the LICENSE file for details.
This MCP server is built and maintained by devabdultech. It uses the official Hacker News API and Algolia Search API to provide comprehensive access to Hacker News data through the Model Context Protocol.
[
{
"description": "Search for stories and comments on Hacker News",
"inputSchema": {
"properties": {
"hitsPerPage": {
"default": 20,
"description": "The number of results per page",
"type": "number"
},
"page": {
"default": 0,
"description": "The page number",
"type": "number"
},
"query": {
"description": "The search query",
"type": "string"
},
"type": {
"default": "all",
"description": "The type of content to search for",
"enum": [
"all",
"story",
"comment"
],
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
},
"name": "search"
},
{
"description": "Get a single story by ID",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the story",
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "getStory"
},
{
"description": "Get a story with its comments",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the story",
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "getStoryWithComments"
},
{
"description": "Get multiple stories by type (top, new, best, ask, show, job)",
"inputSchema": {
"properties": {
"limit": {
"default": 30,
"description": "The maximum number of stories to fetch",
"type": "number"
},
"type": {
"description": "The type of stories to fetch",
"enum": [
"top",
"new",
"best",
"ask",
"show",
"job"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"name": "getStories"
},
{
"description": "Get a single comment by ID",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the comment",
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "getComment"
},
{
"description": "Get comments for a story",
"inputSchema": {
"properties": {
"limit": {
"default": 30,
"description": "The maximum number of comments to fetch",
"type": "number"
},
"storyId": {
"description": "The ID of the story",
"type": "number"
}
},
"required": [
"storyId"
],
"type": "object"
},
"name": "getComments"
},
{
"description": "Get a comment tree for a story",
"inputSchema": {
"properties": {
"storyId": {
"description": "The ID of the story",
"type": "number"
}
},
"required": [
"storyId"
],
"type": "object"
},
"name": "getCommentTree"
},
{
"description": "Get a user profile by ID",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the user",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "getUser"
},
{
"description": "Get a User is submissions",
"inputSchema": {
"properties": {
"id": {
"description": "The ID of the user",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "getUserSubmissions"
}
]