Skip to main content
MCP server CX Codex

hn-mcp-server — Claude Code MCP server: use and install

Connects an AI agent to Hacker News feeds, discussions, profiles, and full-text search. Useful when research needs posts and comments in context.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http hn-mcp-server https://hn.caseyjhand.com/mcp
Open on GitHub

What hn-mcp-server does

hn-mcp-server gives an MCP client access to Hacker News content. It can pull ranked feeds such as top, new, best, ask, show, and jobs; read a comment thread; inspect a user profile; and search stories, comments, polls, or jobs. Search can combine keywords with type, author, parent story, date, or minimum-score filters.

The package exposes four tools: hn_get_stories, hn_get_thread, hn_get_user, and hn_search_content. It can run over STDIO or Streamable HTTP, and Claude Code can connect to the hosted endpoint at https://hn.caseyjhand.com/mcp. A local setup uses npx; its environment settings include values such as HN_CONCURRENCY_LIMIT and MCP_HTTP_PORT.

What it helps with

  • search Hacker News by keyword and filters
  • pull stories from a selected feed
  • read a complete discussion thread
  • inspect a user profile and submissions
  • compare posts by author, date, or score

Example prompts for the agent

  • Search Hacker News for MCP stories in the requested date range and apply a minimum score filter.
  • Open Hacker News item <itemId>, show its comment tree, and continue from the next page.
  • Look up the Hacker News profile for <username> and fetch recent submissions.

How to install hn-mcp-server

1Platform CLI: remote server

claude mcp add --transport http hn-mcp-server https://hn.caseyjhand.com/mcp

2Platform CLI

claude mcp add --env HN_CONCURRENCY_LIMIT=<HN_CONCURRENCY_LIMIT> --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> --env MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> --env MCP_HTTP_HOST=<MCP_HTTP_HOST> --env MCP_HTTP_PORT=<MCP_HTTP_PORT> --transport stdio hn-mcp-server -- npx -y @cyanheads/hn-mcp-server

Replace <…> with your own values. 2 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about hn-mcp-server

How do I install hn-mcp-server in Claude Code?

Run claude mcp add --transport http hn-mcp-server https://hn.caseyjhand.com/mcp.

What does hn-mcp-server do?

It exposes Hacker News feeds, threads, profiles, and content search to an MCP client. The search covers stories, comments, polls, and jobs.

Which connection methods does hn-mcp-server support?

The server supports STDIO and Streamable HTTP. Claude Code can use the hosted endpoint https://hn.caseyjhand.com/mcp, while a local setup runs through npx.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor