Hacker News API and MCP server Let your AI agent read what you saved on Hacker News.

Your upvoted, hidden and favorite items and your comment threads on Hacker News. Use it in ChatGPT, Claude or any AI agent over MCP, or in n8n, Make and scripts over REST.

  • Free 7-day trial, no card
  • Unofficial, not affiliated with Hacker News or Y Combinator
Hacker News logo Hacker News Cloud Browser

9 tools Reads, two private writes

Reading jobs only

What can you automate in Hacker News? Use an AI agent, a workflow or a script.

  • Digest the stories you upvoted

  • Spot new replies to your comments

  • Group your favorites by topic

  • See how your submissions did

  • Hide stories you are done with

  • Read a thread two levels deep

Public reads only

Does Hacker News have an MCP server or an API? An API for public data, no MCP server.

Hacker News has an official API, but it is public and read-only, and there is no official MCP server (checked 28 Oct 2026). For public stories and comments you do not need Cotlet. The 9 Cotlet tools cover what sits behind your login: upvoted and hidden items, your favorites, favorite and hide.

  • The Firebase API at hacker-news.firebaseio.com/v0 returns items, users and the story lists with no key and "currently no rate limit". It has no write calls and nothing private.
  • HN Search by Algolia adds full-text search, also without a key, capped at 10,000 requests an hour per IP. n8n's Hacker News node and the GitHub servers read the same public data.
  • Your upvoted and hidden lists exist only on pages you see when logged in. Favorites are a public page that neither API returns.
Hacker News official API, a GitHub MCP server and Cotlet compared
What you need Firebase + Algolia APIGitHub MCP serverCotlet
Public stories, comments and search Yes, free Yes, free Items only, no search
Your upvoted and hidden items No No Yes, as you
Your favorites No No Stories and comments
Favorite or hide an item No No Yes, undo with one call
Upvote, comment or submit No No No, on purpose

Checked 28 Oct 2026. Sources: Hacker News API (Y Combinator, GitHub) · Hacker News Search API (Algolia) · Hacker News Guidelines · Hacker News FAQ · n8n Hacker News node · Y Combinator Terms of Use

Set up once

How does Cotlet connect to Hacker News? One account, two ways to connect.

  1. 1Sign in to Hacker News

    Use your own account in its Cotlet Cloud Browser.

  2. 2Choose MCP or REST

    Connect your agent or create a Cotlet API key.

  3. 3Run your workflow

    Ask your agent or send an HTTP request.

We never keep your Hacker News password, and no tool can vote, comment or submit in your name. Who can see your session

Any MCP client

Connect Hacker News to your agent or workflow

Use MCP with your AI agent, or HTTP requests in n8n, Make, Zapier and scripts. Follow the MCP setup below or jump to the REST guide.

  1. 1

    Enable Hacker News for agents. Create a Cotlet account, log in to Hacker News in its Cloud Browser and press Enable for agents.

  2. 2

    Add the Cotlet address. Put https://cotlet.dev/mcp/v1 in your agent as an MCP server or custom connector.

  3. 3

    Confirm who you are. Chat apps send you through a Cotlet sign-in. Editors, n8n and scripts take an API key from the console.

Hacker News shares https://cotlet.dev/mcp/v1 with every other app you enable. Turned Hacker News on after you connected? Refresh the connector and its 9 tools appear.

Claude
Settings > Connectors > Add custom connector
URL: https://cotlet.dev/mcp/v1/connect

Claude Code:
claude mcp add --transport http cotlet-hacker-news \
  https://cotlet.dev/mcp/v1 \
  --header "Authorization: Bearer $COTLET_API_KEY"
ChatGPT
Settings > Apps & Connectors > Create
MCP server URL: https://cotlet.dev/mcp/v1/connect
Authentication: OAuth
Cursor
// ~/.cursor/mcp.json
{
  "mcpServers": {
    "cotlet-hacker-news": {
      "url": "https://cotlet.dev/mcp/v1",
      "headers": { "Authorization": "Bearer ${env:COTLET_API_KEY}" }
    }
  }
}
Codex
# ~/.codex/config.toml
[mcp_servers.cotlet-hacker-news]
url = "https://cotlet.dev/mcp/v1"
bearer_token_env_var = "COTLET_API_KEY"
n8n
MCP Client Tool (inside an AI Agent)
Transport: HTTP Streamable
URL: https://cotlet.dev/mcp/v1
Auth: Bearer, <your key>
Tool: hacker_news_read
Make, Zapier
Make: MCP Client > Call a tool
Zapier: MCP Client by Zapier > Run Tool
Server URL: https://cotlet.dev/mcp/v1
Token: <your key>
Tool: hacker_news_write
Scripts and HTTP

