GitHub Automation via Rube MCP
Automate GitHub repository management, issue tracking, pull request workflows, branch operations, and CI/CD through Composio's GitHub toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active GitHub connection via with toolkit
- Always call first to get current tool schemas
Setup
Get Rube MCP: Add
as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming responds
- Call with toolkit
- If connection is not ACTIVE, follow the returned auth link to complete GitHub OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create and Manage Issues
When to use: User wants to create, list, or manage GitHub issues
Tool sequence:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER
- Find target repo if unknown [Prerequisite]
GITHUB_LIST_REPOSITORY_ISSUES
- List existing issues (includes PRs) [Required]
- - Create a new issue [Required]
GITHUB_CREATE_AN_ISSUE_COMMENT
- Add comments to an issue [Optional]
GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS
- Search across repos by keyword [Optional]
Key parameters:
- : Repository owner (username or org), case-insensitive
- : Repository name without .git extension
- : Issue title (required for creation)
- : Issue description (supports Markdown)
- : Array of label names
- : Array of GitHub usernames
- : 'open', 'closed', or 'all' for filtering
Pitfalls:
GITHUB_LIST_REPOSITORY_ISSUES
returns both issues AND pull requests; check field to distinguish
- Only users with push access can set assignees, labels, and milestones; they are silently dropped otherwise
- Pagination: max 100; iterate pages until empty
2. Manage Pull Requests
When to use: User wants to create, review, or merge pull requests
Tool sequence:
GITHUB_FIND_PULL_REQUESTS
- Search and filter PRs [Required]
GITHUB_GET_A_PULL_REQUEST
- Get detailed PR info including mergeable status [Required]
GITHUB_LIST_PULL_REQUESTS_FILES
- Review changed files [Optional]
GITHUB_CREATE_A_PULL_REQUEST
- Create a new PR [Required]
GITHUB_CREATE_AN_ISSUE_COMMENT
- Post review comments [Optional]
GITHUB_LIST_CHECK_RUNS_FOR_A_REF
- Verify CI status before merge [Optional]
GITHUB_MERGE_A_PULL_REQUEST
- Merge after explicit user approval [Required]
Key parameters:
- : Source branch with changes (must exist; for cross-repo: 'username:branch')
- : Target branch to merge into (e.g., 'main')
- : PR title (required unless number provided)
- : 'merge', 'squash', or 'rebase'
- : 'open', 'closed', or 'all'
Pitfalls:
GITHUB_CREATE_A_PULL_REQUEST
fails with 422 if base/head are invalid, identical, or already merged
GITHUB_MERGE_A_PULL_REQUEST
can be rejected if PR is draft, closed, or branch protection applies
- Always verify mergeable status with
GITHUB_GET_A_PULL_REQUEST
immediately before merging
- Require explicit user confirmation before calling MERGE
3. Manage Repositories and Branches
When to use: User wants to create repos, manage branches, or update repo settings
Tool sequence:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER
- List user's repos [Required]
- - Get detailed repo info [Optional]
GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER
- Create personal repo [Required]
GITHUB_CREATE_AN_ORGANIZATION_REPOSITORY
- Create org repo [Alternative]
- - List branches [Required]
GITHUB_CREATE_A_REFERENCE
- Create new branch from SHA [Required]
GITHUB_UPDATE_A_REPOSITORY
- Update repo settings [Optional]
Key parameters:
- : Repository name
- : Boolean for visibility
- : Full reference path (e.g., 'refs/heads/new-branch')
- : Commit SHA to point the new reference to
- : Default branch name
Pitfalls:
GITHUB_CREATE_A_REFERENCE
only creates NEW references; use GITHUB_UPDATE_A_REFERENCE
for existing ones
- must start with 'refs/' and contain at least two slashes
- paginates via /; iterate until empty page
GITHUB_DELETE_A_REPOSITORY
is permanent and irreversible; requires admin privileges
4. Search Code and Commits
When to use: User wants to find code, files, or commits across repositories
Tool sequence:
- - Search file contents and paths [Required]
GITHUB_SEARCH_CODE_ALL_PAGES
- Multi-page code search [Alternative]
GITHUB_SEARCH_COMMITS_BY_AUTHOR
- Search commits by author/date/org [Required]
- - List commits for a specific repo [Alternative]
- - Get detailed commit info [Optional]
GITHUB_GET_REPOSITORY_CONTENT
- Get file content [Optional]
Key parameters:
- : Search query with qualifiers (, , )
- /: For repo-specific commit listing
- : Filter by commit author
- /: ISO 8601 date range for commits
Pitfalls:
- Code search only indexes files under 384KB on default branch
- Maximum 1000 results returned from code search
GITHUB_SEARCH_COMMITS_BY_AUTHOR
requires keywords in addition to qualifiers; qualifier-only queries are not allowed
- returns 409 on empty repos
5. Manage CI/CD and Deployments
When to use: User wants to view workflows, check CI status, or manage deployments
Tool sequence:
GITHUB_LIST_REPOSITORY_WORKFLOWS
- List GitHub Actions workflows [Required]
- - Get workflow details by ID or filename [Optional]
GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT
- Manually trigger a workflow [Required]
GITHUB_LIST_CHECK_RUNS_FOR_A_REF
- Check CI status for a commit/branch [Required]
- - List deployments [Optional]
GITHUB_GET_A_DEPLOYMENT_STATUS
- Get deployment status [Optional]
Key parameters:
- : Numeric ID or filename (e.g., 'ci.yml')
- : Git reference (branch/tag) for workflow dispatch
- : JSON string of workflow inputs matching
on.workflow_dispatch.inputs
- : Filter deployments by environment name
Pitfalls:
GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT
requires the workflow to have trigger configured
- Full path
.github/workflows/main.yml
is auto-stripped to just
- Inputs max 10 key-value pairs; must match workflow's
on.workflow_dispatch.inputs
definitions
6. Manage Users and Permissions
When to use: User wants to check collaborators, permissions, or branch protection
Tool sequence:
GITHUB_LIST_REPOSITORY_COLLABORATORS
- List repo collaborators [Required]
GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER
- Check specific user's access [Optional]
GITHUB_GET_BRANCH_PROTECTION
- Inspect branch protection rules [Required]
GITHUB_UPDATE_BRANCH_PROTECTION
- Update protection settings [Optional]
GITHUB_ADD_A_REPOSITORY_COLLABORATOR
- Add/update collaborator [Optional]
Key parameters:
- : 'outside', 'direct', or 'all' for collaborator filtering
- : Filter by 'pull', 'triage', 'push', 'maintain', 'admin'
- : Branch name for protection rules
- : Whether protection applies to admins
Pitfalls:
GITHUB_GET_BRANCH_PROTECTION
returns 404 for unprotected branches; treat as no protection rules
- Determine push ability from or , not display labels
GITHUB_LIST_REPOSITORY_COLLABORATORS
paginates; iterate all pages
GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER
may be inconclusive for non-collaborators
Common Patterns
ID Resolution
- Repo name -> owner/repo:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER
- PR number -> PR details:
GITHUB_FIND_PULL_REQUESTS
then GITHUB_GET_A_PULL_REQUEST
- Branch name -> SHA:
- Workflow name -> ID:
GITHUB_LIST_REPOSITORY_WORKFLOWS
Pagination
All list endpoints use page-based pagination:
- : Page number (starts at 1)
- : Results per page (max 100)
- Iterate until response returns fewer results than
Safety
- Always verify PR mergeable status before merge
- Require explicit user confirmation for destructive operations (merge, delete)
- Check CI status with
GITHUB_LIST_CHECK_RUNS_FOR_A_REF
before merging
Known Pitfalls
- Issues vs PRs:
GITHUB_LIST_REPOSITORY_ISSUES
returns both; check field
- Pagination limits: max 100; always iterate pages until empty
- Branch creation:
GITHUB_CREATE_A_REFERENCE
fails with 422 if reference already exists
- Merge guards: Merge can fail due to branch protection, failing checks, or draft status
- Code search limits: Only files <384KB on default branch; max 1000 results
- Commit search: Requires search text keywords alongside qualifiers
- Destructive actions: Repo deletion is irreversible; merge cannot be undone
- Silent permission drops: Labels, assignees, milestones silently dropped without push access
Quick Reference
| Task | Tool Slug | Key Params |
|---|
| List repos | GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER
| , , |
| Get repo | | , |
| Create issue | | , , , |
| List issues | GITHUB_LIST_REPOSITORY_ISSUES
| , , |
| Find PRs | GITHUB_FIND_PULL_REQUESTS
| , , |
| Create PR | GITHUB_CREATE_A_PULL_REQUEST
| , , , , |
| Merge PR | GITHUB_MERGE_A_PULL_REQUEST
| , , , |
| List branches | | , |
| Create branch | GITHUB_CREATE_A_REFERENCE
| , , , |
| Search code | | |
| List commits | | , , , |
| Search commits | GITHUB_SEARCH_COMMITS_BY_AUTHOR
| |
| List workflows | GITHUB_LIST_REPOSITORY_WORKFLOWS
| , |
| Trigger workflow | GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT
| , , , |
| Check CI | GITHUB_LIST_CHECK_RUNS_FOR_A_REF
| , , ref |
| List collaborators | GITHUB_LIST_REPOSITORY_COLLABORATORS
| , |
| Branch protection | GITHUB_GET_BRANCH_PROTECTION
| , , |