GitHub MCP: "403 Resource not accessible by personal access token" on create_pull_request
Error: failed to create pull request: POST https://api.github.com/repos/OWNER/REPO/pulls: 403 Resource not accessible by personal access token
What causes it
In our Oct 19, 2026 test of GitHub's remote MCP server (api.githubcopilot.com/mcp) with a fine-grained personal access token that had Contents and Issues set to read and write but no Pull requests permission, the agent could create a branch, commit files with create_or_update_file and push_files, and open and close issues, but create_pull_request failed with this 403. The same message comes back for any write to a repo outside the token's repository list: our create_branch on a repo the token did not cover got it too.
How to fix it
- Edit the token under GitHub Settings > Developer settings > Fine-grained tokens and set Pull requests to Read and write for the repo. Contents: write alone lets an agent push a branch but not open the PR.
- Check that the token's Repository access includes the target repo. Outside it, reads of public repos still work, but every write returns this 403.
- If the repo belongs to an organization, the organization may need to approve fine-grained tokens before they can write.
- In a plain MCP client, use a token: in our Oct 16 test GitHub's server refused OAuth dynamic client registration ("Incompatible auth server").
Where we hit it
- GitHub MCP test report (tested Oct 19, 2026). Setup: Claude, Claude Code, Cursor, VS Code, ChatGPT
Related fixes
- MCP error: "Incompatible auth server: does not support dynamic client registration"
- MCP Inspector keeps failing after a bad OAuth attempt
- GitHub MCP issue_write shows a form and creates nothing
- GitHub MCP sub_issue_write: "404 Not Found" when adding a sub-issue
All MCP fixes | Setup guides | Hit a different error? Request a test