Skip to content

[Code Quality] Fix get_me GitHub MCP tool returning 403 error #13964

@github-actions

Description

@github-actions

Description

The get_me GitHub MCP tool is returning a 403 "Resource not accessible by integration" error, preventing AI agents from accessing authenticated user context. This blocks agents from determining the authenticated user, limiting personalization and context awareness in workflows.

Impact: Agents cannot identify who they're running as, which is critical for:

  • User-specific workflow behavior
  • Personalized responses
  • Context-aware decision making
  • Proper attribution in generated content

Suggested Changes

  1. Investigate permission requirements

    • Check what GitHub API scopes are needed for the /user endpoint
    • Review current GITHUB_TOKEN permissions in MCP server configuration
    • Determine if additional OAuth scopes are required
  2. Fix integration permissions (choose one approach):

    • Option A: Add required OAuth scopes to GitHub App integration
    • Option B: Use alternative endpoint that works with current permissions
    • Option C: Document tool as unavailable and remove from default toolset if permissions cannot be granted
  3. Add error handling

    • Improve error message to explain why permission is denied
    • Provide fallback or workaround suggestions
    • Document limitations in MCP server documentation
  4. Test fix

    • Verify get_me returns user data successfully
    • Test with different authentication methods (GITHUB_TOKEN, PAT, App)
    • Update MCP structural analysis tests to validate fix

Files Affected

  • GitHub MCP server integration code
  • MCP server authentication/permission configuration
  • Documentation for GitHub MCP tool usage

Success Criteria

  • get_me tool returns user data without 403 error
  • Tool rated 4/5 or 5/5 in usefulness (currently 1/5)
  • Error handling improved with clear messages if permission denied
  • Documentation updated with permission requirements
  • MCP structural analysis no longer flags this tool as "Poor"

Source

Extracted from MCP Structural Analysis - 2026-02-05

Key finding from report:

"⭐ Poor Tools (Rating 1/5) - get_me (context): Returns 403 error: 'Resource not accessible by integration'. Cannot provide user context to agents. Critical Issue: Agents cannot determine authenticated user, limiting personalization and context awareness."

Tool analysis:

  • Tokens: 0 (error)
  • Rating: 1/5 (Poor)
  • Schema: Error
  • Impact: Critical - blocks user context access

Priority

High - Critical functionality for agent personalization and context awareness. Should be fixed or documented as unavailable.

Estimated Effort

2-4 hours (investigation + fix + testing)

AI generated by Discussion Task Miner - Code Quality Improvement Agent

  • expires on Feb 6, 2026, 5:16 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions