Open
Description
Describe the bug
When attempting to create a pull request using the mcp_github_create_pull_request
tool, the operation fails with a 403 error despite having what appears to be a valid personal access token configured.
Affected version
docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version
server version v0.1.1 (7ab5d96) 2025-04-07T16:05:06Z
(Version information to be added after running the command)
Steps to reproduce the behavior
- Configure GitHub PAT in ~/.cursor/mcp.json (macOS)
- Run a workflow using the GitHub MCP tools
- Attempt to create a pull request using
mcp_github_create_pull_request
- Observe the error response
mcp.json
{
"mcpServers": {
"Framelink Figma MCP": {
"command": "npx",
"args": [
"-y",
"figma-developer-mcp",
"--figma-api-key=...",
"--stdio"
]
},
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
}
},
"toolbox": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"run",
"@smithery/toolbox",
"--key",
"..."
]
}
}
}
Expected vs actual behavior
Expected behavior:
The pull request should be created successfully in the specified repository.
Actual behavior:
The operation fails with a 403 error:
MCP error -32603: failed to create pull request: POST https://api.github.com/repos/Project-Unifest/unifest-web/pulls: 403 Resource not accessible by personal access token []
Logs
{
"error": "MCP error -32603: failed to create pull request: POST https://api.github.com/repos/Project-Unifest/unifest-web/pulls: 403 Resource not accessible by personal access token []"
}
Additional information
- Multiple tokens were tried (both fine-grained and classic PATs)
- Token has appropriate repo permissions for the repository
Have a nice day, @bruce