Skip to content

A light weight Model Context Protocol (MCP) Server built using FastMCP to enable Github related operations.

Notifications You must be signed in to change notification settings

mymadhavyadav07/Github-MCP-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 GitHub MCP Server

A lightweight Model Context Protocol (MCP) server built with FastMCP to expose and automate GitHub operations using LLM-compatible tools.


✨ Features

  • βš™οΈ GitHub API integration via MCP tools
  • πŸ€– LLM-friendly schema for interaction with AI agents
  • πŸ” Optional authentication support
  • 🧩 Easy to extend with new GitHub operations

πŸ”§ Supported GitHub Operations

This server currently supports the following GitHub features as callable MCP tools:

Tool Name Description
get_user_bio Retrieve bio of a user
get_github_files Recursively fetch all files and directories from a GitHub repo starting at 'path'
get_file_content Fetches the content of a file from a GitHub repository.
create_pull_request_with_branch Creates a new branch and then a pull request on GitHub
create_github_issue Creates an issue on a GitHub repository

βœ… More tools can be added easily by decorating a Python function with @mcp.tool().


πŸš€ Quickstart

  1. Clone the repository:

    git clone https://github.com/mymadhavyadav07/Github-MCP-server.git
    cd Github-MCP-Server
    
  2. Install dependencies:

    Using uv (recommended for Python 3.11+):

    uv venv
    uv pip install -r requirements.txt
    
  3. Configure Github Access Token:

    • Create a .env file and copy contents from .env.example to .env
    • Replace GITHUB_TOKEN with your own Github Access Token. You can generate one from here
    GITHUB_TOKEN = "<GITHUB_TOKEN>"
  4. Download and install Claude Desktop - Claude Desktop

  5. Install MCP Server in Claude:

    • Activate Virtual Environment:
    .venv\Scripts\activate
    • Now, finally install the MCP Server in Claude:
    uv run mcp install main.py
  6. Now you are all set to use this custom Github-MCP-Server in your Claude Desktop

πŸ™Œ Acknowledgments

FastMCP by @jlowin

GitHub REST API v3

🀝 Contributing

Contributions are welcome!
If you have ideas for new GitHub tools, bug fixes, or improvements, feel free to:

  1. Open an issue

  2. Fork the repo

  3. Submit a PR πŸš€

πŸ“« Contact

For questions or suggestions, reach out via Twitter or raise an issue.

About

A light weight Model Context Protocol (MCP) Server built using FastMCP to enable Github related operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages