Skip to main content
Glama
ds231

GitHub MCP Server

by ds231

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.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ds231/MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server