Skip to main content

Overview

What it does

GitHub MCP Server connects AI tools directly to GitHub’s platform, enabling natural language interactions with repositories, issues, pull requests, and workflows.Key Features:
  • Repository management and code browsing
  • Issue tracking and creation
  • Pull request management and code review
  • Branch and commit operations
  • GitHub Actions workflow monitoring
  • Code search across repositories
  • Security alerts and code scanning
  • Dependabot integration
  • Team collaboration and discussions
  • Project board management
  • Release and tag management
  • Gist creation and management
  • Notifications management

Use Cases

Development Workflows:
  • Automated issue triage and assignment
  • Pull request review and approval automation
  • Release management and changelog generation
  • Code quality monitoring and reporting
Team Collaboration:
  • Team productivity analytics
  • Documentation updates and maintenance
  • Bug tracking and resolution
  • Project status reporting
Security & Compliance:
  • Security alert monitoring
  • Dependabot vulnerability tracking
  • Code scanning results analysis
  • Secret scanning alerts
This MCP server integrates with your GitHub account to manage repositories, collaborate on code, and automate workflows - all through natural language in Studio.

Quick Start

1

Prepare Your GitHub Account

You need a GitHub account to use this server. Choose your account type:Personal Account (Free)
  • Public and private repositories
  • Issue tracking and pull requests
  • GitHub Actions (2,000 minutes/month free)
  • Basic collaboration features
  • Perfect for individual projects
Organization Account
  • Team collaboration features
  • Advanced security settings
  • Team permissions management
  • Organization-wide settings
  • Better for team projects
GitHub Enterprise
  • Self-hosted or cloud
  • Advanced compliance features
  • SSO and SAML integration
  • Priority support
  • Custom policies
The free GitHub account includes everything needed to get started. No credit card required.
2

Create Personal Access Token

For NimbleBrain Studio, you’ll need a GitHub Personal Access Token (PAT):
  1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Click Generate new token (classic)
  3. Give it a descriptive name (e.g., “NimbleBrain Studio”)
  4. Set expiration (recommended: 90 days for security)
  5. Select scopes based on what you need:
Recommended Scopes:
  • repo - Full repository access (read/write)
  • read:org - Read organization data
  • workflow - Update GitHub Actions workflows
  • gist - Create and manage gists
  • notifications - Access notifications
  • project - Access project boards
Read-Only Scopes (for safer access):
  • repo:status - Repository commit status
  • repo_deployment - Deployment status
  • public_repo - Public repositories only
  • read:user - Read user profile data
  1. Click Generate token
  2. Copy the token immediately - you won’t see it again!
Store your PAT securely. Treat it like a password - never commit it to repositories or share it publicly.
3

Add to NimbleBrain Studio

In NimbleBrain Studio:
  1. Navigate to MCP Servers in the sidebar
  2. Click Add Server
  3. Search for “GitHub” in the server registry
  4. Click Configure
  5. Enter your GitHub Personal Access Token
  6. (Optional) Configure toolsets - leave default for most users:
    • context - Current user and GitHub context
    • repos - Repository operations
    • issues - Issue management
    • pull_requests - Pull request operations
    • users - User information
  7. Click Save & Enable
You can enable additional toolsets later by editing the server configuration.
4

Test the Connection

In your Studio chat, try this prompt:
"List my GitHub repositories"
You should see a list of your accessible repositories.Other test prompts:
  • “Show me open issues in [owner/repo]”
  • “What pull requests need my review?”
  • “Show my GitHub profile information”
Look for the 🔧 tool usage indicator to confirm the server is working.
Authentication: Studio uses Personal Access Tokens for secure GitHub authentication. You can revoke the token at any time from GitHub’s settings.

Available Tools

The GitHub MCP Server provides 100+ tools organized into toolsets. Below are the most commonly used tools grouped by functionality.
Essential tools for managing repositories, branches, files, and commits.

search_repositories

Search for repositories using GitHub’s powerful query syntax.Parameters:
ParameterTypeRequiredDescription
querystringYesRepository search query (e.g., “machine learning stars:>1000 language:python”)
sortstringNoSort by stars, forks, updated, etc.
orderstringNo”asc” or “desc”
pagenumberNoPage number for pagination
perPagenumberNoResults per page (max 100)
Example Usage:
"Find popular machine learning repositories in Python with over 1000 stars"

get_file_contents

Read files or directory contents from a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pathstringNoPath to file/directory
refstringNoGit reference (branch, tag)
Example Usage:
"Show me the README.md from owner/repo"

create_or_update_file

Create a new file or update an existing one in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pathstringYesFile path
contentstringYesFile content
messagestringYesCommit message
branchstringYesBranch to commit to
shastringNoRequired for updates - file’s current SHA
Example Usage:
"Update the README.md in owner/repo to add installation instructions"

