Files
shopdb-flask/.claude/setup/GITHUB-MCP-SETUP.md
Proudlock bd48814021 Reorganize repository structure and clean up documentation
Clean up and organize the flask-shopdb repository for better
maintainability and discoverability:

## Changes

- Update .gitignore for build artifacts (publish/, data/, 122M total)
- Reorganize .claude/ into 6 subdirectories with README navigation
- Consolidate overlapping MCP setup guides into MCP-QUICK-START.md
- Move deployment docs from root to docs/deployment/
- Archive dated status reports to .claude/archived/
- Delete temporary files (logs, backups, empty reports, ~50K)

## New Structure

.claude/ organized into:
- setup/ - MCP, VM, Hyper-V, GitHub setup guides + scripts (17 files)
- plans/ - Feature plans and protocols (5 files)
- maintenance/ - Deployment checklists and reports (4 files)
- archived/ - Historical documentation (9 files)
- skills/ - Claude Code automation (5 files)
- workflows/ - Security audit workflow (1 file)

docs/deployment/ created with 6 deployment guides:
- LOCAL-DEV-SETUP.md, DOCKER-SETUP.md, DOCKER-PREBUILT-APPROACH.md
- PRODUCTION-READINESS.md, DEPLOY-TO-VM.md, README.md

Root directory cleaned to essential docs only:
- CLAUDE.md, README.md, CONTRIBUTING.md, CHANGELOG.md

Benefits:
- Clear navigation via README.md in each subdirectory
- No duplicate/overlapping documentation
- Large artifacts properly gitignored (won't bloat repository)
- Historical context preserved in archived/

See .claude/CLEANUP-SUMMARY.md for complete details.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-09-11 15:45:05 -04:00

1.7 KiB

GitHub MCP Setup Guide

The GitHub MCP server failed to connect with error:

Authorization header is badly formatted

Fixing the GitHub MCP Connection

  1. Check MCP configuration (likely in .claude/mcp.json or Claude app settings):

    {
      "mcpServers": {
        "github": {
          "command": "...",
          "args": [...],
          "env": {
            "GITHUB_TOKEN": "your-token-here"
          }
        }
      }
    }
    
  2. Verify GitHub token:

  3. Token format:

    • Classic PAT: ghp_... (starts with ghp_)
    • Fine-grained PAT: github_pat_...
    • No extra quotes or whitespace
  4. Common issues:

    • Token expired (regenerate on GitHub)
    • Wrong token format (not base64 encoded, just raw token)
    • Authorization header format (should be Bearer <token> or token <token>)
  5. Test token manually:

    curl -H "Authorization: token YOUR_TOKEN" https://api.github.com/user
    

What GitHub MCP Would Enable

Once connected, I could:

  • Create PRs directly from conversation
  • Check CI/CD status
  • Link commits to issues
  • Review PR comments
  • Update issue status

Alternative: Manual Git + GitHub CLI

If MCP stays broken, you can use gh CLI:

# Install GitHub CLI if not present
winget install --id GitHub.cli

# Authenticate
gh auth login

# I can then use gh commands via Bash tool
gh pr create --title "..." --body "..."
gh pr status

To Diagnose

Check Claude Code settings or MCP config file for the github server configuration and verify the token is valid.