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.
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
python-utcp
Official python implementation of UTCP. UTCP is an open standard that lets AI agents call any API directly, without extra middleware.
augments
Comprehensive MCP server providing real-time framework documentation access for Claude Code with intelligent caching, multi-source integration, and context-aware assistance.
mcp-starter-template-ts
TypeScript starter template for building Model Context Protocol (MCP) servers, designed to help developers create secure and robust AI-agent-compatible services.
mcp-sys-bridge
An implementation of the Model Context Protocol (MCP), acting as a simple bridge to native OS functionalities like clipboard management and URL handling.
mini_claude
Give Claude Code persistent memory across sessions. Track habits, log mistakes, prevent death spirals. Runs locally with Ollama.
mcp-github-integration
A TypeScript package for interacting with the GitHub API through an MCP (Model Context Protocol) server integration.