create_branch

Create a new branch from an existing branch.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
branchstringYesNew branch name
from_branchstringNoSource branch (defaults to default branch)
Example Usage:
"Create a new branch called 'feature-auth' from main in owner/repo"

list_commits

List commits in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
shastringNoBranch, tag, or commit SHA
authorstringNoFilter by author
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"Show me recent commits on the main branch of owner/repo"

search_code

Search code across repositories using GitHub’s code search.Parameters:
ParameterTypeRequiredDescription
querystringYesCode search query
sortstringNoSort by indexed date
orderstringNo”asc” or “desc”
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"Find all TODO comments in my repositories"

create_repository

Create a new repository.Parameters:
ParameterTypeRequiredDescription
namestringYesRepository name
descriptionstringNoRepository description
privatebooleanNoPrivate repository?
autoInitbooleanNoInitialize with README
organizationstringNoCreate in organization
Example Usage:
"Create a new private repository called 'my-project' with a README"
Tools for creating, updating, and managing GitHub issues.

list_issues

List issues in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
statestringNo”open”, “closed”, or “all”
labelsstring[]NoFilter by labels
orderBystringNoOrder by field
directionstringNo”asc” or “desc”
perPagenumberNoResults per page
Example Usage:
"Show me all open bugs in owner/repo"

issue_write

Create or update an issue.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
methodstringYes”create” or “update”
titlestringNoIssue title (required for create)
bodystringNoIssue description
issue_numbernumberNoIssue number (required for update)
labelsstring[]NoLabels to apply
assigneesstring[]NoUsers to assign
statestringNo”open” or “closed”
Example Usage:
"Create a bug report in owner/repo about login issues with priority high label"

search_issues

Search issues and pull requests.Parameters:
ParameterTypeRequiredDescription
querystringYesSearch query
ownerstringNoLimit to repository owner
repostringNoLimit to repository
sortstringNoSort field
orderstringNo”asc” or “desc”
pagenumberNoPage number
Example Usage:
"Find all high-priority bugs assigned to me across all repositories"

add_issue_comment

Add a comment to an issue.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
issue_numbernumberYesIssue number
bodystringYesComment text
Example Usage:
"Add a comment to issue #123 in owner/repo with debugging steps"
Manage pull requests, reviews, and code changes.

list_pull_requests

List pull requests in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
statestringNo”open”, “closed”, or “all”
headstringNoFilter by head branch
basestringNoFilter by base branch
sortstringNoSort by field
directionstringNo”asc” or “desc”
pagenumberNoPage number
Example Usage:
"Show me all open pull requests in owner/repo"

create_pull_request

Create a new pull request.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
titlestringYesPR title
headstringYesBranch with changes
basestringYesBranch to merge into
bodystringNoPR description
draftbooleanNoCreate as draft?
Example Usage:
"Create a pull request from feature-auth to main with title 'Add authentication'"

pull_request_read

Get detailed information about a pull request.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pullNumbernumberYesPR number
methodstringYes”get”, “get_diff”, “get_status”, “get_files”, “get_reviews”, “get_comments”
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"Show me the diff for pull request #45 in owner/repo"

merge_pull_request

Merge a pull request.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pullNumbernumberYesPR number
merge_methodstringNo”merge”, “squash”, or “rebase”
commit_titlestringNoMerge commit title
commit_messagestringNoMerge commit message
Example Usage:
"Merge pull request #45 in owner/repo using squash method"

pull_request_review_write

Create or submit a pull request review.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pullNumbernumberYesPR number
methodstringYes”create”, “submit”, “delete”
bodystringNoReview comment
eventstringNo”APPROVE”, “REQUEST_CHANGES”, “COMMENT”
commitIDstringNoCommit SHA to review
Example Usage:
"Approve pull request #45 in owner/repo with comment 'LGTM!'"
Monitor and manage GitHub Actions workflows.

list_workflows

List workflows in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"Show me all workflows in owner/repo"

list_workflow_runs

List workflow runs for a specific workflow.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
workflow_idstringYesWorkflow ID or filename
statusstringNoFilter by status
branchstringNoFilter by branch
eventstringNoFilter by event type
pagenumberNoPage number
Example Usage:
"Show me the latest CI workflow runs in owner/repo"

get_workflow_run

Get details of a specific workflow run.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
run_idnumberYesWorkflow run ID
Example Usage:
"Show me the status of workflow run #12345 in owner/repo"

get_job_logs

Get logs from workflow jobs.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
job_idnumberNoJob ID (for single job)
run_idnumberNoRun ID (when using failed_only)
failed_onlybooleanNoGet logs only for failed jobs
return_contentbooleanNoReturn actual logs vs URLs
tail_linesnumberNoNumber of lines from end
Example Usage:
"Show me logs for failed jobs in workflow run #12345"

