unofficial-HackerNews-MCP-CLI
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@unofficial-HackerNews-MCP-CLIshow me the top 5 HackerNews stories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
This project wraps the official HackerNews API behind a single shared async client and exposes it two ways:
hn, a Typer command-line client with Rich-formatted output.hn-mcp, a FastMCP server that exposes the same operations as MCP tools for Claude and other MCP clients.
The API is read-only, needs no authentication, and has no rate limit.
Install
Requires Python 3.10+ and uv.
uv sync # create the venv and install
uv run hn top # run the CLI without installing scripts
# or install the console scripts (hn, hn-mcp) into the environment:
uv pip install -e .Related MCP server: MCP Hacker News
CLI
hn top # front-page (top) stories
hn top --limit 10 # -n 10
hn new # newest stories
hn best # best recent stories
hn ask # latest Ask HN
hn show # latest Show HN
hn jobs # latest job postings
hn item 8863 # a single story/comment/job/poll
hn comments 8863 # threaded comment tree (--depth, --limit)
hn user pg # a user's profile (case-sensitive name)
hn max-item # id of the most recently created item
hn updates # recently changed items and profilesAdd --json to any command to get raw JSON instead of a table, which is handy
for scripting:
hn top -n 5 --json | jq -r '.[] | "\(.title) (\(.url // .hn_url))"'
hn user pg --json | jq .karmaRun hn --help for the full command list.
MCP server
Run over stdio, which is the transport MCP clients use by default:
hn-mcpOr over HTTP:
hn-mcp --http --host 127.0.0.1 --port 8000Register it with an MCP client such as Claude Desktop or Claude Code:
{
"mcpServers": {
"hackernews": { "command": "hn-mcp" }
}
}Tools
Tool | Description |
| A list of stories; |
| A single story, comment, job, or poll |
| Threaded comment tree |
| A user's public profile |
| Id of the most recently created item |
| Items and profiles that changed most recently |
Skill
skills/hackernews/SKILL.md is an agent skill that
teaches Claude how and when to use the hn CLI and MCP server.
Project layout
src/hn/
client.py # shared async HackerNews API client (httpx)
models.py # Pydantic models for items and users
server.py # FastMCP server (hn-mcp)
cli.py # Typer CLI (hn)
skills/hackernews/SKILL.md
tests/ # pytest + respx (mocked API)Development
uv run ruff check . # lint
uv run ruff format --check . # formatting
uv run pytest # test suite (API calls are mocked)CI runs lint, formatting, and the test suite on Python 3.10 through 3.13 via GitHub Actions. See CONTRIBUTING.md for the full workflow.
License
MIT. See LICENSE. This is an unofficial project and is not affiliated with Hacker News or Y Combinator.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Riddhimaan-Senapati/unofficial-HackerNews-MCP-CLI'
If you have feedback or need assistance with the MCP directory API, please join our Discord server