Algolia HN Search MCP Server — 4 tools via DADL
contains code
The Algolia HN Search DADL turns Algolia HN Search's API into an MCP server that Claude, GPT or any MCP-compatible agent can consume directly. One YAML file declares all 4 tools — item, user, full-text — 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 Algolia HN Search feature area.
Source: Algolia HN Search API
Which Algolia HN Search endpoints are covered?
100% (4 of ~4 endpoints)
Focus: full-text search (relevance and date), item retrieval with comment trees, user profiles
Missing: none — full coverage of the Algolia HN Search API
How do you configure the Algolia HN Search DADL?
- No credentials required — the Algolia HN Search API is fully public
- No signup or API key needed
Completely public API — no authentication, no API keys. Two search endpoints: /search (relevance) and /search_by_date (chronological). Use tags and numericFilters for precise filtering. The /items endpoint returns full nested comment trees, unlike the Firebase API.
How do you install the Algolia HN Search MCP server with ToolMesh?
Add to your backends.yaml:
- name: algolia-hn-search
transport: rest
dadl: algolia-hn-search.dadl
url: "https://hn.algolia.com/api/v1"
Set the credential:
CREDENTIAL_ALGOLIA_HN_SEARCH_TOKEN=your-token-here What 4 tools does the Algolia HN Search DADL expose?
GET search Full-text search ranked by relevance (points, num_comments). Best for finding popular/relevant content. Returns hits with: objectID, title, url, author, points, num_comments, created_at, created_at_i, story_text, comment_text, _tags, _highlightResult. Also returns nbHits, page, nbPages, hitsPerPage at the top level.
GET search_by_date Full-text search ranked by date (newest first). Same parameters and response format as search, but results are sorted chronologically. Best for finding recent content or monitoring new submissions. Identical response fields to the search endpoint.
GET get_item Get an item by ID with its full nested comment tree. Unlike the Firebase API, this returns the complete children array with recursively nested comments already resolved. Each child has: id, created_at, author, text, points, children. The parent item also includes title, url, points, num_comments.
GET get_user Get a user profile by username. Returns: username, about (HTML bio), karma, created_at, avg, and other profile metadata. Username is case-sensitive.
What composite workflows does the Algolia HN Search DADL provide? ⚠ contains code
FN search_stories Search for stories only, returning a clean list with title, url, author, points, num_comments, and created_at. Convenience wrapper around search with tags=story. FN search_recent_comments Search for recent comments matching a query, sorted by date (newest first). Returns comment text, author, story title, and timestamps. FN get_front_page Get current HN front page stories with full details, sorted by relevance. Equivalent to browsing the HN homepage. FN search_distilled LLM-optimized search that strips all Algolia metadata cruft before returning results. Implements the _clean_hit() pattern from hn-pulse: raw Algolia hits are ~2 KB each due to _highlightResult, _snippetResult, _rankingInfo, _tags, and other index-internal fields. This composite reduces each hit to ~200 bytes — only data an LLM actually needs. Supports both relevance (sort=relevance) and recency (sort=date) ranking, and all content types via the tags parameter. Designed as the primary search primitive for LangGraph-style ReAct agents that combine this Algolia backend with the Firebase HN backend (hackernews.dadl) for live enrichment.
FN get_user_activity Get a user's recent stories and comments. Fetches the user profile and their most recent submissions of each type.