GitHubDashboard

GitHub

Repository management, issues, and pull requests

Connect GitHub

Connect your GitHub account with a single command:

mcp-shield providers connect github

# Output:
# Opening browser to authorize GitHub...
# ✓ GitHub connected successfully
# Connected as: your-username
# Scopes: repo, read:org, read:user
bash

Or connect via the MCP Shield dashboard for a visual OAuth flow.

Scopes

The GitHub integration requests the following OAuth scopes:

ScopeDescriptionRequired
repoFull control of private repositoriesRequired
read:orgRead organization membershipRequired
read:userRead user profile dataRequired
write:repo_hookWrite repository webhooksOptional
delete_repoDelete repositoriesOptional

Connect with specific scopes using the --scopes flag:

mcp-shield providers connect github --scopes repo,read:org
bash

MCP Tools

The GitHub integration provides 15 MCP tools:

ToolDescriptionRisk
github:list_reposList repositories for the authenticated userlow
github:get_repoGet details of a specific repositorylow
github:create_repoCreate a new repositorymedium
github:delete_repoDelete a repositoryhigh
github:list_issuesList issues in a repositorylow
github:create_issueCreate a new issuelow
github:update_issueUpdate an existing issuelow
github:list_pull_requestsList pull requests in a repositorylow
github:create_pull_requestCreate a pull requestmedium
github:merge_pull_requestMerge a pull requesthigh
github:get_file_contentsGet contents of a filelow
github:create_or_update_fileCreate or update a filemedium
github:list_branchesList branches in a repositorylow
github:create_branchCreate a new branchlow
github:search_codeSearch code across repositorieslow

Usage Examples

List repositories

mcp-shield mcp invoke github:list_repos --input '{"limit": 5}'

# Output:
# ┌─────────────────────────┬───────────┬──────────────┐
# │ Repository              │ Visibility│ Last Updated │
# ├─────────────────────────┼───────────┼──────────────┤
# │ your-org/project-a      │ private   │ 2 hours ago  │
# │ your-org/project-b      │ public    │ 1 day ago    │
# └─────────────────────────┴───────────┴──────────────┘
bash

Create an issue

mcp-shield mcp invoke github:create_issue --input '{
  "repo": "your-org/project-a",
  "title": "Bug: Login not working",
  "body": "Users are unable to log in when...",
  "labels": ["bug", "high-priority"]
}'
bash

Create a pull request

mcp-shield mcp invoke github:create_pull_request --input '{
  "repo": "your-org/project-a",
  "title": "feat: Add user authentication",
  "head": "feature/auth",
  "base": "main",
  "body": "This PR adds user authentication..."
}'
bash

Policy Recommendations

We recommend the following policies for GitHub:

Protect main branch

Block direct commits and force merges to main or master.

Require approval for high-risk operations

Require manual approval for delete_repo and merge_pull_request.

DLP for code content

Scan create_or_update_file operations for secrets and credentials.

Security Considerations

  • Token security: GitHub OAuth tokens are encrypted at rest and never exposed to AI clients.
  • Automatic refresh: Tokens are automatically refreshed before expiration.
  • Audit logging: All GitHub MCP calls are logged with full context.
  • Scope limits: MCP tools only work within the granted OAuth scopes.

Troubleshooting

OAuth callback error

Make sure you're logged in to the correct GitHub account and have permissions for the requested scopes. Try disconnecting and reconnecting.

Repository not found

Ensure the connected GitHub account has access to the repository. For organization repos, you may need to grant organization access.

Token expired

Run mcp-shield providers refresh github to refresh your credentials.