Skip to main content

What You’ll Learn

This guide shows you how to integrate GitHub with Junis using the official GitHub MCP Server. Your agents will be able to:
  • Browse and search repositories
  • Read and create issues
  • Manage pull requests
  • View commits and branches
  • Create and update files
Prerequisites:

Quick Setup (5 Minutes)

1

Generate GitHub Personal Access Token

  1. Go to GitHub Settings → Tokens
  2. Click “Generate new token (classic)”
  3. Select scopes based on your needs:
    • repo - Full repository access (recommended)
    • read:org - Read organization info
    • read:user - Read user info
  4. Click “Generate token” and copy it immediately (shown only once!)
2

Add GitHub Platform to Junis

Navigate to Team > MCP Skills in Junis and find the GitHub card.If GitHub is already configured (globe icon 🌍), skip to Step 3.Otherwise, click “Connect” and fill in:
  • Platform Name: GitHub
  • MCP Server URL: https://api.githubcopilot.com/mcp/
  • Transport Type: Streamable HTTP ⚠️ Important: Must be HTTP, not SSE!
3

Add Your Credentials

Click “Add Auth” on the GitHub card and paste your Personal Access Token.Click “Test Connection” to verify it works.
4

Enable for Your Agents

Go to Admin > Agents, edit the agent you want to connect, and check “GitHub” in the MCP Platforms section.Save and test by asking: “List repositories in the JunisAI organization”

Authentication Levels

GitHub MCP supports all three authentication levels:
  • 👤 User-Level (Personal GitHub)
  • 🏢 Organization-Level (Shared)
  • 🌍 System-Level (Global Default)
Use Case: Access your personal repositories and private GitHub accountSetup: User Settings > MCP Credentials > GitHubExample:
  • Your personal projects
  • Private repos under your account
  • Creating issues in repos you own
Scopes Needed: repo, read:user
Priority: User > Organization > System (highest to lowest)

GitHub PAT Scopes Explained

Minimal Scopes (Read-Only)

✅ repo:status - Repository status
✅ public_repo - Public repositories only
Good for: Browsing public repos, reading issues (no write access)
✅ repo - Full repository access (includes private repos)
✅ read:org - Read organization information
✅ read:user - Read user profile
Good for: Full agent capabilities (create issues, PRs, commit files)

Optional Scopes (Advanced)

✅ workflow - Manage GitHub Actions workflows
✅ admin:repo_hook - Manage repository webhooks
✅ delete_repo - Delete repositories (⚠️ Use with caution!)
Good for: Advanced automation and repository management
Security Best Practice: Only grant the minimum scopes your agents need. You can always create a new token with more scopes later.

Available GitHub Tools

Your agents can use these GitHub MCP tools:

Repositories

github_list_repositories

List all repositories for a user or organization

github_get_repository

Get detailed information about a specific repository

github_search_repositories

Search repositories by keyword or criteria

github_create_repository

Create a new repository

Issues

github_list_issues

List issues in a repository

github_get_issue

Get details of a specific issue

github_create_issue

Create a new issue

github_update_issue

Update an existing issue (title, body, labels, assignees)

Pull Requests

github_list_pull_requests

List pull requests in a repository

github_get_pull_request

Get details of a specific PR

github_create_pull_request

Create a new pull request

github_merge_pull_request

Merge a pull request

File Operations

github_get_file_contents

Read file contents from a repository

github_create_or_update_file

Create or update a file in a repository

github_push_files

Push multiple files in a single commit

Commits & Branches

github_list_commits

View commit history

github_get_commit

Get details of a specific commit

github_list_branches

List all branches

github_create_branch

Create a new branch

Example Use Cases

DevOps Automation Agent

Agent Prompt:
You are a DevOps automation agent. Monitor GitHub repositories for:
- New issues and pull requests
- Failed CI/CD builds
- Pending code reviews

When you detect issues, create reports and notify the team.
Connected MCP: GitHub + Slack Example Interaction:
User: "Check if there are any failed builds in the main branch"
Agent: [Uses github_list_commits + GitHub Actions status]
       "Found 3 failed builds in the last 24 hours. Creating a report..."

