Skip to main content

Overview

Build an autonomous agent that connects to GitHub, analyzes repository data — issues, pull requests, commit activity — and generates structured reports in your workspace.

Prerequisites

Environment Variables

Installation

Example: Repository Issue Analysis

The agent fetches open issues from a data science repository, categorizes them by label, and writes a summary report to the workspace.
Generated output in ./reports/pandas_issues_report.md:

Example: Compare Contributor Activity

The agent fetches recent commits from a repository and summarizes contributor activity.

Available Tools

The GitHub MCP server exposes tools including:
ToolDescription
list_issuesList issues in a repository
create_issueCreate a new issue
get_pull_requestGet PR details and diff
search_repositoriesSearch for repositories
get_file_contentsRead file contents from a repo
list_commitsList recent commits

Security Notes

  • Use a fine-grained personal access token with only the permissions your agent needs.
  • Store your token in .env — never hardcode it.
  • For production, use GitHub Apps with scoped installation tokens instead of personal access tokens.