How to use the Hacker News REST API

Create your Cotlet API key

Create a Cotlet API key with access to Hacker News and its read operations. Store it as COTLET_API_KEY in your environment or automation platform's credential store.

Connect Hacker News in Cotlet and enable it for agents. Account access: Your own Hacker News account (any account; upvoted and hidden lists are private to you).

Make your first Hacker News API request

REST
curl https://cotlet.dev/api/v1/hacker-news/my-profile \
  -H "Authorization: Bearer $COTLET_API_KEY"

Read my profile and apply the operation limits

A successful REST call puts the tool output in result. This illustrative response excerpt omits call IDs, messages and credit details.

Illustrative response excerpt
{
  "status": "success",
  "app": "hacker-news",
  "tool": "get_my_profile",
  "result": {
    "username": "maya_dev",
    "karma": 1284,
    "created": "2019-03-14",
    "about": "Building small tools."
  }
}

Returns the account behind the Cloud Browser session. It is the call to make first to check that the session is signed in and which username the other tools act for.

Keep the same selection when continuing a list. Compare changed record values as well as identifiers when refreshing your destination.

Hacker News workflows for agents and automations

Hacker News workflows you configure
ToolConnect throughExample workflow
n8nHTTP RequestList the stories or comments you added to your favorites. Use list_favorites in your configured workspace report.
MakeHTTP > Make a requestList your comments with the thread each one belongs to. Use list_my_comments in your configured workspace report.
Python or Node.jsREST APIList the stories you submitted, with points and comment counts. Use list_my_submissions in your configured workspace report.

Send Authorization: Bearer <your Cotlet API key> in request headers. You configure the schedule, destination and record comparisons.

Cotlet reads Hacker News; your workflow steps write to your chosen destination. These HTTP workflows do not require a native Cotlet connector or a prebuilt template.

Python and Node.js can use the same HTTP requests without an AI agent. Keep access keys in credentials, outside shared workflow exports.

The API and MCP reference lists operations and inputs. The REST API guide explains authentication, errors and approvals.

7 read, 2 write

Hacker News API endpoints and MCP tools

Your upvoted, hidden and favorite lists3

Upvoted and hidden are visible to you alone; favorites are public on your profile. One page of the list per call, in the order Hacker News shows it.

  • list_upvoted_items List what you upvoted: stories by default, comments with comments set to true. read

    Returns the items of your upvoted page in the order Hacker News shows them, one page per call, with a next_page number while more pages exist. Only you can see this list, so it needs your session.

    MCP callhacker_news_read → list_upvoted_items

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/upvoted-items

    Parameters

    Parameters: list_upvoted_items
    NameTypeDescription
    comments boolean boolean true lists upvoted comments instead of stories. Default false
    page integer integer Page of the list, starting at 1. Default 1

    Example response

    {
      "items": [
        {
          "id": 45012345,
          "title": "Show HN: A tiny SQLite sync engine",
          "site": "example.dev",
          "points": 412,
          "comments": 96,
          "by": "quillmark",
          "age": "2 days ago"
        },
        {
          "id": 45009876,
          "title": "Why we left our message queue",
          "site": "example.org",
          "points": 188,
          "comments": 54,
          "by": "denny_ro",
          "age": "3 days ago"
        },
        {
          "id": 45003210,
          "title": "Notes on running Postgres at small scale",
          "site": "example.net",
          "points": 97,
          "comments": 31,
          "by": "lukasz_k",
          "age": "5 days ago"
        }
      ],
      "next_page": 2
    }
  • list_hidden_items List the stories you hid from your own view. read

    Returns your hidden page in Hacker News order, one page per call. Hiding removes a submission from your personal view only; others still see it. The list is private to you.

    MCP callhacker_news_read → list_hidden_items

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/hidden-items

    Parameters

    Parameters: list_hidden_items
    NameTypeDescription
    page integer integer Page of the list, starting at 1. Default 1

    Example response

    {
      "items": [
        {
          "id": 45001111,
          "title": "Ten rules for better standups",
          "site": "example.com",
          "points": 63,
          "comments": 12,
          "by": "ana_pl",
          "age": "6 days ago"
        }
      ],
      "next_page": null
    }
  • list_favorites List the stories or comments you added to your favorites. read

    Returns your favorites in the order Hacker News shows them, one page per call. Favorites are the list you build with the favorite link on an item page. The list is public on Hacker News, and this tool reads it through your session.

    MCP callhacker_news_read → list_favorites

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/favorites

    Parameters

    Parameters: list_favorites
    NameTypeDescription
    comments boolean boolean true lists favorite comments instead of stories. Default false
    page integer integer Page of the list, starting at 1. Default 1

    Example response

    {
      "items": [
        {
          "id": 44998877,
          "title": "The cost of a cold start",
          "site": "example.dev",
          "points": 240,
          "comments": 73,
          "by": "ivo_b",
          "age": "1 week ago"
        }
      ],
      "next_page": null
    }

