logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hn-data-connector

Interface for obtaining Hacker News data (articles, discourse, user profiles) in real-time, facilitated by the Model Context Protocol for robust data exchange.

Author

hn-data-connector logo

devabdultech

MIT License

Quick Info

GitHub GitHub Stars 15
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisrequestshttpapis httphacker newshttp requests

Hacker News Data Interface via MCP

smithery badge Official Hacker News MCP Endpoint - Integrates extensive Hacker News functionality into Cursor, Claude, and compatible LLM environments. Enables retrieval of news items, conversational threads, user credential data, and structured searching via the Model Context Protocol.

Hacker News Server MCP server

Core Capabilities

  • Execute searches across articles and discussions leveraging Algolia's HN Search backend
  • Retrieve collections of items categorized by type (top, recent, favored, inquiries, announcements, employment postings)
  • Fetch specific articles complete with their associated comment hierarchies
  • Access nested discussion structures and user dialogue paths
  • Query detailed user profiles and historical submissions
  • Provide instantaneous access to current Hacker News information streams

Deployment Instructions

Integration within Claude Desktop

Incorporate the following configuration into your claude_desktop_config.json file:

{
  "mcpServers": {
    "hackernews": {
      "command": "npx",
      "args": ["-y", "@devabdultech/hn-mcp-server"]
    }
  }
}

Installation via Smithery

Automate the installation of the Hacker News MCP Server for use with Claude Desktop using Smithery:

npx -y @smithery/cli install @devabdultech/hn-mcp --client claude

Available Operations

  1. search
  2. Executes queries against Hacker News content (stories and comments) via Algolia's search service
  3. Parameters: * query (text): The search term to use * type (optional text): Constraint for results ('story' or 'comment') * page (optional integer): Index for result pagination * hitsPerPage (optional integer): Maximum results displayed per page (cap at 100)
  4. Output: A collection of matched story and comment records

  5. getStories

  6. Retrieves aggregated lists of news items based on predefined categories (top, new, best, ask, show, job)
  7. Parameters: * type (text): Category identifier ('top', 'new', 'best', 'ask', 'show', 'job') * limit (optional integer): Upper bound on the number of items returned (maximum 100)
  8. Output: An array containing story data structures

  9. getStoryWithComments

  10. Fetches a specific article and its entire associated comment structure
  11. Parameters: * id (numeric): Unique identifier of the story
  12. Output: Comprehensive story data interwoven with nested comment data

  13. getCommentTree

  14. Retrieves the complete hierarchical structure of comments pertaining to an item
  15. Parameters: * storyId (numeric): The ID corresponding to the parent story
  16. Output: A recursively structured representation of the comment threads

  17. getUser

  18. Queries and returns the profile details for a specified user account
  19. Parameters: * id (text): The user's unique handle
  20. Output: User profile attributes, including karma score, account creation date, and biographical text

  21. getUserSubmissions

  22. Retrieves all content posted by a user (both articles and comments)
  23. Parameters: * id (text): The identifier of the target user
  24. Output: A list comprising the user's submitted content

Development Contributions

  1. Duplicate the source repository
  2. Establish a dedicated feature branch
  3. Implement and commit your modifications
  4. Push the new branch to the remote origin
  5. Submit a formal Merge Request

Licensing

This MCP server is distributed under the stipulations of the MIT License. Refer to the LICENSE file for complete terms.

Overview

This MCP service is developed and maintained by devabdultech. It harnesses the official Hacker News data interface and the Algolia Search API to furnish comprehensive HN data access through the Model Context Protocol framework.

WIKIPEDIA: XMLHttpRequest (XHR) is an Application Programming Interface structured as a JavaScript object, designed to facilitate the transmission of HTTP requests between a web client and a remote server. Its methodology permits client-side applications to issue server queries subsequent to initial page loading and receive data back asynchronously. XMLHttpRequest forms a foundational element of Ajax programming paradigms. Before Ajax's adoption, server interaction relied primarily on standard hyperlink navigation and form submissions, frequently resulting in the complete replacement of the current view with a new one.

== Chronology == The foundational concept for XMLHttpRequest was formulated in the year 2000 by engineers working on Microsoft Outlook. This idea was subsequently embedded into the Internet Explorer 5 browser release (1999). Critically, the initial implementation did not utilize the 'XMLHttpRequest' identifier; instead, developers employed object instantiations such as ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). By the time Internet Explorer 7 launched (2006), standardized support for the 'XMLHttpRequest' identifier had become universal across all major browser engines. The XMLHttpRequest identifier is now widely recognized as the default standard across all principal browser environments, encompassing Mozilla's Gecko rendering engine (starting 2002), Safari version 1.2 (2004), and Opera version 8.0 (2005).

=== Formal Specifications === The World Wide Web Consortium (W3C) formally published a preliminary specification draft for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C issued the Working Draft Level 2 specification, which augmented the original functionality with methods for tracking operational progress, enabling cross-site resource fetching, and managing binary data streams. Towards the conclusion of 2011, the enhancements outlined in the Level 2 specification were officially merged back into the primary specification document. In late 2012, stewardship over the development process transitioned to the WHATWG, which currently maintains the evolving specification as a living document utilizing the Web IDL notation.

== Implementation == Generally, executing a server request utilizing XMLHttpRequest involves adhering to several sequential programming stages.

Instantiate an XMLHttpRequest object by invoking its constructor: Invoke the "open" method to define the request modality, pinpoint the target URI, and designate the operation as synchronous or asynchronous: If an asynchronous mode is chosen, establish an event handler function that will be invoked upon state transitions: Commence the data transmission process by calling the "send" method: Process state transitions within the designated event listener. Upon successful receipt of response data from the server, this data is typically stored in the "responseText" attribute. When the object completes processing the transaction, its status transitions to state 4, the terminal ("done") state. Beyond these fundamental steps, XMLHttpRequest offers numerous parameters for granular control over request transmission characteristics and response handling. Custom HTTP headers can be appended to the request to convey specific server instructions, and data can be uploaded to the server by supplying it as an argument to the "send" invocation. The resulting data stream can be parsed instantly from JSON format into an immediately usable JavaScript object, or processed incrementally as it arrives, circumventing the need to await the complete payload reception. Furthermore, requests can be halted prematurely or configured to time out if completion is not achieved within a specified duration.

== Inter-Domain Requests ==

See Also

`