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
- 01Retrieve user and owner information
- 02List repositories and followers
- 03Read and create repository issues
- 04Check commit statuses
- 05Access GitHub data through resources
Use cases
- 01Review a user's public profile and repositories
- 02List repository issues
- 03Create an issue from an MCP client
- 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.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEGitHub 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
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile 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 userget_user_info(username): Get information about a GitHub userlist_followers(username, limit=10): List followers for a GitHub userlist_repositories(username, limit=5): List repositories for a GitHub userget_repo_issues(owner, repo, state="open"): Get issues for a repositorycreate_issue(owner, repo, title, body, labels=None): Create a new issueget_commit_statuses(owner, repo, sha): Get commit statuses for a specific commit SHA
Available Resources
github://user/{username}: Get a user's GitHub profilegithub://followers/{username}: List a user's followersgithub://repos/{username}: List a user's repositoriesgithub://issues/{owner}/{repo}: Get issues for a repositorygithub://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
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.