Your profile, comments, submissions and threads4

Public on Hacker News, but read as you: one call gives reply counts, points and whether an item is in your favorites.

  • get_my_profile Read the signed-in account: username, karma, age and the about text. read

    Returns the account behind the Cloud Browser session. It is the call to make first to check that the session is signed in and which username the other tools act for.

    MCP callhacker_news_read → get_my_profile

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/my-profile

    Parameters

    No parameters.

    Example response

    {
      "username": "maya_dev",
      "karma": 1284,
      "created": "2019-03-14",
      "about": "Building small tools."
    }
  • list_my_comments List your comments with the thread each one belongs to. read

    Returns your comments newest first, each with the story it sits under and a reply_count. Use get_item on a comment id to read the replies.

    MCP callhacker_news_read → list_my_comments

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/my-comments

    Parameters

    Parameters: list_my_comments
    NameTypeDescription
    page integer integer Page of the list, starting at 1. Default 1

    Example response

    {
      "items": [
        {
          "id": 45013001,
          "story_id": 45012345,
          "story_title": "Show HN: A tiny SQLite sync engine",
          "text": "We tried the same approach and hit clock skew first.",
          "reply_count": 2,
          "age": "5 hours ago"
        }
      ],
      "next_page": null
    }
  • list_my_submissions List the stories you submitted, with points and comment counts. read

    Returns your submitted page newest first, one page per call. Each row has the points and the comment count at the time of the call, so run it again later to see how a post moved.

    MCP callhacker_news_read → list_my_submissions

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/my-submissions

    Parameters

    Parameters: list_my_submissions
    NameTypeDescription
    page integer integer Page of the list, starting at 1. Default 1

    Example response

    {
      "items": [
        {
          "id": 44990001,
          "title": "Show HN: A tiny SQLite sync engine",
          "site": "example.dev",
          "points": 412,
          "comments": 96,
          "by": "maya_dev",
          "age": "2 weeks ago"
        }
      ],
      "next_page": null
    }
  • get_item Read one story, comment or poll with its comment tree. read

    Returns the item and its replies in the ranked order Hacker News shows. Signed in, it also tells you whether the item is in your favorites.

    MCP callhacker_news_read → get_item

    REST endpointGET https://cotlet.dev/api/v1/hacker-news/item

    Parameters

    Parameters: get_item
    NameTypeDescription
    id integer required integer Item id, the number after id= in the item URL
    depth integer integer How many levels of replies to return. Default 2

    Example input

    {
      "id": 1
    }

    Example response

    {
      "id": 45012345,
      "type": "story",
      "title": "Show HN: A tiny SQLite sync engine",
      "by": "quillmark",
      "points": 412,
      "comment_count": 96,
      "favorited": false,
      "comments": [
        {
          "id": 45012900,
          "by": "denny_ro",
          "text": "How does it handle clock skew between devices?",
          "replies": [
            {
              "id": 45013001,
              "by": "maya_dev",
              "text": "We tried the same approach and hit clock skew first.",
              "replies": []
            }
          ]
        }
      ]
    }

Favorite and hide2

Both change only your own view and the same tool undoes them. Nothing here votes, flags, vouches or posts.

  • favorite_item Add a story or comment to your favorites, or remove it with favorite set to false. write

    Changes only your own favorites list. It reaches nobody and one call undoes it, so it does not wait for your OK. It does not vote on the item.

    MCP callhacker_news_write → favorite_item

    REST endpointPOST https://cotlet.dev/api/v1/hacker-news/item/favorite

    Parameters

    Parameters: favorite_item
    NameTypeDescription
    id integer required integer Item id
    favorite boolean boolean false removes it from your favorites. Default true

    Example input

    {
      "id": 45012345,
      "favorite": true
    }

    Example response

    {
      "id": 45012345,
      "favorited": true
    }
  • hide_item Hide a story from your own view, or show it again with hide set to false. write

    Hacker News removes a hidden submission from your personal view only; others still see it. It reaches nobody and one call undoes it, so it does not wait for your OK.

    MCP callhacker_news_write → hide_item

    REST endpointPOST https://cotlet.dev/api/v1/hacker-news/item/hide

    Parameters

    Parameters: hide_item
    NameTypeDescription
    id integer required integer Story id
    hide boolean boolean false shows the story again. Default true

    Example input

    {
      "id": 1
    }

    Example response

    {
      "id": 45001111,
      "hidden": true
    }
