|
| 1 | +--- |
| 2 | +title: "GitHub Issues and PRs with GitHub MCP and Continue" |
| 3 | +description: "Use Continue and the GitHub MCP to list, summarize, and act on open issues and recently merged pull requests with natural language prompts." |
| 4 | +sidebarTitle: "GitHub Issues with Continue" |
| 5 | +--- |
| 6 | + |
| 7 | +<Card title="What You'll Build" icon="github"> |
| 8 | + A GitHub workflow assistant that uses Continue with the GitHub MCP to: |
| 9 | + - List, filter, and summarize open issues |
| 10 | + - Review and summarize recently merged PRs |
| 11 | + - Post comments with AI-generated summaries or checklists |
| 12 | + - Automate routine GitHub maintenance with headless CLI runs |
| 13 | +</Card> |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +Before starting, ensure you have: |
| 18 | + |
| 19 | +- Continue account with **Hub access** |
| 20 | +- Read: [Understanding Agents — How to get started with Hub agents](/guides/understanding-agents#how-to-get-started-with-hub-agents) |
| 21 | +- Node.js 22+ installed locally |
| 22 | +- A GitHub account and a repository to work with |
| 23 | +- A GitHub token with the appropriate scopes: |
| 24 | + - For read-only: `repo:read` |
| 25 | + - To comment on issues/PRs: `public_repo` for public repos or `repo` for private repos |
| 26 | + |
| 27 | +For all options, first: |
| 28 | +<Steps> |
| 29 | +<Step title="Install Continue CLI"> |
| 30 | + ```bash |
| 31 | + npm i -g @continuedev/cli |
| 32 | + ``` |
| 33 | + </Step> |
| 34 | + |
| 35 | +<Step title="Configure GitHub Token"> |
| 36 | + Add your `GITHUB_TOKEN` to your [Continue Hub agent's environment variables](https://hub.continue.dev/settings). |
| 37 | + </Step> |
| 38 | +</Steps> |
| 39 | + |
| 40 | +<Warning> |
| 41 | + To use agents in headless mode, you need a [Continue API key](https://hub.continue.dev/settings/api-keys). |
| 42 | + For write actions (e.g., posting comments), your token must include the relevant GitHub scopes. |
| 43 | +</Warning> |
| 44 | + |
| 45 | +## GitHub MCP Workflow Options |
| 46 | + |
| 47 | +<Card title="🚀 Fastest Path to Success" icon="rocket"> |
| 48 | + Use the GitHub MCP from Continue Hub for one-click setup, or add it via CLI. |
| 49 | +</Card> |
| 50 | + |
| 51 | +After ensuring you meet the **Prerequisites** above, you have two paths to get started: |
| 52 | + |
| 53 | +<Tabs> |
| 54 | + <Tab title="⚡ Quick Start (Recommended)"> |
| 55 | + <Steps> |
| 56 | + <Step title="Install GitHub MCP via Continue Hub"> |
| 57 | + Visit the [Anthropic GitHub MCP](https://hub.continue.dev/anthropic/github-mcp) on Continue Hub and click **Install** to add it to your agent. |
| 58 | + |
| 59 | + The listing provides a pre-configured MCP block; add your `GITHUB_TOKEN` in Hub. |
| 60 | + </Step> |
| 61 | + |
| 62 | + <Step title="Launch the Agent"> |
| 63 | + From your repo root: |
| 64 | + ```bash |
| 65 | + cn --config continuedev/github-manager-ai |
| 66 | + ``` |
| 67 | + Now try: "List my open issues labeled bug and summarize priorities." |
| 68 | + </Step> |
| 69 | + </Steps> |
| 70 | + |
| 71 | + <Info> |
| 72 | + You can also attach an MCP to a one-off session: `cn --mcp anthropic/github-mcp`. |
| 73 | + </Info> |
| 74 | + </Tab> |
| 75 | + |
| 76 | + <Tab title="🛠️ Manual Setup"> |
| 77 | + <Steps> |
| 78 | + <Step title="Create a New Agent on Continue Hub"> |
| 79 | + Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent). |
| 80 | + </Step> |
| 81 | + |
| 82 | + <Step title="Add GitHub MCP"> |
| 83 | + Install from Hub (recommended) or add YAML manually. Minimal YAML example: |
| 84 | + |
| 85 | + ```yaml title="config.yaml" |
| 86 | + mcpServers: |
| 87 | + - name: GitHub MCP |
| 88 | + command: npx |
| 89 | + args: |
| 90 | + - "-y" |
| 91 | + - "@modelcontextprotocol/server-github" |
| 92 | + env: |
| 93 | + GITHUB_TOKEN: ${env:GITHUB_TOKEN} |
| 94 | + connectionTimeout: 30 |
| 95 | + ``` |
| 96 | +
|
| 97 | + Notes: |
| 98 | + - The exact `command`/`args` may differ based on the MCP you choose on Hub. Hub templates prefill these for you. |
| 99 | + - Provide `GITHUB_TOKEN` via environment or Hub secrets. |
| 100 | + </Step> |
| 101 | + |
| 102 | + <Step title="Test the Connection"> |
| 103 | + Launch Continue and ask: |
| 104 | + ``` |
| 105 | + List the 5 most recently updated open issues in this repository. |
| 106 | + ``` |
| 107 | + </Step> |
| 108 | + </Steps> |
| 109 | + </Tab> |
| 110 | +</Tabs> |
| 111 | + |
| 112 | +<Accordion title="Agent Requirements"> |
| 113 | + To use GitHub MCP with Continue CLI, you need either: |
| 114 | + - **Continue CLI Pro Plan** with the models add-on, OR |
| 115 | + - **Your own API keys** added to Continue Hub secrets |
| 116 | + |
| 117 | + The agent will automatically detect and use your configuration along with the GitHub MCP for issue and PR operations. |
| 118 | + |
| 119 | +</Accordion> |
| 120 | + |
| 121 | +--- |
| 122 | + |
| 123 | +## Issue Workflows |
| 124 | + |
| 125 | +Use natural language to explore, triage, and act on open issues. The agent calls GitHub MCP tools under the hood. |
| 126 | + |
| 127 | +<Info> |
| 128 | + **Where to run these workflows:** |
| 129 | + - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs |
| 130 | + - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts |
| 131 | + - **CLI (headless mode)**: Use `cn -p "your prompt" --auto` for automation |
| 132 | +</Info> |
| 133 | + |
| 134 | +### Triage and Summaries |
| 135 | + |
| 136 | +<Card title="Summarize Open Issues" icon="clipboard-list"> |
| 137 | + Get a prioritized overview of current open issues. |
| 138 | + |
| 139 | +**TUI Mode Prompt:** |
| 140 | +``` |
| 141 | +List the 20 most recently updated open issues in this repo. |
| 142 | +Cluster by label and severity. Summarize top priorities. |
| 143 | +``` |
| 144 | +
|
| 145 | +**Headless Mode Prompt:** |
| 146 | +```bash |
| 147 | +cn -p "List the 20 most recently updated open issues in this repo. Cluster by label and severity. Summarize top priorities." --auto |
| 148 | +``` |
| 149 | +</Card> |
| 150 | + |
| 151 | +<Card title="Owner/Label Filters" icon="filter"> |
| 152 | + Narrow by label or assignee. |
| 153 | + |
| 154 | +**TUI Mode Prompt:** |
| 155 | +``` |
| 156 | +Show open issues labeled bug or security, assigned to @me. |
| 157 | +Summarize blockers and suggest next steps. |
| 158 | +``` |
| 159 | + |
| 160 | +**Headless Mode Prompt:** |
| 161 | +```bash |
| 162 | +cn -p "Show open issues labeled bug or security, assigned to @me. Summarize blockers and suggest next steps." --auto |
| 163 | +``` |
| 164 | +</Card> |
| 165 | + |
| 166 | +### Taking Action |
| 167 | + |
| 168 | +<Card title="Comment on an Issue" icon="comment"> |
| 169 | + Post an AI-generated status update or checklist. |
| 170 | + |
| 171 | +**TUI Mode Prompt:** |
| 172 | +``` |
| 173 | +Find the issue with the most engagement (comments, reactions) in the last 30 days. |
| 174 | +Come up with a triage plan and draft a comment with: |
| 175 | +- current hypothesis |
| 176 | +- next 2 steps |
| 177 | +- owner and ETA |
| 178 | +Then post the comment. |
| 179 | +``` |
| 180 | + |
| 181 | +**Headless Mode Prompt:** |
| 182 | +```bash |
| 183 | +cn -p "Find the issue with the most engagement in the last 30 days. Come up with a triage plan and draft a comment (hypothesis, next 2 steps, owner, ETA) and post it." --auto |
| 184 | +``` |
| 185 | + |
| 186 | +<Note> |
| 187 | + Requires a token with permission to comment (`public_repo` or `repo`). The agent will confirm before posting unless `--auto` is used. |
| 188 | +</Note> |
| 189 | +</Card> |
| 190 | + |
| 191 | +<Card title="Find Stale Issues" icon="clock"> |
| 192 | + Identify issues that need attention. |
| 193 | + |
| 194 | +**TUI Mode Prompt:** |
| 195 | +``` |
| 196 | +Find open issues with no activity in the last 30 days. |
| 197 | +Suggest action (close, needs-repro, or prioritize) and draft comments. |
| 198 | +``` |
| 199 | + |
| 200 | +**Headless Mode Prompt:** |
| 201 | +```bash |
| 202 | +cn -p "Find open issues with no activity in the last 30 days. Suggest action and draft comments for each." --auto |
| 203 | +``` |
| 204 | +</Card> |
| 205 | + |
| 206 | +--- |
| 207 | + |
| 208 | +## Merged PR Workflows |
| 209 | + |
| 210 | +Analyze recently merged PRs for change awareness, release notes, and quality signals. |
| 211 | + |
| 212 | +### Recently Merged Overview |
| 213 | + |
| 214 | +<Card title="Merged PR Digest" icon="code-merge"> |
| 215 | + Summarize merged PRs over a time window. |
| 216 | + |
| 217 | +**TUI Mode Prompt:** |
| 218 | +``` |
| 219 | +List PRs merged in the last 7 days. |
| 220 | +Group by area (label or path). Summarize impact and notable changes. |
| 221 | +``` |
| 222 | + |
| 223 | +**Headless Mode Prompt:** |
| 224 | +```bash |
| 225 | +cn -p "List PRs merged in the last 7 days. Group by area (label or path). Summarize impact and notable changes." --auto |
| 226 | +``` |
| 227 | +</Card> |
| 228 | + |
| 229 | +### Release Notes |
| 230 | + |
| 231 | +<Card title="Generate Release Notes" icon="file-lines"> |
| 232 | + Turn merged PRs into crisp release notes. |
| 233 | + |
| 234 | +**TUI Mode Prompt:** |
| 235 | +``` |
| 236 | +Generate release notes for PRs merged since tag v1.2.0. |
| 237 | +Use keep-a-changelog sections and include PR numbers/authors. |
| 238 | +``` |
| 239 | + |
| 240 | +**Headless Mode Prompt:** |
| 241 | +```bash |
| 242 | +cn -p "Generate release notes for PRs merged since tag v1.2.0. Use keep-a-changelog sections and include PR numbers/authors." --auto |
| 243 | +``` |
| 244 | +</Card> |
| 245 | + |
| 246 | +### Deep Dives |
| 247 | + |
| 248 | +<Card title="Summarize a PR" icon="magnifying-glass"> |
| 249 | + Get a human-readable summary of a recently merged PR with active discussion. |
| 250 | + |
| 251 | +**TUI Mode Prompt:** |
| 252 | +``` |
| 253 | +Find the last merged PR with a significant amount of comments. |
| 254 | +Summarize the conversation, including goal, key changes, |
| 255 | +risk areas, and any follow-ups. |
| 256 | +``` |
| 257 | + |
| 258 | +**Headless Mode Prompt:** |
| 259 | +```bash |
| 260 | +cn -p "Find the last merged PR with a significant amount of comments. Summarize the conversation including goal, key changes, risk areas, and follow-ups." --auto |
| 261 | +``` |
| 262 | +</Card> |
| 263 | + |
| 264 | +--- |
| 265 | + |
| 266 | +## Automate with GitHub Actions |
| 267 | + |
| 268 | +Run headless commands on a schedule or in PRs to keep teams informed. |
| 269 | + |
| 270 | +### Add GitHub Secrets |
| 271 | + |
| 272 | +Repository Settings → Secrets and variables → Actions: |
| 273 | + |
| 274 | +- `CONTINUE_API_KEY`: From [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys) |
| 275 | +- `GITHUB_TOKEN`: A token with permissions to read issues/PRs and post comments |
| 276 | + |
| 277 | +### Example Workflow |
| 278 | + |
| 279 | +Create `.github/workflows/github-mcp-reports.yml`: |
| 280 | + |
| 281 | +```yaml |
| 282 | +name: GitHub MCP Reports |
| 283 | + |
| 284 | +on: |
| 285 | + schedule: |
| 286 | + - cron: "0 13 * * 1" # Mondays 13:00 UTC |
| 287 | + workflow_dispatch: |
| 288 | + pull_request: |
| 289 | + types: [opened, synchronize] |
| 290 | + |
| 291 | +jobs: |
| 292 | + report: |
| 293 | + runs-on: ubuntu-latest |
| 294 | + env: |
| 295 | + CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} |
| 296 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 297 | + steps: |
| 298 | + - uses: actions/checkout@v4 |
| 299 | + - uses: actions/setup-node@v4 |
| 300 | + with: |
| 301 | + node-version: "18" |
| 302 | + - name: Install Continue CLI |
| 303 | + run: npm i -g @continuedev/cli |
| 304 | + |
| 305 | + - name: Weekly Issue Triage Summary |
| 306 | + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' |
| 307 | + run: | |
| 308 | + cn --config continuedev/github-manager-ai \ |
| 309 | + -p "List open issues updated in the last 14 days. Group by label and priority. Propose top 5 actions and include issue links." \ |
| 310 | + --auto > issue_summary.txt |
| 311 | +
|
| 312 | + - name: Post PR Context Comment |
| 313 | + if: github.event_name == 'pull_request' |
| 314 | + env: |
| 315 | + PR_NUMBER: ${{ github.event.pull_request.number }} |
| 316 | + run: | |
| 317 | + REPORT=$(cn --config continuedev/github-manager-ai \ |
| 318 | + -p "Summarize the context for PR #${PR_NUMBER}: related open issues, risk areas, and test suggestions. Keep under 200 words." \ |
| 319 | + --auto) |
| 320 | + gh pr comment ${PR_NUMBER} --body "$REPORT" |
| 321 | +``` |
| 322 | +
|
| 323 | +<Info> |
| 324 | + Use `continuedev/github-manager-ai` consistently throughout your automation as the recommended agent configuration. |
| 325 | +</Info> |
| 326 | + |
| 327 | +--- |
| 328 | + |
| 329 | +## Troubleshooting |
| 330 | + |
| 331 | +- **Missing or invalid token:** Ensure `GITHUB_TOKEN` is set and has the required scopes. Try a minimal test: “List 3 open issues in this repo”. |
| 332 | +- **Permissions errors on comment:** Your token must include `public_repo` (public) or `repo` (private) to write comments. |
| 333 | +- **Rate limiting:** Reduce frequency or filter queries; consider using a PAT distinct from the default Actions token when running in CI. |
| 334 | +- **MCP connection timeout:** If using custom YAML, increase `connectionTimeout` or verify the `command`/`args` from the Hub listing. |
| 335 | + |
| 336 | +## What You've Built |
| 337 | + |
| 338 | +After completing this guide, you have a complete **AI-powered GitHub workflow system** that: |
| 339 | + |
| 340 | +- ✅ Uses natural language — Simple prompts for complex GitHub operations |
| 341 | +- ✅ Automates issue triage — AI analyzes and summarizes open issues |
| 342 | +- ✅ Generates release notes — Automatic PR digests and changelogs |
| 343 | +- ✅ Runs continuously — Automated reports via GitHub Actions |
| 344 | + |
| 345 | +<Card title="Continuous AI" icon="rocket"> |
| 346 | + Your GitHub workflow now operates at **[Level 2 Continuous |
| 347 | + AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** - |
| 348 | + AI handles routine issue triage and PR summaries with human oversight |
| 349 | + through review and approval. |
| 350 | +</Card> |
| 351 | + |
| 352 | +## Next Steps |
| 353 | + |
| 354 | +1. **Explore your issues** - Try the issue triage prompts on your repository |
| 355 | +2. **Generate release notes** - Use the merged PR prompts to create changelogs |
| 356 | +3. **Set up automation** - Add the GitHub Actions workflow to your repo |
| 357 | +4. **Customize prompts** - Tailor the prompts to your team's workflow |
| 358 | +5. **Monitor progress** - Track issue resolution metrics over time |
| 359 | + |
| 360 | +## Additional Resources |
| 361 | + |
| 362 | +<CardGroup cols={2}> |
| 363 | + <Card title="GitHub MCP (Anthropic)" icon="link" href="https://hub.continue.dev/anthropic/github-mcp"> |
| 364 | + Anthropic GitHub MCP on Continue Hub |
| 365 | + </Card> |
| 366 | + <Card title="MCP in Continue" icon="book" href="/customize/deep-dives/mcp"> |
| 367 | + How MCP works with Continue agents |
| 368 | + </Card> |
| 369 | + <Card title="GitHub Manager AI Agent" icon="robot" href="https://hub.continue.dev/continuedev/github-manager-ai"> |
| 370 | + Pre-configured agent on Continue Hub |
| 371 | + </Card> |
| 372 | + <Card title="GitHub MCP Server" icon="link" href="https://github.com/github/github-mcp-server/blob/main/README.md"> |
| 373 | + Official GitHub MCP server README |
| 374 | + </Card> |
| 375 | +</CardGroup> |
| 376 | + |
0 commit comments