Use the official server as the source of truth.
GitHub maintains an official MCP server with remote and local installation paths and configurable toolsets. Start with its current documentation and repository rather than an old client snippet because endpoint, authentication, and supported-host behavior can change.
Decide which GitHub objects the workflow actually needs. Repository content, issues, pull requests, actions, code search, and organization administration do not carry the same risk. A toolset that includes everything is difficult to review and easy to over-authorize.
Choose remote or local based on the trust boundary.
The remote server can simplify setup and centralize the service, while a local Docker or process-based route can be useful when the operator wants more control over execution. Both routes still need a credential with the smallest practical repository, organization, and action scope.
Keep development and production identities separate. Test that a read-only request can succeed, a write request is denied or approved as intended, and a token without the required scope fails clearly instead of falling back to a broader credential.
Separate context gathering from code changes.
A strong first workflow asks the server to inspect an issue, file, commit, or pull request and return source-linked context. The next step can be a proposed patch or review comment. Publishing, merging, deleting, changing permissions, or triggering an action should remain a distinct approval boundary.
Make the agent show which repository, branch, issue, or pull request it used. This gives a maintainer a way to catch stale context, wrong branches, and instructions embedded in repository content before a write occurs.
Account for GitHub and client-specific limits.
GitHub's Copilot surfaces, Codex, Cursor, Claude, and other clients may expose different subsets of tools or use different authentication flows. Document the client used for the example and avoid implying that a remote endpoint has identical support everywhere.
When a task fails, check the toolset, credential scope, repository visibility, client approval, and GitHub-side policy separately. The error owner may be GitHub, the MCP server, the client, or the organization administrator.