Encrypted, revocable

Who can see my Hacker News session, and how do I revoke it?

  • What we store

    Your logged-in Hacker News profile, AES-256-GCM, in Finland. Not your password.

  • What your agent gets

    The 9 Hacker News tools, never the session cookie.

  • What the session sees

    Your account: upvoted and hidden lists, favorites, threads, karma.

  • What no tool touches

    Votes, flags, vouches, comments, submissions, profile and password.

  • If Hacker News logs you out

    You get an email with a link to log in again. We never type it for you.

  • How to cut access

    Disable for agents, reset the browser or delete the API key.

cotlet.dev scores A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory (live results). We have no SOC 2 report or third-party pentest yet.

Account risk

Is it against Hacker News's terms? Account safety The terms ban robots; the guidelines ban automated posts.

"In connection with your use of the Site you will not engage in or use any data mining, robots, scraping or similar data gathering or extraction methods."
Y Combinator Terms of Use, which cover Hacker News

The HN guidelines go further on posting: "please don't automate posting" and, since 12 Mar 2026, "Don't post generated text or AI-edited text." That is why Cotlet has no tool to upvote, comment or submit, and never will. Moderators do ban accounts for AI-written comments. We found no public case of a ban for reading your own lists or for favoriting and hiding (checked 28 Oct 2026). Reading through any tool is still automation under the terms above.

How we keep your account looking like you

  • Your own account, logged in by you
  • No votes, comments, submissions or flags, ever
  • One list page per call, no crawling of the site
  • You finish the login yourself
  • If Hacker News objects, we pause the Hacker News tools for everyone within 24 h

The FAQ says an IP that requests many pages quickly may get banned, and the terms forbid getting round a block with another IP. Read a long upvote history over a few days, not in one go.

Tested every 12 h

What happens when Hacker News changes? We fix the tool; your prompts stay the same.

between tests of the Hacker News tools
12 h
for a call to a Hacker News tool paused for repair
$0

Hacker News changes its pages rarely, but a new field on the upvoted page or a moved hide link would break a tool that reads them. The repair happens on our side. status.cotlet.dev watches the site, console and API every 3 minutes.

Nothing to approve

Approvals, undo and mistakes No tool reaches other people.

  1. 01 Reads your upvotes Your upvoted page, 30 stories at a time.
  2. 02 Opens each thread Top comments two levels deep, in ranked order.
  3. 03 Writes your digest Two lines per story, in your chat, not on Hacker News.
  4. 04 Files the keepers Favorites the stories you pick, one call each.
Which Hacker News actions can be undone
ActionUndo
Favorite an itemYes, favorite_item with favorite false
Hide a storyYes, hide_item with hide false
Upvote, comment, submitNo tool does these

None of the 9 tools waits for your OK. The 2 writes change only your own favorites and hidden list, other readers see no difference, and one call reverses each. Enable Hacker News read only if you want no writes at all.

Favorites are public on your profile. Favoriting a story shows it there to anyone who looks.

MCP call
{
  "name": "favorite_item",
  "arguments": {
    "id": 45012345,
    "favorite": true
  }
}
REST
curl -X POST https://cotlet.dev/api/v1/hacker-news/item/favorite \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":45012345,"favorite":true}'
Response
{
  "id": 45012345,
  "favorited": true
}

Scripts and cron jobs call the same tools over REST at /api/v1/hacker-news, with the same key and price. An item id that does not exist fails, and a failed call costs nothing. The tools table lists the REST path of each tool.

Pay per call

How much does the Hacker News MCP server cost?

About $19 a monthfor a reader who checks replies daily and digests upvotes weekly, 3,320 credits. Hacker News itself is free.

A month of Hacker News jobs for one active reader, in credits
JobCallsCredits
Check replies to my comments, daily3 × 30900
Digest of upvoted stories, weekly11 × 4440
Favorites sorted by topic, weekly6 × 4240
Favorite or hide what I picked, weekly5 × 4200
How my submissions did, monthly4 × 140
Cloud Browser, 30 days1,500
Total3,320
  • Free 7-day trial, no card
  • 10 credits per successful call, MCP or REST
  • 50 credits a day for the Cloud Browser
  • Public stories need no Cotlet: the official API is free

Hacker News publishes no per-user numbers, so the month is our example: about 10 upvotes a week, a few comments, a submission now and then. The Cloud Browser is close to half the bill; a weekly digest alone costs less. Dollars at the $29 pack rate.

