GitHub Configuration Guide
Overview
DMtools provides 8 MCP tools for GitHub integration, focused on pull request management: listing PRs, getting details, reading comments and review conversations, adding comments/labels, and getting diffs.
If you only need the GitHub-focused AI assistant package, install /dmtools-github with the instructions in ../../installation/README.md#install-only-the-skills-you-need.
Authentication
Generate a Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token
- Select scopes:
repo— full repository access (read PRs, comments, reviews)write:discussion— if you need to post comments
- Copy the token immediately (shown only once)
Configure DMtools
Add to your dmtools.env:
SOURCE_GITHUB_TOKEN=ghp_YourPersonalAccessTokenHere
SOURCE_GITHUB_WORKSPACE=YourOrgOrUsername # optional default workspace
SOURCE_GITHUB_REPOSITORY=your-repo # optional default repository
SOURCE_GITHUB_BASE_PATH=https://api.github.com
SOURCE_GITHUB_BRANCH=main # optional default branch
DMTOOLS_INTEGRATIONS
If your dmtools.env contains a DMTOOLS_INTEGRATIONS list, make sure github is included:
# Without this, `dmtools list github` returns {"tools": []}
DMTOOLS_INTEGRATIONS=jira,cli,file,teams,figma,jira_xray,testrail,github,ado,confluence
Verify Setup
# List all GitHub tools (should return 12 tools)
dmtools list github
# Get a specific pull request
dmtools github_get_pr workspace=MyOrg repository=my-repo pullRequestId=42
Tools Available
| Tool | Description |
|---|---|
github_list_prs | List PRs by state (open, closed, merged) |
github_get_pr | Get PR details (title, state, author, branches, merge info) |
github_get_pr_comments | Get all comments (inline review + discussion) |
github_get_pr_conversations | Get inline review threads grouped by root/replies |
github_get_pr_activities | Get all activity (reviews + comments) |
github_add_pr_comment | Post a comment to the PR discussion |
github_reply_to_pr_thread | Reply to an existing inline review thread |
github_add_inline_comment | Create a new inline code review comment on a file/line |
github_get_pr_review_threads | Get all review threads via GraphQL (includes node IDs to resolve) |
github_resolve_pr_thread | Resolve a review thread via GraphQL mutation |
github_add_pr_label | Add a label to a PR |
github_remove_pr_label | Remove a label from a PR |
github_get_pr_diff | Get diff statistics (files changed, additions, deletions) |
Full reference: github-tools.md
GitHub Issues as Tracker
GitHub Issues can drive the Teammate job the same way Jira or Azure DevOps does.
DEFAULT_TRACKER=github
SOURCE_GITHUB_TOKEN=ghp_your_token
SOURCE_GITHUB_WORKSPACE=MyOrg
SOURCE_GITHUB_REPOSITORY=my-repo
Issue keys: MyOrg/my-repo#123, gh-123 (issue 123 in the default repository), or a bare number.
inputJql values:
| Value | Behavior |
|---|---|
MyOrg/my-repo#123 | Fetches that issue directly |
MyOrg/my-repo#1, MyOrg/my-repo#2 | Fetches each listed issue |
repo:MyOrg/my-repo is:issue is:open label:ai-ready | Runs a GitHub issue search |
Agent scripts: use the vendor-neutral tracker_* tools (for example tracker_get_ticket, tracker_post_comment) instead of jira_*; they are routed to GitHub by DEFAULT_TRACKER or by the key format.
Input folder: the Teammate CLI input folder for MyOrg/my-repo#123 is input/gh-123/.
GitHub Actions workflows that trigger the pipeline from issue labels are maintained in dmtools-agentic-workflows.
GitHub Enterprise
For GitHub Enterprise, set a custom base path:
SOURCE_GITHUB_BASE_PATH=https://github.yourcompany.com/api/v3