Github-MCP-Server

mymadhavyadav07/Github-MCP-Server

3.3

If you are the rightful owner of Github-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A lightweight Model Context Protocol (MCP) server for automating GitHub operations using LLM-compatible tools.

Tools
5
Resources
0
Prompts
0

🧠 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 NameDescription
get_user_bioRetrieve bio of a user
get_github_filesRecursively fetch all files and directories from a GitHub repo starting at 'path'
get_file_contentFetches the content of a file from a GitHub repository.
create_pull_request_with_branchCreates a new branch and then a pull request on GitHub
create_github_issueCreates 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.