Hacker News MCP server
Lets any AI agent that speaks MCP (Model Context Protocol) use Hacker News: 9 tools generated from the service's public API description (OpenAPI written by Remake from the public docs: https://github.com/HackerNews/API).
Install
npm install
npm test # a real MCP client starts the server, lists the tools and makes one safe call
Connect it to your agent
Claude Code
claude mcp add hacker-news -- node /absolute/path/to/hacker-news-mcp/server.js
Claude Desktop, Cursor, and other MCP clients: add this to the client's MCP config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"hacker-news": {
"command": "node",
"args": [
"/absolute/path/to/hacker-news-mcp/server.js"
]
}
}
}
Any agent or app that can launch an MCP server over stdio uses the same command: node server.js.
As an agent skill: copy skill/hacker-news/ into your agent's skills folder (for Claude Code: ~/.claude/skills/). It tells the agent when and how to use these tools.
Settings (environment variables)
| Variable | What |
|---|---|
HACKER_NEWS_BASE_URL | Use another base URL (default https://hacker-news.firebaseio.com) |
HACKER_NEWS_ALLOW_WRITES | 1 to allow tools that change data (0 of them). Off by default. |
Tools
| Tool | Method | What |
|---|---|---|
top_stories | GET /v0/topstories.json | IDs of the current top stories (up to 500) |
new_stories | GET /v0/newstories.json | IDs of the newest stories (up to 500) |
best_stories | GET /v0/beststories.json | IDs of the best stories |
ask_stories | GET /v0/askstories.json | IDs of the latest Ask HN stories |
show_stories | GET /v0/showstories.json | IDs of the latest Show HN stories |
job_stories | GET /v0/jobstories.json | IDs of the latest job posts |
get_item | GET /v0/item/{id}.json | A story, comment, job or poll by id |
get_user | GET /v0/user/{id}.json | A public user profile by username |
max_item | GET /v0/maxitem.json | The current largest item id |
Safety
- Calls only
hacker-news.firebaseio.com(plus hosts the API description names per operation). No other network access. - Read-only unless you switch writes on.
- Your keys are read from your environment at call time; nothing is stored or logged by this server.
- Follow Hacker News's terms: Public read-only API (MIT-licensed docs). Be gentle with request volume.
Built with Remake Plugboard from public documentation. Not affiliated with Hacker News.