MCP cover image
See in Github
2025-03-30

MCP服务器,具有用于接口的工具,并在GitHub上进行了讨论

1

Github Watches

0

Github Forks

0

Github Stars

GitHub MCP Server

A versatile and powerful server implementation of the Model Context Protocol (MCP), designed to seamlessly interact with GitHub repositories, issues, discussions, and beyond. This server enables efficient management, automation, and enhanced collaboration by providing a structured interface to query, update, and analyze GitHub data. With support for integrating custom workflows, handling repository metadata, and facilitating real-time interactions with issues and discussions, the MCP server empowers developers and teams to streamline their GitHub experience. Whether you're building tools, automating tasks, or exploring new ways to engage with GitHub's ecosystem, this server offers a robust foundation for your projects.

Overview

This MCP server provides a bridge between AI assistants and the GitHub API, allowing AI models to perform actions like:

  • Searching repositories
  • Viewing discussions
  • Analyzing repository activity
  • Fetching repository statistics

Features

  • Repository Management: Search, analyze, and interact with GitHub repositories
  • Discussion Integration: Analyze GitHub Discussions
  • Activity Analysis: Get insights on repository activity and contributions
  • Search Capabilities: Advanced search for repositories, code, and discussions

Installation

Prerequisites

  • Python 3.8+
  • GitHub Personal Access Token with appropriate permissions

Setup

  1. Clone the repository:

    git clone https://github.com/jasona7/mcp_github_discussions.git
    cd mcp_github_discussions
    
  2. Install dependencies:

    pip install requests
    
  3. Set up your GitHub token in the environment variable:

    export GITHUB_TOKEN=your_github_personal_access_token
    

Usage

Starting the Server

Run the server with:

python scripts/mcp/github/mcp_github_server.py

The server will start on localhost:8004 by default.

Available Tools

The server provides the following tools:

  • search_repositories: Search for repositories based on various criteria
  • get_repository_details: Get detailed information about a repository
  • get_repository_issues: Fetch issues from a repository
  • get_repository_discussions: Fetch discussions from a repository
  • get_top_repos_by_activity: Get trending repositories by activity

Configuration

The server can be configured using environment variables:

  • GITHUB_TOKEN: Your GitHub Personal Access Token
  • MCP_HOST: Host to bind the server to (default: localhost)
  • MCP_PORT: Port to bind the server to (default: 8004)

Using the Client

python scripts/mcp/github/mcp_github_client.py
╭──────────────────────────────── GitHub Discussions Explorer ────────────────────────────────╮
│ MCP GitHub Discussions Explorer                                                             │
│ A terminal UI for interacting with GitHub Discussions                                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
Connecting to server...
Connected to server. 5 tools available.

Available Actions:
1. Browse Top Repositories
2. List Discussions (by repo)
3. Get Discussion Details
4. Check Server Status
5. Exit
6. Toggle Debug Mode
Enter the number of the action you want to perform [1/2/3/4/5/6] (1): 1

Browse Top Repositories:
1. Top Repos by Recent Activity
2. Top Repos by Star Count
3. Top Python Repos
4. Top JavaScript Repos
5. Top AI/LLM Repos
6. Back to Main Menu
Select repository category [1/2/3/4/5/6] (1): 3
Number of repositories to show (10): 3
Finding top Python repositories...
                             Top Repositories (3)                             
┏━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ # ┃ Repository                       ┃ Stars  ┃ Language ┃ Has Discussions ┃
┡━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ 1 │ public-apis/public-apis          │ 334406 │ Python   │ ✗               │
│ 2 │ donnemartin/system-design-primer │ 294897 │ Python   │ ✗               │
│ 3 │ vinta/awesome-python             │ 238668 │ Python   │ ✗               │
└───┴──────────────────────────────────┴────────┴──────────┴─────────────────┘
None of the repositories have discussions enabled.

Available Actions:
1. Browse Top Repositories
2. List Discussions (by repo)
3. Get Discussion Details
4. Check Server Status
5. Exit
6. Toggle Debug Mode
Enter the number of the action you want to perform [1/2/3/4/5/6] (1): 

Troubleshooting

  • Connection Refused: Make sure the server is running and the port is not blocked by a firewall
  • Authentication Errors: Verify your GitHub token has the necessary permissions
  • Rate Limiting: GitHub API has rate limits; the server will handle these but may slow down during heavy usage

License

MIT License - see the LICENSE file for details

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

    Reviews

    4 (1)
    Avatar
    user_7oP89YJs
    2025-04-17

    As a loyal user of mcp_github_discussions by jasona7, I absolutely love how it enhances GitHub's discussion capabilities. The seamless integration and user-friendly interface make managing and participating in discussions a breeze. Highly recommend it for anyone looking to improve their GitHub experience! Check it out at https://github.com/jasona7/mcp_github_discussions.