run_workflow

Manually trigger a workflow run.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
workflow_idstringYesWorkflow ID or filename
refstringYesGit ref (branch or tag)
inputsobjectNoWorkflow inputs
Example Usage:
"Trigger the deploy workflow on main branch in owner/repo"

rerun_workflow_run

Re-run a workflow run.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
run_idnumberYesWorkflow run ID
Example Usage:
"Rerun workflow #12345 in owner/repo"
Monitor security alerts, code scanning, and Dependabot.

list_code_scanning_alerts

List code scanning alerts for a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
statestringNo”open”, “closed”, “dismissed”
severitystringNoFilter by severity
tool_namestringNoFilter by tool
refstringNoFilter by Git ref
Example Usage:
"Show me all open high-severity code scanning alerts in owner/repo"

list_dependabot_alerts

List Dependabot alerts for dependencies.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
statestringNo”open”, “closed”, “dismissed”
severitystringNoFilter by severity
Example Usage:
"Show me critical Dependabot alerts in owner/repo"

list_secret_scanning_alerts

List secret scanning alerts.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
statestringNo”open”, “closed”, “resolved”
secret_typestringNoFilter by secret type
resolutionstringNoFilter by resolution
Example Usage:
"Show me all open secret scanning alerts in owner/repo"

list_global_security_advisories

Search global security advisories database.Parameters:
ParameterTypeRequiredDescription
ghsaIdstringNoGitHub Security Advisory ID
cveIdstringNoCVE ID
ecosystemstringNoPackage ecosystem
severitystringNoAdvisory severity
cwesstring[]NoCWE IDs
affectsstringNoAffected package
Example Usage:
"Find security advisories for npm packages with high severity"
Manage GitHub Discussions for community engagement.

list_discussions

List discussions in a repository or organization.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository/org owner
repostringNoRepository name
categorystringNoFilter by category ID
orderBystringNoOrder by field
directionstringNo”asc” or “desc”
perPagenumberNoResults per page
Example Usage:
"Show me all discussions in owner/repo"

get_discussion

Get details of a specific discussion.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
discussionNumbernumberYesDiscussion number
Example Usage:
"Show me discussion #5 in owner/repo"

get_discussion_comments

Get comments on a discussion.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
discussionNumbernumberYesDiscussion number
perPagenumberNoResults per page
afterstringNoCursor for pagination
Example Usage:
"Show me comments on discussion #5 in owner/repo"
Manage GitHub Projects (project boards).

list_projects

List projects for a user or organization.Parameters:
ParameterTypeRequiredDescription
ownerstringYesUser or org name
owner_typestringYes”user” or “org”
per_pagenumberNoResults per page
querystringNoSearch query
Example Usage:
"Show me all projects in my organization"

get_project

Get details of a specific project.Parameters:
ParameterTypeRequiredDescription
ownerstringYesUser or org name
owner_typestringYes”user” or “org”
project_numbernumberYesProject number
Example Usage:
"Show me project #1 details"

list_project_items

List items in a project.Parameters:
ParameterTypeRequiredDescription
ownerstringYesUser or org name
owner_typestringYes”user” or “org”
project_numbernumberYesProject number
fieldsstring[]NoField IDs to include
querystringNoSearch query
per_pagenumberNoResults per page
Example Usage:
"Show me all items in project #1"

add_project_item

Add an issue or PR to a project.Parameters:
ParameterTypeRequiredDescription
ownerstringYesUser or org name
owner_typestringYes”user” or “org”
project_numbernumberYesProject number
item_idnumberYesIssue or PR ID
item_typestringYes”issue” or “pull_request”
Example Usage:
"Add issue #123 to project #1"
Manage GitHub notifications and subscriptions.

list_notifications

List notifications for the authenticated user.Parameters:
ParameterTypeRequiredDescription
ownerstringNoFilter by repository owner
repostringNoFilter by repository
filterstringNo”all”, “participating”, “unread”
sincestringNoFilter by date (ISO 8601)
beforestringNoFilter by date (ISO 8601)
pagenumberNoPage number
Example Usage:
"Show me my unread GitHub notifications"

mark_all_notifications_read

Mark all notifications as read.Parameters:
ParameterTypeRequiredDescription
ownerstringNoLimit to repository owner
repostringNoLimit to repository
lastReadAtstringNoTimestamp (ISO 8601)
Example Usage:
"Mark all my GitHub notifications as read"

dismiss_notification

Dismiss a specific notification.Parameters:
ParameterTypeRequiredDescription
threadIDstringYesNotification thread ID
statestringNo”read” or “done”
Example Usage:
"Dismiss notification thread #12345 as done"
Create and manage GitHub Gists for code snippets.

list_gists

