Get the FREE Ultimate OpenClaw Setup Guide →

Github

A powerful CLI tool to explore GitHub repository metadata including pull requests, issues, commits, branches, and file diffs using Model Configuration Protocol and PyGitHub.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dhyeyinf-github-mcp python main.py \
  --env GITHUB_TOKEN="Your GitHub Personal Access Token"

How to use

GitHub-MCP is a Python-based CLI tool that leverages the Model Context Protocol (MCP) to interact with GitHub data in an AI-friendly, structured manner. The tool authenticates with a GitHub Personal Access Token (PAT) and lets you explore repositories, view commit history, inspect branches and file trees, manage issues and pull requests, and fetch repository metadata. Through MCP, the server can map repo content into standardized, AI-readable contexts to support automated analysis and guidance. To start, run the CLI and follow the interactive prompts to select a repository and perform actions such as viewing stats, diffs, or creating PRs and issues. The MCP integration emphasizes structured data exchange, enabling future enhancements where AI agents can reason over repository contexts.

How to install

Prerequisites:\n- Python 3.10+ installed on your system\n- Git available to clone the repository\n\n1) Clone the repository and install dependencies:\nbash\ngit clone https://github.com/dhyeyinf/Github-MCP.git\ncd Github-MCP\npip install -r requirements.txt\n\n2) Configure your GitHub PAT:\nbash\n# Create or export your token (replace your_token_here with yours)\nexport GITHUB_TOKEN="your_token_here"\n\n3) Run the CLI:\nbash\npython main.py\n\nNotes:\n- The CLI will guide you through a sequence of inputs to interact with GitHub data. If you plan to automate usage, store the GITHUB_TOKEN securely in your environment or use a secret manager.\n

Additional notes

Tips and considerations:\n- Ensure your PAT has the required scopes for the actions you intend to perform (read repository data, write PRs/issues as needed).\n- The MCP mapping described in the README refers to future phases; the current tool focuses on interactive data exploration and management via the CLI.\n- If you encounter authentication issues, re-check token scopes and token expiration.\n- This server uses Python 3.10+ and relies on PyGithub and Rich for output formatting.\n- When integrating with MCP tooling, the environment variable GITHUB_TOKEN is the key to enabling extended API quota and authenticated access.

Related MCP Servers

Sponsor this space

Reach thousands of developers