hn-mcp-server
About
Hacker News feeds and search
Details
- Transport
- SSE
Explore
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
hn-mcp-serverCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
hn_get_stories
Fetch stories from an HN feed (top, new, best, ask, show, jobs), with title, URL, score, author, and comment count for each story.
hn_get_thread
Get an item and its comment tree as a threaded discussion, with child comments resolved recursively. Use depth 0 for an item-only lookup.
hn_get_user
Get an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.
hn_search_content
Search Hacker News stories and comments via Algolia. Filterable by content type, author, date range, and minimum points.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"hn-mcp-server": {
"server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/hn-mcp-server",
"run",
"start:stdio"
],
"env": {
"HN_CONCURRENCY_LIMIT": "",
"MCP_LOG_LEVEL": ""
}
}
}
}
}
McpServers
{
"server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/hn-mcp-server",
"run",
"start:stdio"
],
"env": {
"HN_CONCURRENCY_LIMIT": "",
"MCP_LOG_LEVEL": ""
}
}
}
Transport
"stdio"
Package
"@cyanheads/hn-mcp-server"
Registry
"npm"
Public Hosted Server:https://hn.caseyjhand.com/mcp
Four read-only tools for accessing Hacker News data:
Fetch stories from any HN feed with pagination support.
- Six feed types:top,new,best,ask,show,jobs
- Configurable count (1–100, default 30) and offset for pagination
- Returns enriched story objects with title, URL, score, author, comment count, and body text
Retrieve an item and its full comment tree via ranked breadth-first traversal.
- Depth control (0–10, default 3) — depth 0 doubles as a single-item lookup
- Comment limit (1–200, default 50) caps total comments across all levels
- Breadth-first traversal preserves HN's ranking order
- Flat comment list withdepth/parentIdfor tree reconstruction
Fetch a user profile with optional submission resolution.
- Profile includes karma, creation date, and about text (HTML stripped)
- Optionally resolves submissions into full items, up to 50 per page
- submissionOffsetpages through a long history; enrichment echoes the applied offset and the offset to request next
- Submission resolution filters out dead/deleted items
Full-text search via the Algolia HN Search API.
- Filter by content type:story,comment,ask_hn,show_hn,front_page
- Filter by author, date range (ISO 8601), and minimum points
- Sort by relevance or date
- Pagination with page/count controls
- view: "compact"drops the two body-text fields (text,highlights.text), which otherwise repeat a long comment twice per hit — pass a hit id tohn_get_threadto read the body
- Declarative tool definitions — single file per tool, framework handles registration and validation
- Unified error handling across all tools
- Structured logging with request correlation
- Runs locally (stdio/HTTP) from the same codebase
- Server-levelinstructionsorientation forwarded to LLM clients oninitialize— item types, ID reuse across tools, case-sensitive usernames, and field sparsity expectations
- Concurrent batch fetching with configurable parallelism for item resolution
- HTML entity decoding and tag stripping with code block and link preservation
- No API keys required — HN APIs are public
A public instance is available athttps://hn.caseyjhand.com/mcp— no installation required. Point any MCP client at it via Streamable HTTP:
{ "mcpServers": { "hn-mcp-server": { "type": "streamable-http", "url": "https://hn.caseyjhand.com/mcp" } } }
Add to your MCP client configuration file:
{ "mcpServers": { "hn-mcp-server": { "type": "stdio", "command": "bunx", "args": ["@cyanheads/hn-mcp-server@latest"], "env": { "MCP_TRANSPORT_TYPE": "stdio", "MCP_LOG_LEVEL": "info" } } } }
{ "mcpServers": { "hn-mcp-server": { "type": "stdio", "command": "npx", "args": ["-y", "@cyanheads/hn-mcp-server"], "env": { "MCP_TRANSPORT_TYPE": "stdio", "MCP_LOG_LEVEL": "info" } } } }
{ "mcpServers": { "hn-mcp-server": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/hn-mcp-server:latest" ] } } }
- Bun v1.3.0or higher (or Node.js >= 24)
git clone https://github.com/cyanheads/hn-mcp-server.git cd hn-mcp-server bun install
All configuration is via environment variables. No API keys required — HN APIs are public.
MCP_TRANSPORT_TYPE=stdio bun --watch src/index.ts # Dev mode (stdio, auto-reload) MCP_TRANSPORT_TYPE=http bun --watch src/index.ts # Dev mode (HTTP, auto-reload) bun run test # Run test suite bun run devcheck # Lint + format + typecheck + audit
bun run build bun run start:stdio # or start:http
docker build -t hn-mcp-server . docker run -p 3010:3010 hn-mcp-server
SeeCLAUDE.mdfor development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — notry/catchin tool logic
- Usectx.logfor request-scoped logging
- All tools are read-only — no auth scopes required
Issues and pull requests are welcome. Run checks before submitting:
Objective-driven deep research paid per request via MPP - free daily quick search (news/arXiv), quote-first paid cloud-browser research with cross-source reports. MCP Streamable HTTP, no API key.
About Free multi-engine MCP search server — 8 free engines (DDG, Sogou, Bing, Baidu, Wikipedia, Startpage, Yandex, Mojeek), waterfall progressive search, multi-source verification, content enrichment, news search, language auto-detection, rate limit exposure. Zero API keys needed. Self-hostable.
Hosted MCP server for the APITube News API: search articles from 500,000+ sources in 60+ languages, filtered by sentiment, entities, topics and source quality.
A search engine for AI applications, providing world knowledge from web pages and various content sources like weather, news, and images.
Fetches the latest news headlines from the Boring News API.
An MCP (Model Context Protocol) server that gives AI assistants real-time news fetching, search, NLP analysis, and personalized news preferences — all accessible through natural language.
Comprehensive web, news, and social media search and analysis using xAI's Grok API.
Fetch and interact with Hacker News content, including top stories, comments, and search functionality.
Search for stories, get user information, and interact with Hacker News.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


