GitHub MCP Server

GitHub MCP Server

A Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.

Category
Visit Server

README

MCP-Inspector-v0.6.0

GitHub MCP Server

A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.

Features

  • Repository Search: Find GitHub repositories based on search queries
  • Issue Management: Get, create, and comment on issues
  • Pull Request Handling: View and manage pull requests
  • Repository Analysis: Get statistics and insights about repositories

Installation

Prerequisites

  • Python 3.8+
  • GitHub API token

Steps

  1. Clone this repository:

    git clone https://github.com/yourusername/github-mcp-server.git
    cd github-mcp-server
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set up your GitHub token as an environment variable:

    export GITHUB_TOKEN=your_github_token_here
    
  4. Run the server:

    python server.py
    

The server will start running on http://localhost:5000.

Usage

Endpoints

The MCP server provides the following endpoints:

  • GET /mcp/discover: Returns available operations and their parameters
  • POST /mcp/execute: Executes operations based on provided parameters

Example Requests

Discovery

curl -X GET http://localhost:5000/mcp/discover

Execute Repository Search

curl -X POST http://localhost:5000/mcp/execute \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "search_repositories",
    "parameters": {
      "query": "machine learning"
    }
  }'

Get Repository Issues

curl -X POST http://localhost:5000/mcp/execute \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "get_repo_issues",
    "parameters": {
      "owner": "openai",
      "repo": "whisper"
    }
  }'

Architecture

The server follows the Model Context Protocol specification to allow AI assistants to:

  1. Discover available operations
  2. Execute operations with appropriate parameters
  3. Process and return results in a structured format

Extending the Server

You can extend this server by:

  1. Adding new endpoints in the discover() function
  2. Implementing corresponding handler functions
  3. Updating the routing in the execute() function

Security Considerations

  • The server uses an API token for authentication with GitHub
  • Implement rate limiting to prevent abuse
  • Add input validation for all parameters
  • Consider implementing OAuth for more secure token management

Demo

See the demo video for a walkthrough of the server's capabilities.

License

MIT License

Contact

For questions or support, please open an issue on this repository.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured