# GitHub MCP

> GitHub MCP lets your AI agent manage all development workflows directly from conversation. You can list repositories, check project issues, search file contents across repos, and monitor pull requests without opening a browser tab. It gives you full control over source code management, user profiles, organization details, and CI/CD status.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** source-control, repository-management, pull-requests, issue-tracking, ci-cd, version-control, code-collaboration

## Description

Your agent takes over your source control dashboard. Instead of toggling between tabs—checking the issue tracker here, then jumping to the repo list there, and finally opening a file just to see what changed—you talk to it. Your AI client handles the entire workflow. It tracks which repositories belong to whom, finds specific code snippets deep within multiple files, and monitors every open pull request for review status. This means you maintain momentum on complex projects without ever leaving your chat environment. By connecting this MCP through Vinkius, you give any compatible agent access to GitHub's full operational depth. You can even programmatically create new issues when a bug pops up or list all the Gists used by a team member.

## Tools

### create_new_issue
Opens a new issue directly into any specified GitHub repository.

### get_file_content
Reads the raw content of a specific file from a repository for analysis.

### get_my_profile
Retrieves detailed information about your personal GitHub account profile.

### get_repository_details
Gets general metadata and statistics for a specific repository.

### list_repo_branches
Lists all existing branches within a repository.

### list_my_gists
Lists your private, public, or organization code snippets (Gists).

### list_repository_issues
Retrieves a list of open and closed issues for a specific project.

### list_recent_notifications
Checks the GitHub notification inbox for recent activity alerts.

### list_my_organizations
Retrieves a list of all user organizations you belong to.

### list_pull_requests
Fetches a list of pull requests within a designated repository.

### list_my_repositories
Lists every repository associated with your account.

### search_repositories
Searches across GitHub to find projects based on criteria like name or description.

## Prompt Examples

**Prompt:** 
```
List all my GitHub repositories and show their stars count.
```

**Response:** 
```
I've retrieved your repositories. You have 12 repos, including 'mcp-server' (150 stars) and 'react-template' (42 stars). Would you like the full metadata for any of these?
```

**Prompt:** 
```
Find all open issues in the repository 'vinkius/mcp-server'.
```

**Response:** 
```
Scanning issues for vinkius/mcp-server... I found 3 open issues. Notable ones include 'Fix auth timeout' (ID: 101) and 'Update documentation' (ID: 102). Shall I provide the full description for the auth issue?
```

**Prompt:** 
```
Get the content of 'README.md' from repository 'vinkius/mcp-server'.
```

**Response:** 
```
File retrieved! I've fetched the README.md content. It describes the server architecture and installation steps. Would you like me to summarize the main components or explain the setup guide?
```

## Capabilities

### Manage repository metadata
List your repositories and retrieve key details like star counts, languages, and overall structure.

### Track project status
View open issues for a given project or monitor recent notifications to see team-wide development activity.

### Inspect code and files
Search through repo contents programmatically, find specific logic, and pull raw file contents for immediate analysis.

### Oversee collaboration requests
List all open pull requests to track code reviews and monitor team-wide merges.

### Maintain user records
Access details about your account, organization memberships, or list private code snippets (Gists).

## Use Cases

### Debugging a forgotten dependency
A developer needs to find the exact usage of a function defined last quarter. They ask their agent, and it uses `get_file_content` across several repos, pulling the relevant code block immediately for review.

### Triage after a release
A team lead wants to know the health of the main service. They instruct their agent to run `list_repository_issues` and then `list_pull_requests` on that repo, quickly identifying all open bugs and PRs needing review.

### Onboarding a new contributor
A manager needs to give the new hire an overview of existing work. They ask their agent to `list_my_repositories` and then `get_repository_details` for the top three, providing immediate context.

### Escalating a critical bug
An engineer spots a major flaw in testing. Rather than navigating the UI, they ask their agent to run `create_new_issue`, automatically logging all necessary details and assigning it to the right team.

## Benefits

- Find code snippets instantly. Instead of navigating folders to find a specific function, ask the agent to use `get_file_content` across repos. It pulls the raw text you need immediately.
- Streamline issue tracking. Don't manually check dashboards; tell your agent to run `list_repository_issues` for project status updates or `create_new_issue` when a bug is found.
- Monitor team progress effortlessly. Your agent can run `list_pull_requests`, giving you an instant overview of code reviews and merge readiness without leaving the chat.
- Know your whole scope. Need to see all projects? Use `list_my_repositories` or `search_repositories`. It gives you a full map of your GitHub presence in one query.
- Stay updated on team actions. Instead of reading dozens of emails, asking for `list_recent_notifications` provides an aggregated view of what matters right now.

## How It Works

The bottom line is, it turns complex GitHub dashboard navigation into simple conversational commands.

1. First, subscribe to this MCP and generate a Personal Access Token (PAT) from GitHub. Make sure the token has read/write scopes for repos and users.
2. Next, give that PAT to your AI client or agent within Vinkius's environment. This authorizes the connection.
3. Finally, tell your agent what you need—for example, 'List all my repositories with their star counts.' The MCP then executes the necessary API calls.

## Frequently Asked Questions

**How do I check all my repos using the list_my_repositories tool?**
You tell your agent to run `list_my_repositories`. This returns a full catalog of every repo you own, allowing you to select targets for deeper analysis.

**Can I use get_file_content on old code?**
Yes. You specify the repository and file path, and `get_file_content` retrieves the raw contents regardless of how long ago it was committed.

**Is list_pull_requests better than checking the UI?**
It's faster. The agent runs `list_pull_requests` and summarizes the status, providing a structured answer immediately without you having to click through multiple review threads.

**What if I need to create an issue before connecting?**
You can't pre-connect. Once connected, just tell your agent to use `create_new_issue` and provide the title and body details for the ticket you need.

**If I use list_recent_notifications, what happens if my Personal Access Token (PAT) is missing the 'user' scope?**
The tool will fail and return an authorization error. You must ensure your PAT has the necessary scopes, including 'user' and 'repo', for any action that requires accessing specific account or project data.

**If I run list_my_repositories repeatedly in a short time, am I at risk of hitting rate limits?**
Yes. All external API calls are subject to GitHub's rate limits. If you make too many requests quickly, your AI client will receive an error until the limit resets. It’s best practice to batch related queries.

**When should I use search_repositories compared to get_repository_details?**
Use search_repositories when you need a broad overview of projects across GitHub. Use get_repository_details only when you already know the exact repository name and need specific, deep metadata about it.

**Does list_repo_branches show all active development branches or just the default ones?**
It lists all available branches within a given repository. You can use this to check out feature branches or verify if an experimental branch exists before running further commands.

**Can I read private repositories?**
Yes, provided your Personal Access Token (PAT) has the 'repo' scope or appropriate fine-grained permissions for those repositories.

**How do I find a repository owner and name?**
In a GitHub URL like `github.com/vinkius/mcp-server`, the owner is `vinkius` and the repository name is `mcp-server`.

**Does it support creating pull requests?**
This version supports listing pull requests and issues. PR creation is currently handled through the web interface or other specialized tools.