GitHub MCP Server

by ds231

360 downloads
Not rated
GitHub

About

GitHub MCP Server is a FastAPI server that implements the Model Context Protocol (MCP) for interacting with GitHub. It provides a RESTful API to retrieve repository details, list and create issues, and add comments. It is intended for developers who want to integrate GitHub…

Details

Author
ds231
Downloads
360
Categories
Developer Tools

- Implements the Model Context Protocol for GitHub interactions.
- Retrieve repository details by owner and repo name.
- List issues for a given repository.
- Create new issues in a repository.
- Add comments to existing issues.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name GitHub MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, create a virtual environment, install dependencies from requirements.txt, and set a GITHUB_TOKEN in a .env file. Start the server with uvicorn server:app --reload --port 8000. Use the provided HTTP endpoints to interact with GitHub repositories.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "github mcp server": {
            "mcp-server-ds231": {
                "command": "python",
                "args": [
                    "-m",
                    "venv",
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-ds231": {
        "command": "python",
        "args": [
            "-m",
            "venv",
            "venv"
        ]
    }
}

GitHub MCP Server

A FastAPI server implementing the Model Context Protocol for GitHub interactions.

Setup

1. Clone the repository
2. Create a virtual environment:

   python -m venv venv
source venv/bin/activate

3. Install dependencies:
   pip install -r requirements.txt

4. Create a .env file with your GitHub Personal Access Token:
   GITHUB_TOKEN=your_token_here

Usage

Start the server:

uvicorn server:app --reload --port 8000

API Endpoints

Get Repository Details

GET /repository/{owner}/{repo}

List Issues

GET /repository/{owner}/{repo}/issues

Create Issue

POST /repository/{owner}/{repo}/issues

Create Comment

POST /repository/{owner}/{repo}/issues/{issue_number}/comments

Error Handling

The server implements comprehensive error handling for all GitHub API interactions. Errors are logged and appropriate HTTP status codes are returned.

Type Hints

The codebase uses type hints throughout for better maintainability and IDE support.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.