Code Review Assistant

Agent Prompt:
You are a code review assistant. When given a pull request URL:
1. Fetch the PR details and changed files
2. Analyze code quality and potential issues
3. Leave constructive review comments
Connected MCP: GitHub only Example Interaction:
User: "Review PR #123 in the junis-ai repo"
Agent: [Uses github_get_pull_request, github_get_file_contents]
       "Reviewed 5 changed files. Here are my suggestions:
       - Add error handling in api.py (line 45)
       - Consider using async/await in database.py
       ..."

Issue Triage Agent

Agent Prompt:
You help triage GitHub issues by:
- Reading new issues
- Analyzing content and assigning labels
- Assigning to appropriate team members
- Prioritizing based on severity
Connected MCP: GitHub + Notion (for team member database) Example Interaction:
User: "Triage all new issues from the last 3 days"
Agent: [Uses github_list_issues, github_update_issue]
       "Triaged 12 new issues:
       - 5 bugs (assigned to engineering team)
       - 4 feature requests (added to backlog)
       - 3 documentation updates (assigned to tech writers)"

Troubleshooting

Symptom: Connection fails with 405 Method Not Allowed for url 'https://api.githubcopilot.com/mcp/'Cause: Transport type is set to sse instead of streamable-httpSolution:
  1. Go to Admin > MCP Skills > GitHub
  2. Edit the platform configuration
  3. Change Transport Type to “Streamable HTTP”
  4. Save and test connection
Symptom: Tools load but API calls fail with 401 errorsCause: Invalid or expired Personal Access TokenSolution:
  1. Generate a new PAT at https://github.com/settings/tokens
  2. Update your MCP credentials in Junis
  3. Test connection again
Symptom: Some operations fail with 403 errorsCause: PAT lacks necessary scopes (permissions)Solution:
  1. Check which operation failed (e.g., creating issues)
  2. Generate a new PAT with additional scopes:
    • Issues: repo scope
    • Private repos: repo scope
    • Organization: read:org scope
  3. Update credentials and retry
Symptom: Agent is connected to GitHub but no tools appearPossible Causes:
  • MCP connection failed
  • Agent cache not refreshed
  • Transport type misconfigured
Solution:
  1. Check logs: Admin > Dashboard > Recent Activity
  2. Look for error messages mentioning “GitHub” or “MCP”
  3. Verify connection in Team > MCP Skills > GitHub > Test Connection
  4. If all looks good, restart the agent (edit and save without changes)
Symptom: API calls start failing after many requestsCause: GitHub API rate limit reached (5,000 requests/hour for authenticated users)Solution:
  • Short-term: Wait 1 hour for rate limit reset
  • Long-term: Implement caching in your agent logic to reduce API calls
  • Check status: Ask agent “What’s my GitHub API rate limit status?”

Security Best Practices

✅ DO:
  • Use user-level credentials for personal repositories
  • Use organization-level credentials for shared team resources
  • Rotate PATs every 90 days
  • Grant only the minimum required scopes
  • Store PATs in a password manager
❌ DON’T:
  • Share your Personal Access Token with anyone
  • Commit PATs to code repositories
  • Use admin-level tokens for routine operations
  • Grant delete_repo scope unless absolutely necessary

Advanced Configuration

Using GitHub Enterprise Server

If your organization uses GitHub Enterprise Server:
{
  "mcp_server_url": "https://github.your-company.com/api/mcp/",
  "transport_type": "streamable-http",
  "additional_auth_config": {
    "headers": {
      "Authorization": "Bearer ghp_your_enterprise_token"
    }
  }
}

Rate Limit Monitoring

Create an agent that monitors GitHub API rate limits: Agent Instruction:
When asked about rate limits, use the github_get_rate_limit tool
to check remaining API calls and reset time.

What’s Next?


Additional Resources

Need Help? Contact us at [email protected] for assistance with GitHub automation workflows and integration support.