List gists for a user.Parameters:
ParameterTypeRequiredDescription
usernamestringNoGitHub username (omit for authenticated user)
sincestringNoFilter by date (ISO 8601)
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"Show me all my gists"

create_gist

Create a new gist.Parameters:
ParameterTypeRequiredDescription
filenamestringYesFilename for the gist
contentstringYesFile content
descriptionstringNoGist description
publicbooleanNoPublic or private
Example Usage:
"Create a public gist with my API configuration example"

update_gist

Update an existing gist.Parameters:
ParameterTypeRequiredDescription
gist_idstringYesGist ID
filenamestringYesFilename to update
contentstringYesNew content
descriptionstringNoUpdated description
Example Usage:
"Update my gist abc123 with the latest code"
Manage repository labels and organization settings.

list_label

List all labels in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
Example Usage:
"Show me all labels in owner/repo"

label_write

Create, update, or delete a label.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
methodstringYes”create”, “update”, or “delete”
namestringYesLabel name
colorstringNoHex color (without #)
descriptionstringNoLabel description
new_namestringNoNew name (for update)
Example Usage:
"Create a label called 'priority:high' with red color in owner/repo"

search_orgs

Search for organizations.Parameters:
ParameterTypeRequiredDescription
querystringYesOrganization search query
sortstringNoSort field
orderstringNo”asc” or “desc”
pagenumberNoPage number
Example Usage:
"Find organizations related to machine learning"
Manage user information and team memberships.

get_me

Get information about the authenticated user.Parameters: None requiredExample Usage:
"Show me my GitHub profile information"

search_users

Search for GitHub users.Parameters:
ParameterTypeRequiredDescription
querystringYesUser search query
sortstringNoSort by followers, repositories, joined
orderstringNo”asc” or “desc”
pagenumberNoPage number
Example Usage:
"Find users with over 100 followers in San Francisco"

get_teams

Get teams for a user.Parameters:
ParameterTypeRequiredDescription
userstringNoUsername (omit for authenticated user)
Example Usage:
"Show me all teams I'm a member of"

get_team_members

Get members of a team.Parameters:
ParameterTypeRequiredDescription
orgstringYesOrganization name
team_slugstringYesTeam slug
Example Usage:
"Show me members of the engineering team in my-org"
Manage releases, tags, and version history.

list_releases

List releases in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"Show me all releases for owner/repo"

get_latest_release

Get the latest release.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
Example Usage:
"What's the latest release of owner/repo?"

get_release_by_tag

Get a specific release by tag name.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
tagstringYesTag name (e.g., “v1.0.0”)
Example Usage:
"Show me details of the v2.0.0 release"

list_tags

List tags in a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pagenumberNoPage number
perPagenumberNoResults per page
Example Usage:
"List all version tags in owner/repo"
Manage starred repositories.

list_starred_repositories

List repositories starred by a user.Parameters:
ParameterTypeRequiredDescription
usernamestringNoGitHub username (omit for authenticated user)
sortstringNo”created” or “updated”
directionstringNo”asc” or “desc”
pagenumberNoPage number
Example Usage:
"Show me my starred repositories"

star_repository

Star a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
Example Usage:
"Star the owner/repo repository"

unstar_repository

Remove a star from a repository.Parameters:
ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
Example Usage:
"Unstar owner/repo"
100+ Tools Available: The tools above represent the most commonly used features. Additional tools are available for advanced workflows, file operations, commits, and more. Explore all capabilities in your Studio chat!

Example Workflows

  • Issue Management
  • Pull Request Review
  • Code Search & Analysis
  • Release Management
  • Repository Setup
  • File Operations
  • GitHub Actions Monitoring
  • Security Monitoring
  • Team Collaboration
  • Project Management
Scenario: Automate issue triage and assignmentPrompt:
"Create a bug report in my-org/my-repo about users unable to login, label it as 'bug' and 'priority:high', and assign it to @devuser"
What happens:
  • Creates new issue with clear title
  • Sets bug and priority labels
  • Assigns to team member
  • Adds description with context
  • Can link related issues
Follow-up prompts:
  • “Show me all open high-priority bugs”
  • “Add a comment with reproduction steps”
  • “Update the issue to include error logs”
  • “Close this issue as resolved”
Time: <2 seconds API calls: 1-2
Studio can automatically label issues based on content analysis and suggest assignees based on code ownership.
All examples use natural language prompts in Studio - no Git commands or CLI required!

Authentication

Personal Access Token (PAT) Required: This server uses GitHub Personal Access Tokens for secure authentication.

Creating Your GitHub PAT

GitHub authentication in Studio uses Personal Access Tokens, which means:
  • ✅ Fine-grained control over permissions
  • ✅ Can be revoked anytime from GitHub settings
  • ✅ Supports expiration dates for security
  • ✅ No password exposure
  • ✅ Works with 2FA enabled
Steps to Create PAT:
  1. GitHub Settings → Developer settings → Personal access tokens
  2. Choose “Tokens (classic)” for broad compatibility
  3. Click “Generate new token (classic)”
  4. Name it clearly (e.g., “NimbleBrain Studio”)
  5. Set expiration (30-90 days recommended)
  6. Select required scopes
  7. Generate and copy immediately
Save your PAT in a password manager - you won’t be able to see it again after creation.

Permission Scopes

GitHub has granular permissions. Choose based on your needs: Full Access (Recommended for Personal Use):
  • repo - Full repository access
  • workflow - Update GitHub Actions
  • admin:org - Manage organizations (if needed)
  • project - Manage projects
  • gist - Create and manage gists
  • notifications - Access notifications
Read-Only Access (Safer for Shared Use):
  • repo:status - Read commit status
  • repo_deployment - Read deployment status
  • public_repo - Access public repositories only
  • read:user - Read user profile
  • read:org - Read organization data
  • read:project - Read project data
Security-Focused Scopes:
  • security_events - View security events
  • read:packages - Read packages
  • read:gpg_key - Read GPG keys
Only grant the permissions you need. You can always create a new PAT with more permissions later.

Managing Your PAT

View and Revoke:
  1. GitHub Settings → Developer settings → Personal access tokens
  2. See all active tokens with creation dates and scopes
  3. Click token name to view details or regenerate
  4. Click “Revoke” to immediately invalidate
Studio Configuration:
  1. Settings → MCP Servers → GitHub
  2. Update token if regenerated
  3. Test connection after updating
Security Best Practices:
Grant only the scopes you need:
  • Start with read-only access
  • Add write permissions as needed
  • Avoid admin scopes unless necessary
  • Use separate tokens for different purposes
Tokens should expire regularly:
  • 30-90 days for active use
  • 7 days for testing/development
  • Shorter periods for higher security
  • Set calendar reminders to regenerate
Keep tokens out of version control:
  • Never commit .env files
  • Use .gitignore properly
  • Scan repositories for exposed tokens
  • Use GitHub secret scanning
Protect your GitHub account:
  • Enable 2FA on your GitHub account
  • Use authenticator app (not SMS)
  • Save recovery codes securely
  • Many organizations require 2FA
Track token activity:
  • Review GitHub audit logs
  • Check for unexpected API calls
  • Rotate tokens if suspicious
  • Revoke unused tokens

Rate Limits

GitHub has rate limits to ensure API stability: Authenticated Requests (PAT):
Account TypeRate LimitReset Period
Personal5,000 req/hour1 hour
Organization5,000 req/hour1 hour
GitHub EnterpriseHigher (custom)1 hour
Rate Limit Best Practices:
  • Studio automatically tracks remaining quota
  • Warns when approaching limits
  • Pauses operations if limit exceeded
  • Resumes automatically after reset
Check Rate Limit:
"What's my current GitHub API rate limit status?"
5,000 requests per hour is generous - most Studio workflows use 10-50 requests per session. Heavy automation may need GitHub Enterprise.

Fine-Grained PATs (Alternative)

GitHub offers fine-grained PATs with repository-specific access: Advantages:
  • Limit access to specific repositories
  • More granular permissions
  • Better audit trails
  • Organization approval workflows
When to Use:
  • Organization-managed access
  • Production automation
  • Limited repository access needed
  • Enhanced security requirements
Creation:
  1. GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
  2. Select specific repositories
  3. Choose granular permissions
  4. Set expiration and generate
Fine-grained PATs require organization approval in many enterprise setups.

Troubleshooting

Error Message:
401 Unauthorized - Bad credentials
Cause: Invalid or expired Personal Access TokenSolutions:
  • Verify token is copied correctly (no extra spaces)
  • Check if token has expired in GitHub settings
  • Confirm token hasn’t been revoked
  • Ensure required scopes are granted
  • Generate a new token if needed
  • Update token in Studio: Settings → MCP Servers → GitHub
Verification:
"Test my GitHub connection"
PATs are case-sensitive and have no spaces. Copy directly from GitHub’s token generation page.
Error Message:
403 API rate limit exceeded
Cause: Exceeded GitHub’s 5,000 requests/hour limitSolutions:
  • Wait for rate limit reset (shown in error message)
  • Check current quota: “Show my GitHub API rate limit”
  • Reduce number of requests in workflows
  • Use pagination instead of fetching all results
  • Cache repository data locally
  • Consider GitHub Enterprise for higher limits
Check Status:
"What's my GitHub API rate limit and when does it reset?"
Optimize Queries:
  • Use specific filters to reduce result sets
  • Fetch only needed fields
  • Combine related operations
Rate limits reset every hour. Studio shows remaining quota and reset time in server settings.
Error Message:
403 Forbidden - Resource not accessible
Cause: PAT doesn’t have required permission scopesSolutions:
  • Identify required scope from error message
  • Create new PAT with additional scopes
  • Update token in Studio configuration
  • For org repos, check organization permissions
  • Verify you’re a collaborator on private repos
Required Permissions for Common Operations:
  • Create issues: repo or public_repo
  • Create PRs: repo
  • Push code: repo
  • Manage Actions: workflow
  • Read security: security_events
  • Manage projects: project
Check Access:
"Do I have write access to owner/repo?"
Organization repositories may require additional approval from org admins for access.
Error Message:
404 Repository not found
Solutions:
  • Verify repository name format: “owner/repo” (not just “repo”)
  • Check repository spelling and capitalization
  • Confirm repository exists and you have access
  • For private repos, ensure PAT has repo scope
  • Check if repository was renamed or deleted
  • Verify organization name if applicable
List Accessible Repos:
"Show me all repositories I have access to"
Search Instead:
"Search for repositories matching 'project-name'"
Repository names are case-sensitive in API calls. Use exact capitalization.
Error Message:
422 Branch protection rule violation
Cause: Attempting to bypass branch protection rulesSolutions:
  • Create pull request instead of direct push
  • Ensure all required status checks pass
  • Get required approvals from reviewers
  • Resolve merge conflicts
  • Check branch protection rules: Settings → Branches
  • Request admin override if urgent (not recommended)
Common Requirements:
  • Minimum number of reviews (usually 1-2)
  • All status checks passing
  • No merge conflicts
  • Linear history
  • Signed commits
Check Protection:
"What are the branch protection rules for main in owner/repo?"
Branch protection is essential for team collaboration - it prevents accidental mistakes and ensures code quality.
Error Message:
Merge conflict - manual resolution required
Cause: Conflicting changes in same files/linesSolutions:
  • View conflicting files: “Show merge conflicts for PR #123”
  • Pull latest changes to your branch
  • Resolve conflicts in your local editor or GitHub UI
  • Push resolved changes
  • Ask Studio to suggest conflict resolution strategy
Prevention:
  • Keep feature branches up to date with main
  • Merge main into feature branches regularly
  • Communicate with team about overlapping work
  • Use smaller, focused PRs
  • Pull before pushing changes
Get Help:
"Show me the conflicting files in PR #123 and suggest resolution"
Studio can suggest conflict resolutions based on code context, but complex conflicts need manual review.
Error Message:
413 Request Entity Too Large
Cause: File exceeds GitHub size limitsSolutions:
  • Use Git LFS for files >100MB
  • Break large files into smaller chunks
  • Use external storage (S3, Azure Blob) for binaries
  • Check repository size limits
  • Use GitHub Releases for distributing large files
GitHub Limits:
  • File size: 100MB (recommended max), 50MB (warning)
  • Repository size: 1GB (recommended max), 5GB (soft limit)
  • API response: 10MB max
  • Release assets: 2GB max each
Setup Git LFS:
# In local repository
git lfs install
git lfs track "*.psd"
git add .gitattributes
For large files, use GitHub Releases to upload artifacts up to 2GB each, or use Git LFS for version-controlled large files.
Error Message:
422 Workflow does not support manual triggering
Cause: Workflow doesn’t have workflow_dispatch event configuredSolutions:
  • Check workflow file for workflow_dispatch trigger
  • Add workflow_dispatch to workflow YAML
  • Commit updated workflow file
  • Try triggering again after update
Enable Manual Trigger:
# In .github/workflows/your-workflow.yml
on:
  workflow_dispatch:
    inputs:
      environment:
        description: 'Environment to deploy'
        required: true
        default: 'staging'
Check Workflows:
"Which workflows in owner/repo support manual triggering?"
Not all workflows need manual triggers. Only add workflow_dispatch to workflows you need to run on-demand.
Error Message:
403 You have exceeded a secondary rate limit
Cause: Too many rapid requests to GitHub APISolutions:
  • Slow down request frequency
  • Add delays between operations
  • Batch operations where possible
  • Avoid rapid polling (use webhooks instead)
  • Wait for the specified retry-after period
Secondary Limits:
  • Max 100 concurrent requests
  • Max 900 points/minute (varies by endpoint)
  • Content creation limits (issues, PRs, comments)
Prevention:
  • Use pagination efficiently
  • Cache responses when appropriate
  • Implement exponential backoff
  • Use conditional requests (ETags)
Secondary rate limits are designed to prevent abuse. Respect retry-after headers and implement proper rate limiting.
Error Message:
422 Push rejected - force push not allowed
Cause: Branch protection prevents force pushesSolutions:
  • Create new commits instead of rewriting history
  • Use pull requests for changes
  • Contact repository admin if force push truly needed
  • Create new branch if history is broken
Safe Alternatives:
  • Use revert commits instead of amending
  • Create fix commits on top of problematic commits
  • Use git merge instead of git rebase for shared branches
Best Practice:
"Create a revert commit for the problematic change instead of force pushing"
Force pushes can break other developers’ work. Only use when absolutely necessary and coordinate with your team.

Learning Resources

What is GitHub?GitHub is the world’s leading platform for version control and collaboration:
  • Version Control: Track every change to your code
  • Collaboration: Work with teams around the world
  • Code Review: Review and discuss code before merging
  • Project Management: Issues, projects, milestones
  • CI/CD: Automate testing and deployment with GitHub Actions
  • Open Source: Host and contribute to open source projects
Key Concepts:
  • Repository (Repo): Project container with code and history
  • Commit: Snapshot of changes at a point in time
  • Branch: Parallel version of your code
  • Pull Request (PR): Proposed changes for review
  • Issue: Bug reports and feature requests
  • Fork: Personal copy of someone else’s repository
  • Star: Bookmark repositories you like
GitHub Workflows:
  1. Create repository or fork existing
  2. Clone to local machine
  3. Create branch for feature
  4. Make changes and commit
  5. Push branch to GitHub
  6. Open pull request
  7. Review and discuss changes
  8. Merge when approved
With Studio, you skip the local Git commands and work directly with GitHub through natural language!
Git (the version control system):
  • Command-line tool (git)
  • Tracks changes in code
  • Works locally on your computer
  • Creates commit history
  • Manages branches
  • Created by Linus Torvalds in 2005
GitHub (the hosting platform):
  • Web-based Git repository hosting
  • Collaboration features (PRs, reviews)
  • Issue tracking and project management
  • CI/CD with GitHub Actions
  • Security features (Dependabot, code scanning)
  • Social features (stars, follows, profiles)
  • Owned by Microsoft
Analogy:
  • Git = Your local word processor
  • GitHub = Google Docs (cloud-based, collaborative)
Why Both Matter:
  • Git provides version control locally
  • GitHub provides collaboration remotely
  • Together they enable modern software development
Studio integrates with GitHub’s platform - no Git commands needed! Just describe what you want in natural language.
Personal Access Tokens (Used by Studio):Advantages:
  • Direct API authentication
  • Fine-grained scope control
  • Supports all GitHub features
  • Works with any client
  • No redirect flows needed
  • Can set expiration dates
⚠️ Considerations:
  • Must be stored securely
  • Manual creation and management
  • No automatic refresh
  • User needs GitHub account access
OAuth (Alternative Method):Advantages:
  • No password exposure
  • Automatic token management
  • Easy revocation
  • Built-in consent screens
⚠️ Considerations:
  • Requires OAuth app setup
  • More complex flow
  • May need redirect URLs
  • Less control over scopes
For NimbleBrain Studio:
  • PATs are recommended for simplicity
  • Full API feature support
  • Better control over permissions
  • Easier configuration
GitHub’s remote MCP server (hosted by GitHub) uses OAuth. NimbleBrain’s self-hosted version uses PATs for easier setup and full feature access.
Public Repositories:
  • ✅ Visible to everyone on the internet
  • ✅ Anyone can clone and fork
  • ✅ Great for open source projects
  • ✅ Unlimited free public repos
  • ✅ Builds your profile and portfolio
  • ⚠️ All code and history is public
Private Repositories:
  • ✅ Only you and collaborators can access
  • ✅ Better for proprietary code
  • ✅ Unlimited free private repos (all plans)
  • ✅ Unlimited collaborators (all plans)
  • ⚠️ Doesn’t contribute to public profile
Internal Repositories (Enterprise only):
  • ✅ Visible to all organization members
  • ✅ Not visible to outside world
  • ✅ Good for company-wide tools
  • ⚠️ Requires GitHub Enterprise
Choosing Visibility:
  • Public: Open source, learning projects, portfolios
  • Private: Client work, proprietary code, experiments
  • Internal: Company libraries, internal tools
Changing Visibility:
  • Settings → Danger Zone → Change visibility
  • Public → Private: Anytime, free
  • Private → Public: Consider implications first
Making a private repository public exposes all history. Review commits for secrets before making public.
Why Branch Protection?
  • Prevents accidental changes to important branches
  • Ensures code quality through reviews
  • Maintains clean commit history
  • Enforces CI/CD checks
  • Reduces production incidents
Essential Rules for Main/Production:
  1. Require Pull Requests: No direct pushes
  2. Require Reviews: At least 1-2 approvals
  3. Require Status Checks: All CI tests must pass
  4. Require Up-to-Date Branches: Must be current with base
  5. Restrict Force Pushes: Prevent history rewriting
  6. Restrict Deletions: Prevent accidental deletion
  7. Require Signed Commits: Verify author identity (optional)
Additional Protections:
  • Require linear history (no merge commits)
  • Dismiss stale reviews on new commits
  • Require review from code owners
  • Restrict who can push (admins only)
  • Include administrators in rules
When to Use:
  • Always: main, master, production, release branches
  • Usually: development, staging branches
  • Rarely: feature, personal branches
  • Never: experimental, temporary branches
Setup:
  1. Repository Settings → Branches
  2. Click “Add branch protection rule”
  3. Enter branch name pattern (e.g., main)
  4. Select protection options
  5. Save changes
Start with basic protections (PRs + 1 review) and add more as team grows. Too many rules can slow development.
What are GitHub Actions?Automated workflows triggered by GitHub events:
  • Run tests on pull requests
  • Deploy on merge to main
  • Publish releases
  • Scheduled jobs (nightly builds, cleanup)
  • Custom automation (notifications, labeling)
Key Concepts:
  • Workflow: Automated process (defined in YAML)
  • Job: Set of steps that run on same runner
  • Step: Individual task (run command, use action)
  • Runner: Server that runs workflows (GitHub-hosted or self-hosted)
  • Action: Reusable unit of code
Common Use Cases:
  • CI (Continuous Integration): Test every commit
  • CD (Continuous Deployment): Deploy to production
  • Code Quality: Linting, formatting, security scans
  • Automated Testing: Unit, integration, e2e tests
  • Release Management: Build, tag, publish releases
  • Notifications: Slack messages, emails
Example Workflow Triggers:
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  schedule:
    - cron: '0 0 * * *'  # Daily at midnight
  workflow_dispatch:  # Manual trigger
Free Tier (Public Repos):
  • Unlimited minutes
  • Linux, Windows, macOS runners
  • Matrix builds
  • Concurrent workflows
Free Tier (Private Repos):
  • 2,000 minutes/month
  • Resets monthly
  • Additional minutes can be purchased
Studio can monitor and trigger workflows - no YAML editing or workflow files needed for basic operations!
Why Code Review?
  • Catch bugs before production
  • Share knowledge across team
  • Maintain code quality standards
  • Mentor junior developers
  • Enforce best practices
Creating Good Pull Requests:
  • Small & Focused: One feature or fix per PR
  • Clear Title: Describe what changes
  • Good Description: Explain why changes made
  • Add Tests: Prove changes work
  • Update Docs: Keep documentation current
  • Link Issues: Reference related issues
  • Add Screenshots: For UI changes
Reviewing Pull Requests:
  • Read Description: Understand the goal
  • Check Tests: Ensure proper coverage
  • Look for Bugs: Edge cases, error handling
  • Check Style: Follows team conventions
  • Consider Design: Is it the right approach?
  • Be Constructive: Suggest improvements nicely
  • Approve Fast: Don’t block unnecessarily
Review Types:
  • Approve: Changes look good, ready to merge
  • Request Changes: Issues that must be fixed
  • Comment: Suggestions, questions, discussion
Studio Capabilities:
"Review PR #123 and suggest improvements to error handling"
"Summarize the changes in PR #123 for me"
"Check if PR #123 has adequate test coverage"
"Approve PR #123 with comment about good documentation"
Good code reviews are timely, kind, and focus on improving the code, not criticizing the author.
Why Use Labels?
  • Categorize issues and PRs
  • Track priority and status
  • Filter and search effectively
  • Automate workflows
  • Generate metrics and reports
Common Label Schemes:By Type:
  • bug - Something isn’t working
  • feature - New functionality request
  • enhancement - Improvement to existing feature
  • documentation - Documentation updates
  • question - Need clarification
By Priority:
  • priority:critical - Needs immediate attention
  • priority:high - Important, address soon
  • priority:medium - Normal priority
  • priority:low - Nice to have
By Status:
  • in-progress - Currently being worked on
  • blocked - Waiting on something
  • needs-review - Ready for review
  • needs-triage - Needs initial review
By Effort:
  • effort:small - <1 day
  • effort:medium - 1-3 days
  • effort:large - >3 days
By Team/Area:
  • frontend - UI/UX changes
  • backend - Server-side changes
  • devops - Infrastructure
  • security - Security-related
Creating Effective Labels:
  • Use consistent naming (lowercase, hyphens)
  • Use colors meaningfully (red=critical, green=feature)
  • Don’t create too many (20-30 is plenty)
  • Document label meanings
  • Use emoji for visual distinction
Studio Can Help:
"Label issue #123 as high priority bug"
"Show me all high-priority frontend bugs"
"Create labels for our sprint workflow"
"Find issues without labels"
Good labeling makes issues searchable and helps team members quickly understand what needs attention.

Need help? Join the NimbleBrain Discord or email [email protected]