Title: Intermittent HTTP 500 from remote MCP endpoint: "can't get copilot user by id" twirp permission_denied · Issue #2508 · github/github-mcp-server · GitHub
Open Graph Title: Intermittent HTTP 500 from remote MCP endpoint: "can't get copilot user by id" twirp permission_denied · Issue #2508 · github/github-mcp-server
X Title: Intermittent HTTP 500 from remote MCP endpoint: "can't get copilot user by id" twirp permission_denied · Issue #2508 · github/github-mcp-server
Description: Description Since approximately May 18, 2026 (coinciding with v1.0.5 release), the remote MCP endpoint at https://api.githubcopilot.com/mcp/ intermittently returns HTTP 500 with a raw text/plain error body. The failure rate is approximat...
Open Graph Description: Description Since approximately May 18, 2026 (coinciding with v1.0.5 release), the remote MCP endpoint at https://api.githubcopilot.com/mcp/ intermittently returns HTTP 500 with a raw text/plain er...
X Description: Description Since approximately May 18, 2026 (coinciding with v1.0.5 release), the remote MCP endpoint at https://api.githubcopilot.com/mcp/ intermittently returns HTTP 500 with a raw text/plain er...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2508
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Intermittent HTTP 500 from remote MCP endpoint: \"can't get copilot user by id\" twirp permission_denied","articleBody":"### Description\n\nSince approximately May 18, 2026 (coinciding with v1.0.5 release), the remote MCP endpoint at `https://api.githubcopilot.com/mcp/` intermittently returns HTTP 500 with a raw text/plain error body. The failure rate is approximately **7–10%** and affects write operations like `create_branch`. Read-only operations (`search_repositories`, `get_file_contents`) appear unaffected.\n\n### Error Response\n\n**HTTP Status:** `500 Internal Server Error` \n**Content-Type:** `text/plain; charset=utf-8` (not a valid JSON-RPC or SSE response)\n\n```\ncan't get copilot user by id: error getting copilot user details: twirp error permission_denied: Error from intermediary with HTTP status code 403 \"Forbidden\"\n```\n\n### Full Request/Response Context\n\n**Request:**\n```http\nPOST https://api.githubcopilot.com/mcp/\nAuthorization: Bearer \u003cvalid-PAT-with-repo-scope\u003e\nContent-Type: application/json\nAccept: application/json, text/event-stream\nMcp-Session-Id: \u003cvalid-session-id\u003e\n```\n\n```json\n{\n \"jsonrpc\": \"2.0\",\n \"method\": \"tools/call\",\n \"id\": 9,\n \"params\": {\n \"name\": \"create_branch\",\n \"arguments\": {\n \"owner\": \"\u003corg\u003e\",\n \"repo\": \"\u003cprivate-repo\u003e\",\n \"branch\": \"test-branch-name\",\n \"from_branch\": \"main\"\n }\n }\n}\n```\n\n**Response Headers:**\n```\nHTTP/2 500\ncontent-type: text/plain; charset=utf-8\nx-github-backend: Kubernetes\nx-github-request-id: D44E:1D706B:5F7B92F:675BE79:6A0C6556\n```\n\n### Reproduction\n\n- **Frequency:** ~7–10% of `create_branch` calls (1 in 9 to 1 in 15 attempts)\n- **Pattern:** Random, not correlated with request timing or concurrency\n- **Session state:** Occurs on freshly initialized sessions (not stale session issue)\n- **Authentication:** PAT is valid (other calls in the same session succeed; `initialize` and `tools/list` always return 200)\n\nMinimal reproduction: send 15–30 consecutive `create_branch` tool calls (each with a new session). Typically 1–3 will return HTTP 500.\n\n### Analysis\n\nThe error chain suggests the failure occurs in the **Copilot hosting infrastructure** (not in the open-source MCP server logic):\n\n1. Request passes HTTP gateway authentication (PAT is valid → not 401)\n2. Hosting layer attempts internal twirp RPC: `getCopilotUserById`\n3. An internal service mesh intermediary returns **403 Forbidden** to the twirp call\n4. This unhandled error propagates as a raw HTTP 500 to the client\n\nThe 403 from the \"intermediary\" indicates a **service-to-service authentication failure** (likely mTLS cert rotation, internal token expiry, or inconsistent sidecar state during deployment), not a user-permission issue.\n\n### Impact\n\n- MCP clients using `streamablehttp_client` have their entire transport killed by this error (the SDK's `post_writer` TaskGroup crashes, closing read/write streams)\n- Simple in-session retries are ineffective because the session is dead after the 500\n- Automated workloads (CI/CD, evaluation pipelines) see cascading failures\n\n### Expected Behavior\n\n- HTTP 500 should not leak internal error details to clients\n- The `getCopilotUserById` lookup should have retry/circuit-breaker logic on the server side\n- Alternatively, the error should be wrapped in a proper JSON-RPC error response so MCP clients can handle it gracefully\n\n### Environment\n\n- MCP Protocol Version: `2024-11-05`\n- Transport: Streamable HTTP (POST)\n- Client: Python MCP SDK (`mcp` package)\n- Authentication: GitHub PAT (repo + read:org scopes)\n- GitHub MCP Server version: v1.0.5 (remote, hosted)\n\n### Related\n\n- microsoft/vscode-copilot-release#990 (same error pattern, reported March 2024)\n- PR #2478 (IFC marker change merged May 14, 2026 — temporal correlation with onset)","author":{"url":"https://github.com/KentWangYQ","@type":"Person","name":"KentWangYQ"},"datePublished":"2026-05-19T14:12:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2508/github-mcp-server/issues/2508"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a263cf95-0c22-a60e-9601-7660781df9f3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9938:46DA8:45B1E:64006:6A622CAF |
| html-safe-nonce | 744cb8dd8bcfd159d1c8da7f4bec6ff1d9123d62713526b0a55dc89552f0ab0b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTM4OjQ2REE4OjQ1QjFFOjY0MDA2OjZBNjIyQ0FGIiwidmlzaXRvcl9pZCI6Ijg1Mzk2NDQ3MDE0NTY4NzA1NzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 610653012c4e4d9f31f6dd096615e7e040c165e600ae6ec811e0148cca66952f |
| hovercard-subject-tag | issue:4478110920 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2508/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9f8874efb9c5ac35210855e9728bffb093d3aee7d8f861dafd73545e3998dea6/github/github-mcp-server/issues/2508 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9f8874efb9c5ac35210855e9728bffb093d3aee7d8f861dafd73545e3998dea6/github/github-mcp-server/issues/2508 |
| og:image:alt | Description Since approximately May 18, 2026 (coinciding with v1.0.5 release), the remote MCP endpoint at https://api.githubcopilot.com/mcp/ intermittently returns HTTP 500 with a raw text/plain er... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KentWangYQ |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e882415c7b47986d65f899389c870b31642bb1c6f36516eb042618596c60e62 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 230e2af5fc0870303dd4569d72d2bb393ed52c52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width