# Hacker News MCP Server — 10 tools via DADL

The Hacker News DADL turns Hacker News's API into an MCP server that Claude, GPT or any MCP-compatible agent can consume directly. One YAML file declares all 10 tools — job, story, ask, best, item, max, and more — and ToolMesh serves them at runtime. No Python boilerplate, no per-endpoint code, no separate MCP server process.

Below: the endpoint coverage matrix, a two-block ToolMesh setup, the full tool reference grouped by Hacker News feature area.

**Source:** [Hacker News API (Firebase)](https://github.com/HackerNews/API)

**Updated:** 2026-04-04

**Tags:** social-coding, crud, real-time, user-management, notifications, logging, auth:apikey

## Which Hacker News endpoints are covered?

**100%** (11 of ~11 endpoints).

**Focus:** items (stories, comments, polls, jobs), users, story feeds (top, new, best, ask, show, job), updates, max item ID

**Missing:** none — full coverage of the public Firebase API

*Last reviewed: 2026-04-04*

## How do you configure the Hacker News DADL?

1. No credentials required — the Hacker News API is fully public
2. No signup or API key needed

[Authentication docs](https://github.com/HackerNews/API)

*Completely public API — no authentication, no API keys, no rate limit headers. Be respectful with request volume. The API is backed by Firebase and returns JSON for all endpoints. Append .json to all paths. For real-time updates consider the Firebase SDK (Server-Sent Events) instead of polling.
*

## How do you install the Hacker News MCP server with ToolMesh?

Add to your `backends.yaml`:

```yaml
- name: hackernews
  transport: rest
  dadl: hackernews.dadl
  url: "https://hacker-news.firebaseio.com/v0"

```

Set the credential:

```
CREDENTIAL_HACKERNEWS_TOKEN=your-token-here
```

## What 10 tools does the Hacker News DADL expose?

- **GET** `get_item` — Get any item by ID. Items are polymorphic — the "type" field indicates whether it is a story, comment, job, poll, or pollopt. Returns null for non-existent IDs. Key fields: id, type, by, time, text, url, score, title, kids (child comment IDs), parent, descendants (total comment count for stories), deleted, dead.

- **GET** `get_user` — Get a user profile by username. Returns karma, creation date, about (HTML bio), and submitted (array of all item IDs the user has posted). Username is case-sensitive. Returns null for non-existent users.

- **GET** `get_top_stories` — Get up to 500 top story IDs, ordered by ranking on the HN front page. Returns an array of integer item IDs — call get_item for full details.

- **GET** `get_new_stories` — Get up to 500 newest story IDs, ordered by submission time (newest first). Returns an array of integer item IDs — call get_item for full details.

- **GET** `get_best_stories` — Get up to 500 best story IDs (all-time highest-voted recent stories). Returns an array of integer item IDs — call get_item for full details.

- **GET** `get_ask_stories` — Get up to 200 latest Ask HN story IDs. These are posts where users ask the HN community a question. Returns an array of integer item IDs.

- **GET** `get_show_stories` — Get up to 200 latest Show HN story IDs. These are posts where users showcase their projects to the HN community. Returns an array of integer item IDs.

- **GET** `get_job_stories` — Get up to 200 latest job posting IDs from the HN jobs board. Returns an array of integer item IDs.

- **GET** `get_max_item` — Get the current largest item ID. Useful for polling: fetch items between your last known ID and max ID to catch new submissions. Returns a single integer.

- **GET** `get_updates` — Get recently changed item IDs and user profiles. Returns an object with "items" (array of changed item IDs) and "profiles" (array of changed usernames). Useful for building a polling-based sync.


## What composite workflows does the Hacker News DADL provide?

- **FN** `get_top_stories_full` — Get the top N stories with full item details (default: 10). Fetches story IDs then resolves each to its full item object.
- **FN** `get_story_with_comments` — Get a story and its top-level comments resolved to full item objects. Returns the story with a 'comments' array containing the full comment items.
- **FN** `get_user_stories` — Get a user's most recent stories (not comments). Fetches the user profile, then resolves their most recent submitted items and filters to type=story. Scans 20 recent submissions to stay within the 50-call sandbox limit — users who mostly post comments may return fewer stories than the limit.

## Which DADLs are related to Hacker News?

- [Mastodon](https://www.dadl.ai/d/mastodon/) — Mastodon REST API — statuses, timelines, accounts, notifications, search, media, lists, polls, conversations, trends, filters, and instance info. Base URL must be set to the target Mastodon instance (e.g. https://mastodon.social).
- [Mempool](https://www.dadl.ai/d/mempool/) — mempool.space — Bitcoin block explorer, mempool visualizer, fee estimator, Lightning Network explorer, and transaction accelerator
- [Zulip](https://www.dadl.ai/d/zulip/) — Zulip REST API — messages, channels (streams), topics, users, user groups, subscriptions, reactions, drafts, scheduled messages, saved snippets, presence, real-time events, invitations, attachments, custom emoji, linkifiers, and server settings. Self-hosted or Zulip Cloud.
- [Alertmanager](https://www.dadl.ai/d/alertmanager/) — Prometheus Alertmanager API v2 -- alerts, silences, receivers, alert groups, status, and operational health
- [BookStack](https://www.dadl.ai/d/bookstack/) — BookStack wiki and documentation platform REST API -- shelves, books, chapters, pages (HTML/Markdown content), attachments, image gallery, comments, cross-entity search, exports (HTML/Markdown/PDF/ZIP), ZIP imports, users, roles, content permissions, recycle bin, audit log and tags. Hierarchy: shelves > books > chapters > pages.
- [Graylog](https://www.dadl.ai/d/graylog/) — Graylog REST API -- log search (Views/Search + legacy universal), streams, pipelines, inputs, alerts, events, dashboards, users, roles, sidecars, index management, and cluster administration. Targets Graylog 6.x.

---

**Canonical URL:** https://www.dadl.ai/d/hackernews/
**Raw DADL:** https://github.com/DunkelCloud/dadl-registry/blob/main/hackernews.dadl