Cotlet credit packs: price, credits and calls at 10 credits each
Credits Price, one time Calls at 10 credits Per 1,000 credits
5,000 $29 500 $5.80
15,000 $79 1,500 $5.27
32,000 $149 3,200 $4.66
60,000 $249 6,000 $4.15

Only successful calls use credits; failed calls and timeouts cost nothing. At a balance of 0 calls pause, never a surprise charge. Authenticate with the Authorization: Bearer header.

Other options

Hacker News MCP server on GitHub, n8n or hosted: which to use For public data, the free ones are enough.

Other Hacker News MCP servers and tools, checked 28 Oct 2026
OptionWhat it doesWhere it stops
erithwik/mcp-hnPython MCP server on the public API, 76 stars, MIT: front page, Ask and Show HN, threads, search, users.No login, so none of your lists. Last commit 14 Jul 2025.
pskill9/hn-server and about a dozen moreNode, Rust and Python servers, 10 to 40 stars, reading the public API or HN's HTML.Public data only, on your own computer.
sidoshi/karakeep-syncCopies your upvotes into Karakeep every day, 147 stars, MIT.Not an MCP server; your user cookie sits in its config; upvotes only.
Composio, MCPBundlesHosted MCP with 14 and 10 read tools on the Firebase and Algolia APIs.Public data only, no Hacker News login.
hnrss.org and the n8n Hacker News nodeRSS of anyone's favorites; n8n gets items, articles and users.Favorites feed has posts, not comments; n8n reads public data only.

For the front page, search and public threads, take a free GitHub server or Composio and skip Cotlet. To feed upvotes into a bookmark app, karakeep-sync does it with a cookie you manage. Pick Cotlet when your agent should read your upvoted, hidden and favorite lists and keep them in order without you running anything.

EU company, since 2019

Who runs Cotlet A company you can look up.

Behind Cotlet is Take Group sp. z o.o., a Polish software company in the EU (VAT PL6342984273) that has worked since 2019. Bart Krawczyk (Co-founder, CTO) and Jake Slugocki (Co-founder, SEO, sales and marketing) founded it. Questions about the Hacker News tools go to contact@cotlet.dev.

Hacker News API and MCP: questions

How do I get access?

Make a free account at https://cotlet.dev, open Hacker News under Integrations in the console and log in to Hacker News in its Cloud Browser. The trial starts with your first app, no card.

How do I connect Hacker News to ChatGPT or Claude?

Sign up at cotlet.dev, log in to Hacker News once in its Cloud Browser and add Cotlet to ChatGPT or Claude, following the steps in your console. No API key is needed. ChatGPT and Claude then work in your Hacker News account through Cotlet, in their phone apps too.

What can ChatGPT do in Hacker News?

With Cotlet, ChatGPT, Claude and other AI agents handle jobs like these in Hacker News: weekly digest of upvoted stories; track replies to my comments; turn upvotes into a reading list. You ask in plain words, and anything that reaches other people waits for your OK first.

Can the agent upvote, comment or submit on Hacker News?

No. Cotlet has no tool for these. The Hacker News guidelines say "please don't automate posting" and "don't post generated text or AI-edited text". The agent reads your lists and threads and keeps your favorites and hidden items in order; you write and vote yourself. See the guidelines in the sources.

Do I need a Hacker News account for the public stories?

No. Stories, comments and users are public through the official API, and a plain MCP server or script can read them without a login. Cotlet adds the lists that exist only behind your login: upvoted and hidden items, plus favorite and hide.

Can it search Hacker News?

No, there is no search tool. HN Search by Algolia does that for free without a key, up to 10,000 requests an hour per IP, and the free GitHub servers wrap it. Cotlet is for the lists behind your login.

Does Hacker News have webhooks?

No. The Firebase API can push changes to public items, but nothing tells an agent about a new reply to you or a change in your lists. Run your agent on a schedule, for example a daily list_my_comments pass.

Is the MCP server different from the REST API?

Only the way in differs. Both carry the same 9 tools, inputs and answers, with one API key and one price. Agents use MCP; scripts and HTTP steps use REST.

Is Cotlet affiliated with Hacker News?

No. Cotlet is independent and not affiliated with Hacker News or Y Combinator.

Can I use the Hacker News API without an AI agent?

Yes. Call Cotlet's REST API from a script or an HTTP step in n8n, Make or Zapier with your Cotlet key. MCP is the alternative for AI agents; you do not need to connect an agent to use REST.

Give your agent your Hacker News reading list.

Free 7-day trial with 2,000 credits, no card needed.