Skip to content

decuma02/github-mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub MCP Server

A Model Context Protocol (MCP) server that provides an LLM agent with tools to read and write to GitHub repositories. Built for the Flipkart Grid 8.0 application.

Architecture Overview

This server uses the official Python mcp SDK (FastMCP) to establish a standardized JSON-RPC communication channel over stdio. It securely integrates with the GitHub API using PyGithub and enforces strict input validation via Pydantic.

sequenceDiagram
    participant LLM as LLM Client (e.g. Claude)
    participant MCP as FastMCP Server (Python)
    participant GitHub as GitHub API
    
    LLM->>MCP: Request tool call (e.g., search_issues)
    Note over MCP: Validates Inputs (Pydantic Schema)
    MCP->>GitHub: Authenticated REST API Call
    GitHub-->>MCP: Raw JSON Response
    Note over MCP: Formats and limits data (Context saving)
    MCP-->>LLM: JSON-RPC Tool Result
Loading

Setup & Testing

  1. Create a virtual environment and install dependencies:
    python -m venv venv
    .\venv\Scripts\activate
    pip install -r requirements.txt
  2. Create a .env file and add your GitHub Personal Access Token (PAT):
    GITHUB_TOKEN=github_pat_xxxx
  3. Test locally using the official MCP Inspector:
    .\start_inspector.bat

Available Tools

  • search_issues(repo, query): Search for open issues/PRs in a specific repository.
  • get_issue_details(repo, issue_number): Get the full body and latest 5 comments of a specific issue.
  • create_issue(repo, title, body): Create a new issue (requires write permissions). Strict validation enforces minimum character lengths.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors