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

gh-pull-data-retriever

A Model Context Protocol (MCP) service engineered to retrieve detailed commentary archives from GitHub Pull Request threads, encompassing file-specific context and nested reply structures, operating via authenticated interaction with the GitHub RESTful API endpoint.

Author

gh-pull-data-retriever logo

shaileshahuja

MIT License

Quick Info

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

Tags

githubapisapigithub apicomments githubgithub pull

GitHub PR Comments MCP Server

smithery badge

This is a Model Context Protocol (MCP) server that fetches GitHub Pull Request comments using a GitHub personal access token.

GitHub PR Comments Server MCP server

Core Capabilities

  • Retrieves PR feedback, including associated file locations, specific line number ranges, and hierarchical reply threads.
  • Leverages the Octokit library for secure communication with the GitHub API.
  • Implements the MCP server architecture using StdioServerTransport for inter-process communication.
  • Outputs retrieved conversational data in a strictly defined JSON schema.

Deployment Instructions

Automated Installation via Smithery

To deploy github-pr-mcp automatically for Claude Desktop utilizing Smithery:

bash npx -y @smithery/cli install github-pr-mcp --client claude

Manual Setup

  1. Clone the source repository.
  2. Install necessary Node dependencies:

npm install

  1. Establish a .env configuration file containing your authentication key:

GITHUB_TOKEN=your_github_token_here

Operational Execution

  1. Compile the project assets:

npm run build

  1. Initiate the server process:

npm start

Alternatively, execute directly specifying the token as an argument:

node dist/server.js your_github_token_here

  1. The running server exposes a callable function named get_pr_comments, which requires the following input parameters:
  2. owner: The repository maintainer's username or organization identifier.
  3. repo: The designated name of the repository.
  4. pull_number: The numerical identifier corresponding to the targeted Pull Request.

Integration with Cursor IDE

For integration within the Cursor environment, configure the MCP client using this command structure:

node /path/to/dist/server.js your_github_token_here

Ensure that /path/to reflects the actual directory location of your project, and substitute your_github_token_here with your valid GitHub Personal Access Token.

Verification Procedures

A bundled test client is provided to confirm the server's functional integrity:

  1. Compile the project assets:

npm run build

  1. Execute the integrated testing suite:

npm test

The test harness automatically launches the server, establishes a connection, and invokes get_pr_comments with pre-configured sample input data.

Output Structure Schema

The server serializes the retrieved commentary in the subsequent JSON format:

{ "comments": [ { "id": 123456789, "path": "src/example.js", "body": "This is a comment on a specific line", "line": 42, "start_line": 40, "user": { "login": "username" }, "created_at": "2023-01-01T00:00:00Z", "replies": [ { "id": 987654321, "body": "This is a reply to the comment", "user": { "login": "another-username" }, "created_at": "2023-01-02T00:00:00Z" } ] } ] }

Development Workflow

To initiate the server within a continuous development/watch mode:

npm run dev

Licensing Information

ISC

WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.

== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).

=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.

== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.

Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.

== Cross-domain requests ==

In the early development of the World Wide Web, it was found possible to brea

See Also

`