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 Enterprise
For GitHub Enterprise, set a custom base path:
SOURCE_GITHUB_BASE_PATH=https://github.yourcompany.com/api/v3