news.ycombinator.com

Hacker News

by webmcp-today · v2 · updated 8/10/2026

*://news.ycombinator.com/*

Read Hacker News through its official public API, plus comment, vote, and submit as the logged-in user. Write tokens (hmac, vote auth, fnid) are extracted from HN's own HTML pages; a page-shape change fails loudly. Write tools require an active news.ycombinator.com login session.

What changed in v2: Adds official public API read tools: hn_get_item and hn_list_children. Existing writes use HTML token extraction and form/query targets.

This package also reads from https://hacker-news.firebaseio.com. No cookies or site credentials are included.

Checking for the extension…

Installing saves v2 in your browser, not on your account. The extension registers its tools whenever you're on a matching page, and you stay on v2 until you update.

Needs the extension in a supported Chrome or Brave browser; the WebMCP testing flag is only needed for Chrome's native agent, not for the bridge. Get the extension →

Tools (5)

  • hn_get_itemread-only

    Get a Hacker News story, comment, job, poll, or poll option by numeric ID through HN's official public API. Returns metadata, HTML text, direct child-comment IDs, and poll relationships when present.

    Show input schema and execution
    {
      "inputSchema": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "Numeric HN item ID, from an /item?id=... URL or another HN tool result"
          }
        },
        "required": [
          "itemId"
        ],
        "additionalProperties": false
      },
      "execution": {
        "mode": "api",
        "endpoint": "item"
      }
    }
  • hn_list_childrenread-only

    List the direct child comment IDs of a Hacker News story or comment, in HN display order. Call hn_get_item for each child to read it; an empty kids list means no direct replies.

    Show input schema and execution
    {
      "inputSchema": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "Numeric ID of the story or comment whose direct replies to list"
          }
        },
        "required": [
          "itemId"
        ],
        "additionalProperties": false
      },
      "execution": {
        "mode": "api",
        "endpoint": "children"
      }
    }
  • hn_comment

    Post a comment on a Hacker News story, or reply to a comment, as the logged-in user. The item ID is the number in /item?id=... URLs. A successful post returns the thread page HTML.

    Show input schema and execution
    {
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Comment body (plain text; blank lines split paragraphs, links auto-link)"
          },
          "itemId": {
            "type": "string",
            "description": "Numeric ID of the story or comment to reply to, from /item?id=..."
          }
        },
        "required": [
          "itemId",
          "text"
        ],
        "additionalProperties": false
      },
      "execution": {
        "mode": "api",
        "endpoint": "comment"
      }
    }
  • hn_vote

    Upvote (or retract an upvote on) a Hacker News story or comment, as the logged-in user. The item ID is the number in /item?id=... URLs. Fails loudly if the item is not votable (own post, expired, logged out).

    Show input schema and execution
    {
      "inputSchema": {
        "type": "object",
        "properties": {
          "how": {
            "type": "string",
            "description": "up = upvote, un = retract a previous upvote",
            "enum": [
              "up",
              "un"
            ]
          },
          "itemId": {
            "type": "string",
            "description": "Numeric ID of the story or comment to vote on, from /item?id=..."
          }
        },
        "required": [
          "itemId",
          "how"
        ],
        "additionalProperties": false
      },
      "execution": {
        "mode": "api",
        "endpoint": "vote"
      }
    }
  • hn_submit

    Submit a new story to Hacker News as the logged-in user: a link post (title + url) or a text post like Ask HN (title + text). Provide exactly one of url or text. Duplicate URLs are resubmitted to the existing thread by HN.

    Show input schema and execution
    {
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Link to submit; omit for a text post. Provide exactly one of url or text"
          },
          "text": {
            "type": "string",
            "description": "Body for a text post (Ask HN etc.); omit for a link post. Provide exactly one of url or text"
          },
          "title": {
            "type": "string",
            "description": "Submission title (HN limit: 80 chars)"
          }
        },
        "required": [
          "title"
        ],
        "additionalProperties": false
      },
      "execution": {
        "mode": "api",
        "endpoint": "submit"
      }
    }