mcpField
M
MCP Tool for GitHub

MCP Tool for GitHub

Local
github.com/jalaj-pandeyVersion Control1Updated 69w ago

About MCP Tool for GitHub

MCP Tool for GitHub is a Python-based MCP server for managing GitHub repositories and files, with additional access to public user profiles. It also describes documenting model versions, datasets, metrics, and training configurations in repositories.

Key features

  1. 01Fetch public GitHub profiles
  2. 02Create and delete repositories
  3. 03Create, update, and delete files
  4. 04Authenticated GitHub API requests
  5. 05Asynchronous requests with httpx

Use cases

  1. 01Create or remove GitHub repositories
  2. 02Add or update repository documentation
  3. 03Delete repository files
  4. 04Record model and training context in repositories

MCP support

It provides GitHub user, repository, and file operations to MCP clients, including authenticated API requests using a GitHub token.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

🚀 MCP Tool for GitHub

Overview

The MCP (Model Context Protocol) Tool helps manage and track model context in GitHub repositories. It allows you to document important details like model versions, datasets, metrics, and training configurations.

📦 Overview

The MCP Tool for GitHub is designed to help manage:

  • Repositories
  • Files (create/update/delete)
  • User information
  • GitHub API requests

✨ Features

🧑‍💻 1. User Info
  • git_info(username: str)
    • Fetch public GitHub user profile information.

📁 2. Repository Management
  • create_repo(repo_name: str, private: bool, description: str)

    • Create a new repository (private/public).
  • delete_repo(username: str, repo_name: str)

    • Delete a repository by username and repo name.

📄 3. File Operations in Repository
  • create_file(...)

    • Add a new file to a repository.
    • Content is automatically base64 encoded.
  • update_file(...)

    • Update an existing file.
    • Requires the file's SHA from GitHub.
  • delete_file(...)

    • Delete a file.
    • Requires SHA and commit message.

🔄 4. Request Utility
  • make_request(...)
    • Handles all API interactions (GET, POST, PUT, DELETE).
    • Authenticated via GitHub Token.
    • Centralized method to perform various actions like:
      • Create repositories
      • Upload/update/delete files
      • Fetch user/repo data

🔐 5. Authentication & Setup
  • Reads GitHub token securely from .env file.
  • Sets proper headers (User-Agent, Accept, Authorization).
  • Fully asynchronous requests using httpx.

🧰 Prerequisites


📁 .env File Format

Create a .env file in the root directory and add:

GITHUB_TOKEN=your_personal_access_token_here

🛠️ Setup & Usage

# Clone the Repo
git clone https://github.com/jalaj-pandey/github-mcp-tool.git

# Change Directory
cd github-mcp-tool

# Initialize virtual environment using uv
uv init
uv venv
.venv/Scripts/activate  # Use `source ./venv/bin/activate` on Unix/Mac

# Add dependencies
uv add mcp[cli] httpx python-dotenv

# Start MCP dev server
mcp dev main.py

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.