Bug Description
Using the GitHub MCP Server via npx in Claude Code, read operations (list_issues, get_file_contents) work fine, but write operations (create_issue, create_pull_request) fail with "Requires authentication" error.
Environment
- @modelcontextprotocol/server-github@2025.4.8
- Claude Code with ECC plugin
- Token has full repo scope (verified via direct API calls work)
Steps to Reproduce
- Configure GitHub MCP with GITHUB_PERSONAL_ACCESS_TOKEN env var
- Call list_issues → succeeds
- Call create_issue → fails with "Requires authentication"
Expected vs Actual
- Expected: create_issue should create an issue
- Actual: "Requires authentication" error even though token is valid
Additional Context
Direct API calls with the same token work fine. Only MCP write operations fail.
Error Message
Authentication Failed: Requires authentication
at githubRequest (file:///Users/xxxxx/.npm/_npx/812ed9af46615848/node_modules/@modelcontextprotocol/server-github/dist/common/utils.js:38:15)
The error occurs in the githubRequest function when attempting write operations.
Bug Description
Using the GitHub MCP Server via npx in Claude Code, read operations (list_issues, get_file_contents) work fine, but write operations (create_issue, create_pull_request) fail with "Requires authentication" error.
Environment
Steps to Reproduce
Expected vs Actual
Additional Context
Direct API calls with the same token work fine. Only MCP write operations fail.
Error Message
The error occurs in the githubRequest function when attempting write operations.