GitHub Connector

The GitHub connector lets the AI interact with GitHub repositories, issues, pull requests, and code. It enables workflows like automated code review, issue triage, PR summaries, and repository exploration.

Setup

Property Value
Category Development
Command npx @modelcontextprotocol/server-github
Required Env Vars GITHUB_PERSONAL_ACCESS_TOKEN

Getting a Personal Access Token

  1. Go to github.com/settings/tokens
  2. Click Generate new token (classic) or Fine-grained token
  3. For classic tokens, select the repo scope (full repository access)
  4. For fine-grained tokens, select the specific repositories and permissions needed
  5. Click Generate token
  6. Copy the token immediately

Tip: Use fine-grained tokens when possible. They let you restrict access to specific repositories and grant only the permissions the AI actually needs.

Available Tools

Tool Description
search_repositories Search GitHub repositories by query
get_file_contents Read file contents from a repository
list_commits List recent commits on a branch
create_issue Create a new issue in a repository
get_issue Get details of a specific issue
create_pull_request Create a new pull request
add_comment Add a comment to an issue or PR

Example Use Cases

  • Code review: "Review the latest PR on our main repo and suggest improvements"
  • Issue triage: Create an assistant that categorizes new issues by label
  • Changelog generation: Build an engine that generates weekly changelogs from merged PRs
  • Repository exploration: "What are the most recently changed files in the src/ directory?"

Security Considerations

  • Use tokens with the minimum required permissions
  • Prefer fine-grained tokens scoped to specific repositories
  • Rotate tokens regularly
  • The token is stored in your OS keychain, not in Workjet's database

Next Steps