# Hacker News — how to use (mcp.ai)

Hacker News is a tech-focused news aggregator by Y Combinator, featuring user-submitted stories and discussions on startups, programming, and emerging trends

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_hackernews?ms=1781541840000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `hackernews_get_frontpage`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/hackernews`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/hackernews/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/hackernews/get/frontpage` — Get the frontpage posts of hacker news.
  - body: { min_points?: integer }
- `POST https://api.mcp.ai/api/hackernews/get/item/with/id` — Get a specific item from hacker news using its id. limits response size to prevent context overflow.
  - body: { item_id: string, max_depth?: integer, max_children?: integer, truncate_text?: boolean }
- `POST https://api.mcp.ai/api/hackernews/get/latest/posts` — Get the latest posts from hacker news based on optional filters. results can be limited using the size parameter.
  - body: { page?: integer, size?: integer, tags?: string[] }
- `POST https://api.mcp.ai/api/hackernews/get/todays/posts` — Get today's posts from hacker news.
  - body: { min_points?: integer }
- `POST https://api.mcp.ai/api/hackernews/get/user` — Get a specific user from hacker news using their username.
  - body: { username: string }
- `POST https://api.mcp.ai/api/hackernews/search/posts` — Get relevant posts from hacker news based on a full-text query and optional filters. results can be limited using the size parameter.
  - body: { page?: integer, size?: integer, tags?: string[], query: string }

## More
- Page: https://mcp.ai/hackernews
- Agent spec (llms.txt): https://mcp.ai/hackernews/llms.txt
- Postman collection: https://mcp.ai/hackernews/postman.json
