mcpField
G
GitHub MCP Server

GitHub MCP Server

Local
github.com/Sami-07Version Control0Updated 77w ago

About GitHub MCP Server

GitHub MCP Server exposes GitHub account, repository, issue, and commit-status operations to MCP clients. It combines callable tools with URI-based resources and uses a GitHub token for access.

Key features

  1. 01Retrieve user and owner information
  2. 02List repositories and followers
  3. 03Read and create repository issues
  4. 04Check commit statuses
  5. 05Access GitHub data through resources

Use cases

  1. 01Review a user's public profile and repositories
  2. 02List repository issues
  3. 03Create an issue from an MCP client
  4. 04Check a commit's status

MCP support

Provides GitHub operations to MCP clients through tools and URI-based resources. A GitHub token is configured in a `.env` file.

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

GitHub MCP Server

A Simple custom-built MCP server that provides GitHub integration features through various tools and resources.

Demo

https://github.com/user-attachments/assets/63b92a95-56f3-4290-9c73-acc4ad407246

Features

  • Get user information and profile details
  • List user repositories and followers
  • Get repository issues
  • Create new issues
  • Get commit statuses
  • Get owner information
  • Resource-based access to GitHub data

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file in the project root and add your GitHub token:
GITHUB_TOKEN=your_github_token_here

You can create a GitHub token at: https://github.com/settings/personal-access-tokens with the following permissions:

  • repo (Full control of private repositories)
  • read:user (Read user profile data)
  • user:follow (Follow and unfollow users)

Available Tools

  • owner_info(): Get information about the authenticated GitHub user
  • get_user_info(username): Get information about a GitHub user
  • list_followers(username, limit=10): List followers for a GitHub user
  • list_repositories(username, limit=5): List repositories for a GitHub user
  • get_repo_issues(owner, repo, state="open"): Get issues for a repository
  • create_issue(owner, repo, title, body, labels=None): Create a new issue
  • get_commit_statuses(owner, repo, sha): Get commit statuses for a specific commit SHA

Available Resources

  • github://user/{username}: Get a user's GitHub profile
  • github://followers/{username}: List a user's followers
  • github://repos/{username}: List a user's repositories
  • github://issues/{owner}/{repo}: Get issues for a repository
  • github://commit-status/{owner}/{repo}/{sha}: Get commit statuses for a specific commit

Running the Server

python server.py

Example Usage

# Get authenticated user information
user_info = owner_info()

# Get user information
user_info = get_user_info("octocat")

# List followers
followers = list_followers("octocat", limit=5)

# List repositories
repos = list_repositories("octocat", limit=3)

# Get repository issues
issues = get_repo_issues("octocat", "Hello-World")

# Create a new issue
new_issue = create_issue(
    "octocat",
    "Hello-World",
    "Bug Report",
    "Found a bug in the code",
    labels=["bug"]
)

# Get commit statuses
statuses = get_commit_statuses("octocat", "Hello-World", "abc123")

Response Format Examples

User Information
{
    "name": "The Octocat",
    "login": "octocat",
    "bio": "GitHub's mascot",
    "public_repos": 8,
    "followers": 1000,
    "following": 9
}
Repository Information
{
    "name": "Hello-World",
    "description": "My first repository",
    "stars": 100,
    "forks": 50,
    "language": "Python"
}
Issue Information
{
    "number": 1,
    "title": "Bug Report",
    "state": "open",
    "created_at": "2024-05-04T14:35:40.784Z",
    "user": "octocat"
}

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.