Plugs directly into Hacker News through both the Firebase API and Algolia's search endpoint. You get four tools: pull stories from any feed (top, new, best, ask, show, jobs) with pagination, fetch entire comment threads with configurable depth and breadth-first traversal, look up user profiles with their submission history, and run full-text searches across stories and comments with filters for date ranges, authors, and point thresholds. Built on the author's mcp-ts-core framework with concurrent batch fetching for item resolution. Runs locally via stdio or connects to a public hosted instance at hn.caseyjhand.com/mcp. No API keys needed since HN's APIs are public. Useful when you need to analyze discussions, track topics, or pull research material from HN without opening a browser.
Public tool metadata for what this MCP can expose to an agent.
hn_get_storiesFetch stories from an HN feed (top, new, best, ask, show, jobs). Returns enriched story objects with title, URL, score, author, and comment count.3 paramsFetch stories from an HN feed (top, new, best, ask, show, jobs). Returns enriched story objects with title, URL, score, author, and comment count.
feedstringtop · new · best · ask · show · jobscountnumberoffsetnumberhn_get_threadGet an item and its comment tree as a threaded discussion. Recursively resolves child comments. With depth 0, returns just the item — doubles as an item lookup.3 paramsGet an item and its comment tree as a threaded discussion. Recursively resolves child comments. With depth 0, returns just the item — doubles as an item lookup.
depthnumberitemIdnumbermaxCommentsnumberhn_get_userGet an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.3 paramsGet an HN user profile with karma, about, and optionally their most recent submissions resolved into full items.
usernamestringsubmissionCountnumberincludeSubmissionsbooleanhn_search_contentSearch Hacker News stories and comments via Algolia. Supports filtering by content type, author, date range, and minimum points.8 paramsSearch Hacker News stories and comments via Algolia. Supports filtering by content type, author, date range, and minimum points.
pagenumbersortstringrelevance · datedefault: relevancetagsstringstory · comment · ask_hn · show_hn · front_pagecountnumberquerystringauthorstringdateRangeobjectminPointsnumberBrowse Hacker News feeds, threads, and user profiles with full-text search via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://hn.caseyjhand.com/mcp
Four read-only tools for accessing Hacker News data:
| Tool Name | Description |
|---|---|
hn_get_stories | Fetch stories from an HN feed (top, new, best, ask, show, jobs) with pagination. |
hn_get_thread | Get an item and its comment tree as a threaded discussion with depth/count controls. |
hn_get_user | Fetch a user profile with karma, about, and optionally their recent submissions. |
hn_search_content | Search stories and comments via Algolia with type, author, date, and score filters. |
hn_get_storiesFetch stories from any HN feed with pagination support.
top, new, best, ask, show, jobshn_get_threadRetrieve an item and its full comment tree via ranked breadth-first traversal.
depth/parentId for tree reconstructionhn_get_userFetch a user profile with optional recent submission resolution.
hn_search_contentFull-text search via the Algolia HN Search API.
story, comment, ask_hn, show_hn, front_pageBuilt on @cyanheads/mcp-ts-core:
HN-specific:
instructions orientation forwarded to LLM clients on initialize — item types, ID reuse across tools, case-sensitive usernames, and field sparsity expectationsA public instance is available at https://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"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"hn-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/hn-mcp-server"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"hn-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/hn-mcp-server:latest"
]
}
}
}
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.
| Variable | Description | Default |
|---|---|---|
HN_CONCURRENCY_LIMIT | Max concurrent HTTP requests for batch item fetches (1–50). | 10 |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_HTTP_HOST | HTTP server host. | localhost |
MCP_LOG_LEVEL | Log level: debug, info, notice, warning, error. | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
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
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point. |
src/config/ | Server-specific env var parsing with Zod. |
src/services/hn/ | HN Firebase + Algolia API client and domain types. |
src/mcp-server/tools/definitions/ | Tool definitions (*.tool.ts). |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped loggingIssues and pull requests are welcome. Run checks before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
HN_CONCURRENCY_LIMITdefault: 10Max concurrent HTTP requests for batch item fetches (1–50).
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp