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

Installation

From PyPI (recommended)

pip install github-issue-parser-mcp

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:

For locally installed version:

python github_issue_parser.py

For PyPI installed version:

python -m github_issue_parser_mcp

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

build

python -m build

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-2.0.0.tar.gz (7.4 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-2.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: github_issue_parser_mcp-2.0.0.tar.gz
  • Upload date:
  • Size: 7.4 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-2.0.0.tar.gz
Algorithm Hash digest
SHA256 f1c268f06beba2ecd2de41991ffb4d1f54636018074434f1e04c3f26d926ceb0
MD5 1b857580fe13a05276869c7812155785
BLAKE2b-256 06223e9e0ed3059302a90237d7ce75ce89341f88fb43c5cd049b0a52e69aa02b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for github_issue_parser_mcp-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14a1d43a92d2f56f2f4abc0a4f2816f8cc62889b4ee997e718c28b105d26e60e
MD5 460d164e56ccc4c90ad1fc66fcd7e5d8
BLAKE2b-256 2c3b229a42ecc847c6101a51379e0c9fc85f4cc4aa59365356a4c438af4b62d4

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