Kiro + GitHub MCP
The GitHub MCP server gives Kiro direct access to GitHub — issues, pull requests, repository content, comments, and more. Instead of copy-pasting issue descriptions into the chat, you can reference them by number and Kiro reads them live.
What You Can Do
Section titled “What You Can Do”- “Fix the bug described in issue #42”
- “Implement the feature requested in issue #87, following the existing code patterns”
- “Review this code against the acceptance criteria in PR #15”
- “List all open issues labelled ‘bug’ and prioritise them”
- “Read the README of org/repo and explain the project structure”
- “What changed in the last 5 commits on the main branch?”
Prerequisites
Section titled “Prerequisites”- GitHub account
- Personal Access Token (PAT) with appropriate scopes
Creating a token:
- GitHub → Settings → Developer Settings → Personal Access Tokens → Fine-grained tokens
- Select repositories to grant access to
- Permissions needed (minimum):
- Issues: Read
- Pull requests: Read
- Contents: Read (for reading file content and commits)
- Metadata: Read (always required)
Installation
Section titled “Installation”# No pre-install needed — npx handles it# Or install globallynpm install -g @modelcontextprotocol/server-githubConfiguration
Section titled “Configuration”Add to .kiro/mcp.json:
{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" } } }}Set the token in your environment:
# Linux/macOSexport GITHUB_TOKEN="github_pat_your_token_here"
# Windows PowerShell$env:GITHUB_TOKEN = "github_pat_your_token_here"What Kiro Can Access
Section titled “What Kiro Can Access”| Capability | Description |
|---|---|
| Read issue | Title, body, labels, assignees, comments |
| List issues | Filter by label, state, assignee, milestone |
| Read PR | Description, changed files, review comments |
| List PRs | Open/closed, by branch, by author |
| Read file | Contents of any file in any branch |
| List commits | Commit history with messages and diffs |
| Search code | Search across repositories |
| Read repository | README, topics, description |
Practical Examples
Section titled “Practical Examples”Fix a bug from an issue:
User: Fix issue #42
Kiro:1. Fetches issue #42 — "NullReferenceException in OrderService.ProcessRefund when order has no items"2. Reads the stack trace and reproduction steps from the issue3. Locates the relevant code in your project4. Implements the fix5. Writes a regression test matching the reproduction stepsFeature from an issue with design discussion:
User: Implement #87 — be sure to follow the approach agreed in the comments
Kiro:1. Reads issue #87 body2. Reads all comments (including the agreed approach in comment #5)3. Generates spec that follows the agreed design4. Implements accordinglyCross-repo context:
User: The shared library repo is MyOrg/shared-lib. Read how ErrorHandler is implemented there and use the same pattern here.
Kiro:1. Fetches src/ErrorHandler.cs from MyOrg/shared-lib on GitHub2. Understands the pattern3. Applies it to the current projectGitHub Actions Integration
Section titled “GitHub Actions Integration”With read access to workflows, Kiro can:
- Read your CI workflow files and debug failing pipeline logic
- Generate new workflow files consistent with your existing CI setup
- Explain what a workflow step does
User: My GitHub Actions workflow is failing on the deploy step. Read .github/workflows/deploy.yml and explain what's wrong.Security Notes
Section titled “Security Notes”- Use fine-grained tokens scoped to specific repositories rather than classic tokens with broad access
- Set an expiry date on the token (90 days is a reasonable default)
- The MCP server is read-only — it cannot create issues, push code, or merge PRs unless you grant write permissions (not recommended for normal use)
- Never commit the token to
.kiro/mcp.json— always use${ENV_VAR}references