Skip to content

MCP server that provides tools to perform only read only operation on Github

License

Notifications You must be signed in to change notification settings

nsingla/mcp-github-readonly

Repository files navigation

MCP GitHub ReadOnly Server

A Model Context Protocol (MCP) server that provides read-only access to the GitHub REST API. This server allows you to interact with GitHub repositories, users, issues, pull requests, and more through a standardized interface.

Features

  • Read-only access to all GitHub REST API GET endpoints
  • Pydantic models for type-safe request payloads
  • Generic API client with comprehensive error handling
  • Authentication support via GitHub Personal Access Tokens
  • Rate limiting awareness and proper error handling
  • Comprehensive endpoint coverage for all major GitHub API categories

Installation

Using uv (recommended)

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and install
git clone <repository-url>
cd mcp-github-readonly
uv sync

Using pip

pip install mcp-github-readonly

Configuration

Set your GitHub Personal Access Token as an environment variable:

export GITHUB_TOKEN="your_github_token_here"

Or create a .env file:

GITHUB_TOKEN=your_github_token_here

Usage

Add the server to your MCP client configuration:

{
  "servers": {
    "github-readonly": {
      "command": "mcp-github-readonly"
    }
  }
}

Supported API Categories

  • Repositories: Repository information, contents, branches, releases
  • Issues: Issues, comments, labels, milestones
  • Pull Requests: PRs, reviews, comments
  • Users: User profiles, organizations, followers
  • Organizations: Organization data, members, teams
  • Actions: Workflows, runs, artifacts
  • Apps: GitHub Apps information
  • Git Database: Git objects and references

License

MIT License

About

MCP server that provides tools to perform only read only operation on Github

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published