GitHub Automation via Rube MCP
Automate GitHub repository management, issue tracking, pull request workflows, branch operations, and CI/CD through Composio's GitHub toolkit.
Toolkit docs: composio.dev/toolkits/github
Prerequisites
- •Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- •Active GitHub connection via
RUBE_MANAGE_CONNECTIONSwith toolkitgithub - •Always call
RUBE_SEARCH_TOOLSfirst to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp 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
RUBE_SEARCH_TOOLSresponds - •Call
RUBE_MANAGE_CONNECTIONSwith toolkitgithub - •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] - •
GITHUB_CREATE_AN_ISSUE- 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:
- •
owner: Repository owner (username or org), case-insensitive - •
repo: Repository name without .git extension - •
title: Issue title (required for creation) - •
body: Issue description (supports Markdown) - •
labels: Array of label names - •
assignees: Array of GitHub usernames - •
state: 'open', 'closed', or 'all' for filtering
Pitfalls:
- •
GITHUB_LIST_REPOSITORY_ISSUESreturns both issues AND pull requests; checkpull_requestfield to distinguish - •Only users with push access can set assignees, labels, and milestones; they are silently dropped otherwise
- •Pagination:
per_pagemax 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:
- •
head: Source branch with changes (must exist; for cross-repo: 'username:branch') - •
base: Target branch to merge into (e.g., 'main') - •
title: PR title (required unlessissuenumber provided) - •
merge_method: 'merge', 'squash', or 'rebase' - •
state: 'open', 'closed', or 'all'
Pitfalls:
- •
GITHUB_CREATE_A_PULL_REQUESTfails with 422 if base/head are invalid, identical, or already merged - •
GITHUB_MERGE_A_PULL_REQUESTcan be rejected if PR is draft, closed, or branch protection applies - •Always verify mergeable status with
GITHUB_GET_A_PULL_REQUESTimmediately 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] - •
GITHUB_GET_A_REPOSITORY- 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] - •
GITHUB_LIST_BRANCHES- List branches [Required] - •
GITHUB_CREATE_A_REFERENCE- Create new branch from SHA [Required] - •
GITHUB_UPDATE_A_REPOSITORY- Update repo settings [Optional]
Key parameters:
- •
name: Repository name - •
private: Boolean for visibility - •
ref: Full reference path (e.g., 'refs/heads/new-branch') - •
sha: Commit SHA to point the new reference to - •
default_branch: Default branch name
Pitfalls:
- •
GITHUB_CREATE_A_REFERENCEonly creates NEW references; useGITHUB_UPDATE_A_REFERENCEfor existing ones - •
refmust start with 'refs/' and contain at least two slashes - •
GITHUB_LIST_BRANCHESpaginates viapage/per_page; iterate until empty page - •
GITHUB_DELETE_A_REPOSITORYis 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:
- •
GITHUB_SEARCH_CODE- Search file contents and paths [Required] - •
GITHUB_SEARCH_CODE_ALL_PAGES- Multi-page code search [Alternative] - •