# Github

Access the GitHub API, enabling file operations, repository management, search functionality, and more.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add smithery-ai/github

# Browse available tools
npx -y @smithery/cli@latest tool list smithery-ai/github

# Get full schema for a tool
npx -y @smithery/cli@latest tool get smithery-ai/github search_repositories

# Call a tool
npx -y @smithery/cli@latest tool call smithery-ai/github search_repositories '{}'
```

## Direct MCP Connection

Endpoint: `https://github--smithery-ai.run.tools`

**Required config:**
- `githubPersonalAccessToken` (query) — GitHub personal access token for authentication. Create one at: https://github.com/settings/personal-access-tokens

## Tools (33)

- `search_repositories` — Search for GitHub repositories. Returns a concise list with essential information. Use 'get_repository' for detailed in…
- `search_code` — Search for code across GitHub repositories. Returns a concise list with file paths and repositories. Use 'get_file_cont…
- `search_users` — Search for GitHub users.
- `get_issue` — Get details of a specific issue in a GitHub repository.
- `add_issue_comment` — Add a comment to a specific issue in a GitHub repository.
- `search_issues` — Search for issues in GitHub repositories.
- `create_issue` — Create a new issue in a GitHub repository.
- `list_issues` — List issues in a GitHub repository.
- `update_issue` — Update an existing issue in a GitHub repository.
- `get_issue_comments` — Get comments for a specific issue in a GitHub repository.
- `get_repository` — Get detailed information about a GitHub repository including README and file structure
- `get_commit` — Get details for a commit from a GitHub repository
- `list_commits` — Get list of commits of a branch in a GitHub repository
- `list_branches` — List branches in a GitHub repository
- `create_or_update_file` — Create or update a single file in a GitHub repository. If updating an existing file, you must provide the current SHA o…
- `create_repository` — Create a new GitHub repository in your account
- `get_file_contents` — Get the contents of a file from a GitHub repository
- `fork_repository` — Fork a GitHub repository to your account or specified organization
- `create_branch` — Create a new branch in a GitHub repository
- `list_tags` — List git tags in a GitHub repository
- `get_tag` — Get details about a specific git tag in a GitHub repository
- `push_files` — Push multiple files to a GitHub repository in a single commit
- `get_pull_request` — Get details of a specific pull request in a GitHub repository.
- `update_pull_request` — Update an existing pull request in a GitHub repository.
- `list_pull_requests` — List pull requests in a GitHub repository.
- `merge_pull_request` — Merge a pull request in a GitHub repository.
- `get_pull_request_files` — Get the files changed in a specific pull request.
- `get_pull_request_status` — Get the status of a specific pull request.
- `update_pull_request_branch` — Update the branch of a pull request with the latest changes from the base branch (not implemented)
- `get_pull_request_comments` — Get comments for a specific pull request
- `create_pull_request` — Create a new pull request in a GitHub repository.
- `get_pull_request_review_comments` — Get review comments (line-by-line code comments) for a specific pull request.
- `create_pull_request_review_comment` — Create a review comment (line-by-line code comment) on a pull request.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get smithery-ai/github <tool-name>
```

---

Source: https://github.com/smithery-ai/mcp-servers/tree/main/github
