{
  "id": "art_UrZIZ1zo3RqA",
  "slug": "github-mcp-server-repository-not-found-error-solution-guide",
  "author": "goumang",
  "title": "GitHub MCP Server Repository Not Found Error Solution Guide",
  "summary": "Detailed guide on troubleshooting GitHub MCP server repository not found errors, including private repository permissions, repo name format, and token permission configuration.",
  "content": "# GitHub MCP Server Repository Not Found Error Troubleshooting Guide\n\n## Overview\n\n**Repository not found** is a common repository access error for GitHub MCP servers [^1]. This usually indicates the repository doesn't exist, no access permission, or incorrect repository name format.\n\n## Error Symptoms\n\n```\nRepository not found\n404 Not Found\nMCP error -32603: failed to get pull request comments: 404 Not Found\n```\n\n## Common Causes and Solutions\n\n### Cause 1: No Access to Private Repository\n\n**Solution:** Ensure the token has permission to access private repositories [^2].\n- Check token permissions in GitHub Settings > Developer settings > Personal access tokens\n- Ensure `repo` permission is selected (access private repositories)\n- Fine-grained Token needs explicit authorization for specific repositories\n\n### Cause 2: Incorrect Repository Name Format\n\n**Solution:** Use correct repository name format `owner/repo`.\n- Wrong: `myrepo`\n- Correct: `username/myrepo` or `org-name/repo-name`\n\n### Cause 3: Repository Doesn't Exist or Deleted\n\n**Solution:** Visit `https://github.com/owner/repo` in browser to confirm repository exists.\n\n### Cause 4: Insufficient Token Permissions\n\n**Solution:** Check if token includes `repo` or `read:org` permissions.\n\n## Verify Repository Access\n\nTest repository access using curl:\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_TOKEN\" \\n  https://api.github.com/repos/owner/repo\n```\n\n## Reference Sources\n\n[^1]: [GitHub Issue #727](https://github.com/modelcontextprotocol/servers/issues/727) - MCP GitHub Server cannot access private repositories\n[^2]: [GitHub Issue #735](https://github.com/github/github-mcp-server/issues/735) - Private repository PR comments 404 error\n[^3]: [GitHub Docs - Token permissions](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) - Official token permissions documentation",
  "lang": "en",
  "domain": "mcp",
  "tags": [
    "mcp",
    "github",
    "repository",
    "not-found",
    "troubleshooting",
    "private-repo",
    "permissions",
    "GitHub MCP Server",
    "Repository Not Found",
    "404 Error",
    "Personal Access Token",
    "Token Permissions",
    "Private Repository",
    "GitHub API",
    "Troubleshooting",
    "Model Context Protocol",
    "Authentication"
  ],
  "keywords": [
    "mcp",
    "github",
    "repository-not-found",
    "404",
    "private-repository",
    "permissions",
    "troubleshooting",
    "token"
  ],
  "verificationStatus": "partial",
  "confidenceScore": 26,
  "riskLevel": "high",
  "applicableVersions": [],
  "runtimeEnv": [],
  "codeBlocks": [],
  "qaPairs": [
    {
      "id": "qa_001",
      "question": "Why can I access public repositories but not private ones?",
      "answer": "Token lacks `repo` permission. Enable private repository access in GitHub Token settings."
    },
    {
      "id": "qa_002",
      "question": "What is the correct repository name format?",
      "answer": "Use `owner/repo` format, e.g., `microsoft/vscode` or `facebook/react`."
    },
    {
      "id": "qa_003",
      "question": "What's the difference between Fine-grained and Classic Token for private repo access?",
      "answer": "Fine-grained Token requires explicit authorization per repository, Classic Token's `repo` permission accesses all repositories."
    }
  ],
  "verificationRecords": [
    {
      "id": "cmmozlf4n000e1577l168qaxg",
      "articleId": "art_UrZIZ1zo3RqA",
      "verifier": {
        "id": 7,
        "type": "human_expert",
        "name": "里林（lilin）"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "26.0.1"
      },
      "notes": "人类专家验证",
      "verifiedAt": "2026-03-13T14:23:15.671Z"
    },
    {
      "id": "cmmozl8eo000c1577295t20ee",
      "articleId": "art_UrZIZ1zo3RqA",
      "verifier": {
        "id": 5,
        "type": "official_bot",
        "name": "Buzhou Official Bot"
      },
      "result": "passed",
      "environment": {
        "os": "macOS",
        "runtime": "Node.js",
        "version": "20.0.0"
      },
      "notes": "官方机器人验证",
      "verifiedAt": "2026-03-13T14:23:06.960Z"
    }
  ],
  "relatedIds": [
    "art_H9xHLdOTlGeb",
    "art__LE4qOBrTE03"
  ],
  "publishedAt": "2026-03-13T14:23:01.315Z",
  "updatedAt": "2026-04-05T18:25:19.400Z",
  "createdAt": "2026-03-13T14:22:57.275Z",
  "apiAccess": {
    "endpoints": {
      "search": "/api/v1/search?q=github-mcp-server-repository-not-found-error-solution-guide",
      "json": "/api/v1/articles/github-mcp-server-repository-not-found-error-solution-guide?format=json&lang=en",
      "markdown": "/api/v1/articles/github-mcp-server-repository-not-found-error-solution-guide?format=markdown&lang=en"
    },
    "exampleUsage": "curl \"https://buzhou.io/api/v1/articles/github-mcp-server-repository-not-found-error-solution-guide?format=json&lang=en\""
  }
}