Skip to main content

An MCP server that parses GitHub issues and returns formatted plain text content

Project description

GitHub Issue Parser MCP Server

A Model Context Protocol (MCP) server that parses GitHub issues and returns formatted plain text content including comments and reactions.

Features

  • Parse GitHub issue URLs to extract structured content
  • Fetch issue details, comments, and reactions from GitHub API
  • Format output in clean, readable plain text
  • Support for multiple analysis types (summary, technical, priority)
  • Available as both tool and resource

Installation

Prerequisites

  • Python 3.8 or higher
  • uv package manager (recommended) or pip

Local Setup

  1. Clone the repository:
git clone https://github.com/Anionex/github-issue-parser-MCP-server.git
cd github-issue-parser-MCP-server
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
python github_issue_parser.py

Or use the provided batch file (Windows):

start.bat

Note: The server uses streamable-http transport mode for MCP communication.

Usage

As MCP Tool

The server provides a parse_github_issue tool that takes a GitHub issue URL and returns formatted content.

Example usage:

Tool: parse_github_issue
Input: {"issue_url": "https://github.com/owner/repo/issues/123"}

As MCP Resource

Access GitHub issues as resources using the github-issue:// URI scheme.

Example:

Resource: github-issue://https://github.com/owner/repo/issues/123

As MCP Prompt

Generate analysis prompts for GitHub issues with different analysis types.

Example:

Prompt: analyze_github_issue
Arguments: {
  "issue_url": "https://github.com/owner/repo/issues/123",
  "analysis_type": "technical"
}

Configuration for ModelScope

MCP Service Configuration

When submitting to ModelScope MCP广场, use the following configuration:

{
  "name": "GitHub Issue Parser",
  "description": "Parse GitHub issues and return formatted plain text content including comments and reactions",
  "author": "Your Name",
  "version": "1.0.0",
  "license": "MIT",
  "mcp": {
    "server": {
      "command": "uvx",
      "args": [
        "python",
        "github_issue_parser.py"
      ],
      "env": {
        "PYTHONPATH": "."
      },
      "transport": "streamable-http"
    }
  }
}

Environment Variables

The service doesn't require any special environment variables for basic usage. However, for GitHub API rate limiting, you may want to add:

{
  "env": {
    "GITHUB_TOKEN": "your_github_token_here"
  }
}

Dependencies

  • fastmcp>=0.1.0
  • requests>=2.28.0
  • beautifulsoup4>=4.11.0

API Endpoints

parse_github_issue

Parse a GitHub issue URL and return formatted content.

Parameters:

  • issue_url (string): GitHub issue URL

Returns: Formatted plain text containing:

  • Issue title and metadata
  • Description
  • Comments with reactions
  • Issue reactions

Example Output

Title: Feature Request: Add dark mode support
==================================================
Repository: ['owner', 'repo']
Issue #42
State: OPEN
Author: user123
Labels: enhancement, ui
Created: 2024-01-15T10:30:00Z
Updated: 2024-01-16T14:20:00Z

Description:
--------------------
It would be great to have dark mode support for the application...

Comments (2):
--------------------
Comment #1 by dev456 on 2024-01-15T11:00:00Z:
---------------
I agree this would be a useful feature...
Reactions: 2 people react 👍

Comment #2 by designer789 on 2024-01-15T12:30:00Z:
---------------
I can help with the UI design...
Reactions: 1 people react ❤️

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Support

For issues and questions, please open an issue in the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_issue_parser_mcp-1.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_issue_parser_mcp-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file github_issue_parser_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: github_issue_parser_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for github_issue_parser_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a6dbd400f36da5ea9148c64c9c723b835c2ebab9ac589e290568720bd45f1605
MD5 204dc633fb7fa93ff4e4066772e5efe3
BLAKE2b-256 8e19e66ca2b7304ebb76bc4a11241e3c9c82dc06c31a15900d03a75fd9e08b75

See more details on using hashes here.

File details

Details for the file github_issue_parser_mcp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for github_issue_parser_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e29214bdf55921e752737c37081949cb20622ce67f956a4bb00cc52eb21d9518
MD5 b64661dcfc5667b137640deeaacd6f7d
BLAKE2b-256 985271407b317fd130973b544cefb67ada3b0e6c2770fb74ba868956bc5af268

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page